Mercurial > hg > xemacs-beta
comparison lwlib/xlwtabs.c @ 440:8de8e3f6228a r21-2-28
Import from CVS: tag r21-2-28
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:33:38 +0200 |
parents | 080151679be2 |
children | abe6d1db359e |
comparison
equal
deleted
inserted
replaced
439:357dd071b03c | 440:8de8e3f6228a |
---|---|
978 if( tw->tabs.topWidget != NULL && | 978 if( tw->tabs.topWidget != NULL && |
979 ( !XtIsManaged(tw->tabs.topWidget) || | 979 ( !XtIsManaged(tw->tabs.topWidget) || |
980 tw->tabs.topWidget->core.being_destroyed ) ) | 980 tw->tabs.topWidget->core.being_destroyed ) ) |
981 tw->tabs.topWidget = NULL ; | 981 tw->tabs.topWidget = NULL ; |
982 | 982 |
983 /* Check whether the highlight tab is still valid. */ | |
984 if( tw->tabs.hilight != NULL && | |
985 ( !XtIsManaged(tw->tabs.hilight) || | |
986 tw->tabs.hilight->core.being_destroyed ) ) | |
987 tw->tabs.hilight = NULL ; | |
988 | |
983 GetPreferredSizes(tw) ; | 989 GetPreferredSizes(tw) ; |
984 MakeSizeRequest(tw) ; | 990 MakeSizeRequest(tw) ; |
985 | 991 |
986 XtClass(w)->core_class.resize(w) ; | 992 XtClass(w)->core_class.resize(w) ; |
987 if( XtIsRealized(w) ) | 993 if( XtIsRealized(w) ) |
1253 (XtPointer)tw->tabs.topWidget) ; | 1259 (XtPointer)tw->tabs.topWidget) ; |
1254 | 1260 |
1255 if( !XtIsRealized(w) ) { | 1261 if( !XtIsRealized(w) ) { |
1256 tw->tabs.topWidget = w ; | 1262 tw->tabs.topWidget = w ; |
1257 tw->tabs.needs_layout = True ; | 1263 tw->tabs.needs_layout = True ; |
1264 tw->tabs.hilight = NULL; /* The highlight tab might disappear. */ | |
1258 return ; | 1265 return ; |
1259 } | 1266 } |
1260 | 1267 |
1261 XRaiseWindow(XtDisplay(w), XtWindow(w)) ; | 1268 XRaiseWindow(XtDisplay(w), XtWindow(w)) ; |
1262 #ifdef NEED_MOTIF | 1269 #ifdef NEED_MOTIF |
1263 XtVaSetValues(oldtop, XmNtraversalOn, False, 0) ; | 1270 XtVaSetValues(oldtop, XmNtraversalOn, False, 0) ; |
1264 XtVaSetValues(w, XmNtraversalOn, True, 0) ; | 1271 XtVaSetValues(w, XmNtraversalOn, True, 0) ; |
1265 #endif | 1272 #endif |
1266 | 1273 |
1267 tab = (TabsConstraints) w->core.constraints ; | 1274 tab = (TabsConstraints) w->core.constraints ; |
1275 | |
1276 /* Unhighlight before we start messing with the stacking order. */ | |
1277 if( tw->tabs.hilight != NULL ) | |
1278 { | |
1279 DrawHighlight(tw, tw->tabs.hilight, True) ; | |
1280 tw->tabs.hilight = NULL; | |
1281 } | |
1282 | |
1268 if( tab->tabs.row == 0 ) | 1283 if( tab->tabs.row == 0 ) |
1269 { | 1284 { |
1270 /* Easy case; undraw current top, undraw new top, assign new | 1285 /* Easy case; undraw current top, undraw new top, assign new |
1271 * top, redraw all borders. | 1286 * top, redraw all borders. |
1272 * We *could* just erase and execute a full redraw, but I like to | 1287 * We *could* just erase and execute a full redraw, but I like to |
1305 if( !XtIsSubclass(t, tabsWidgetClass) ) | 1320 if( !XtIsSubclass(t, tabsWidgetClass) ) |
1306 return ; | 1321 return ; |
1307 | 1322 |
1308 if( XtIsRealized(t) && w != tw->tabs.hilight ) | 1323 if( XtIsRealized(t) && w != tw->tabs.hilight ) |
1309 { | 1324 { |
1310 if( tw->tabs.hilight != NULL ) | |
1311 DrawHighlight(tw, tw->tabs.hilight, True) ; | |
1312 if( w != NULL ) | 1325 if( w != NULL ) |
1313 DrawHighlight(tw, w, False) ; | 1326 DrawHighlight(tw, w, False) ; |
1314 } | 1327 } |
1315 | 1328 |
1316 tw->tabs.hilight = w ; | 1329 tw->tabs.hilight = w ; |