Index: lwlib/lwlib-Xaw.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/lwlib/lwlib-Xaw.c,v retrieving revision 1.9.2.4 diff -u -r1.9.2.4 lwlib-Xaw.c --- lwlib/lwlib-Xaw.c 1999/08/30 13:37:06 1.9.2.4 +++ lwlib/lwlib-Xaw.c 1999/12/05 21:39:52 @@ -146,7 +146,7 @@ } #endif /* LWLIB_DIALOGS_ATHENA */ #ifdef LWLIB_WIDGETS_ATHENA - else if (XtClass (widget) == labelWidgetClass) + else if (XtIsSubclass (widget, labelWidgetClass)) { Arg al [1]; XtSetArg (al [0], XtNlabel, val->value); Index: lwlib/xlwtabs.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/lwlib/Attic/xlwtabs.c,v retrieving revision 1.1.2.15 diff -u -r1.1.2.15 xlwtabs.c --- lwlib/xlwtabs.c 1999/11/28 05:57:00 1.1.2.15 +++ lwlib/xlwtabs.c 1999/12/05 21:39:58 @@ -598,75 +598,73 @@ TabsSetValues(Widget current, Widget request, Widget new, ArgList args, Cardinal *num_args) { - TabsWidget curtw = (TabsWidget) current ; - TabsWidget tw = (TabsWidget) new ; - Boolean needRedraw = False ; - Widget *childP ; - int i ; + TabsWidget curtw = (TabsWidget) current ; + TabsWidget tw = (TabsWidget) new ; + Boolean needRedraw = False ; + Widget *childP ; + int i ; - if( tw->tabs.font != curtw->tabs.font || - tw->tabs.internalWidth != curtw->tabs.internalWidth || - tw->tabs.internalHeight != curtw->tabs.internalHeight ) - { - tw->tabs.tab_height = 2 * tw->tabs.internalHeight + SHADWID ; + if( tw->tabs.font != curtw->tabs.font || + tw->tabs.internalWidth != curtw->tabs.internalWidth || + tw->tabs.internalHeight != curtw->tabs.internalHeight ) + { + tw->tabs.tab_height = 2 * tw->tabs.internalHeight + SHADWID ; - if( tw->tabs.font != NULL ) - tw->tabs.tab_height += tw->tabs.font->max_bounds.ascent + - tw->tabs.font->max_bounds.descent ; - - /* Tab size has changed. Resize all tabs and request a new size */ - for(i=0, childP=tw->composite.children; - i < tw->composite.num_children; - ++i, ++childP) - if( XtIsManaged(*childP) ) - TabWidth(*childP) ; - PreferredSize(tw, &tw->core.width, &tw->core.height, NULL,NULL) ; - needRedraw = True ; - tw->tabs.needs_layout = True ; - } + if( tw->tabs.font != NULL ) + tw->tabs.tab_height += tw->tabs.font->max_bounds.ascent + + tw->tabs.font->max_bounds.descent ; + + /* Tab size has changed. Resize all tabs and request a new size */ + for(i=0, childP=tw->composite.children; + i < tw->composite.num_children; + ++i, ++childP) + if( XtIsManaged(*childP) ) + TabWidth(*childP) ; + PreferredSize(tw, &tw->core.width, &tw->core.height, NULL,NULL) ; + needRedraw = True ; + tw->tabs.needs_layout = True ; + } - /* TODO: if any color changes, need to recompute GCs and redraw */ + /* TODO: if any color changes, need to recompute GCs and redraw */ - if( tw->core.background_pixel != curtw->core.background_pixel || - tw->core.background_pixmap != curtw->core.background_pixmap ) - if( XtIsRealized(new) ) - { - TabsFreeGCs(tw) ; - TabsAllocGCs(tw) ; - needRedraw = True ; - } + if( tw->core.background_pixel != curtw->core.background_pixel || + tw->core.background_pixmap != curtw->core.background_pixmap ) + if( XtIsRealized(new) ) + { + TabsFreeGCs(tw) ; + TabsAllocGCs(tw) ; + needRedraw = True ; + } - if( tw->core.sensitive != curtw->core.sensitive ) - needRedraw = True ; + if( tw->core.sensitive != curtw->core.sensitive ) + needRedraw = True ; - /* If top widget changes, need to change stacking order, redraw tabs. - * Window system will handle the redraws. - */ + /* If top widget changes, need to change stacking order, redraw tabs. + * Window system will handle the redraws. + */ - if( tw->tabs.topWidget != curtw->tabs.topWidget ) - { - if( XtIsRealized(tw->tabs.topWidget) ) - { - Widget w = tw->tabs.topWidget ; - TabsConstraints tab = (TabsConstraints) w->core.constraints ; + if( tw->tabs.topWidget != curtw->tabs.topWidget ) + if( XtIsRealized(tw->tabs.topWidget) ) + { + Widget w = tw->tabs.topWidget ; + TabsConstraints tab = (TabsConstraints) w->core.constraints ; - XRaiseWindow(XtDisplay(w), XtWindow(w)) ; + XRaiseWindow(XtDisplay(w), XtWindow(w)) ; #ifdef NEED_MOTIF - XtVaSetValues(curtw->tabs.topWidget, XmNtraversalOn, False, 0) ; - XtVaSetValues(w, XmNtraversalOn, True, 0) ; + XtVaSetValues(curtw->tabs.topWidget, XmNtraversalOn, False, 0) ; + XtVaSetValues(w, XmNtraversalOn, True, 0) ; #endif - if( tab->tabs.row != tw->tabs.numRows-1 ) - TabsShuffleRows(tw) ; + if( tab->tabs.row != tw->tabs.numRows-1 ) + TabsShuffleRows(tw) ; - needRedraw = True ; - } - else - tw->tabs.needs_layout = True ; - } + needRedraw = True ; + } + else + tw->tabs.needs_layout = True ; - return needRedraw ; + return needRedraw ; } @@ -1271,6 +1269,7 @@ XawTabsSetHighlight(Widget t, Widget w) { TabsWidget tw = (TabsWidget)t ; + TabsConstraints tab ; if( !XtIsSubclass(t, tabsWidgetClass) ) return ; Index: src/gui.h =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/gui.h,v retrieving revision 1.6.2.9 diff -u -r1.6.2.9 gui.h --- src/gui.h 1999/10/24 03:48:42 1.6.2.9 +++ src/gui.h 1999/12/05 21:40:22 @@ -71,6 +71,7 @@ Error_behavior errb); Lisp_Object gui_parse_item_keywords (Lisp_Object item); Lisp_Object gui_parse_item_keywords_no_errors (Lisp_Object item); +void gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item); int gui_item_active_p (Lisp_Object); int gui_item_selected_p (Lisp_Object); int gui_item_included_p (Lisp_Object, Lisp_Object into); Index: src/redisplay-output.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/redisplay-output.c,v retrieving revision 1.11.2.20 diff -u -r1.11.2.20 redisplay-output.c --- src/redisplay-output.c 1999/11/20 20:29:17 1.11.2.20 +++ src/redisplay-output.c 1999/12/05 21:40:35 @@ -1223,14 +1223,14 @@ /* We bogusly don't take f->extents_changed and f->glyphs_changed into account. This is because if we do we always redisplay the entire layout. So far I have seen no ill effects to we'll see. */ - int frame_changed = (f->buffers_changed || - f->clip_changed || - f->faces_changed || - f->frame_changed || - f->modeline_changed || - f->subwindows_changed || - f->windows_changed || - f->windows_structure_changed); + int frame_really_changed = (f->buffers_changed || + f->clip_changed || + f->faces_changed || + f->frame_changed || + f->modeline_changed || + f->subwindows_changed || + f->windows_changed || + f->windows_structure_changed); XSETWINDOW (window, w); @@ -1246,7 +1246,7 @@ /* Highly dodgy optimization. We want to only output the whole layout if we really have to. */ - if (frame_changed || IMAGE_INSTANCE_DIRTYP (p)) + if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (p)) { /* First clear the area we are drawing into. This is the easiest thing to do since we have many gaps that we have to make sure are @@ -1348,7 +1348,7 @@ generalisation.*/ if (redisplay_normalize_glyph_area (&cdb, &cdga) && - (frame_changed || IMAGE_INSTANCE_DIRTYP (childii))) + (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii))) { struct display_line dl; /* this is fake */ Lisp_Object string = @@ -1382,14 +1382,14 @@ case IMAGE_MONO_PIXMAP: case IMAGE_COLOR_PIXMAP: - if (frame_changed || IMAGE_INSTANCE_DIRTYP (childii)) + if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii)) redisplay_output_pixmap (w, child, &cdb, &cdga, findex, 0, 0, 0, 0); break; case IMAGE_WIDGET: case IMAGE_SUBWINDOW: - if (frame_changed || IMAGE_INSTANCE_DIRTYP (childii)) + if (frame_really_changed || IMAGE_INSTANCE_DIRTYP (childii)) redisplay_output_subwindow (w, child, &cdb, &cdga, findex, 0, 0, 0); break; Index: lwlib/xlwtabs.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/lwlib/Attic/xlwtabs.c,v retrieving revision 1.1.2.15 diff -u -r1.1.2.15 xlwtabs.c --- lwlib/xlwtabs.c 1999/11/28 05:57:00 1.1.2.15 +++ lwlib/xlwtabs.c 1999/12/05 21:56:20 @@ -598,75 +598,74 @@ TabsSetValues(Widget current, Widget request, Widget new, ArgList args, Cardinal *num_args) { - TabsWidget curtw = (TabsWidget) current ; - TabsWidget tw = (TabsWidget) new ; - Boolean needRedraw = False ; - Widget *childP ; - int i ; + TabsWidget curtw = (TabsWidget) current ; + TabsWidget tw = (TabsWidget) new ; + Boolean needRedraw = False ; + Widget *childP ; + int i ; - if( tw->tabs.font != curtw->tabs.font || - tw->tabs.internalWidth != curtw->tabs.internalWidth || - tw->tabs.internalHeight != curtw->tabs.internalHeight ) - { - tw->tabs.tab_height = 2 * tw->tabs.internalHeight + SHADWID ; + if( tw->tabs.font != curtw->tabs.font || + tw->tabs.internalWidth != curtw->tabs.internalWidth || + tw->tabs.internalHeight != curtw->tabs.internalHeight ) + { + tw->tabs.tab_height = 2 * tw->tabs.internalHeight + SHADWID ; - if( tw->tabs.font != NULL ) - tw->tabs.tab_height += tw->tabs.font->max_bounds.ascent + - tw->tabs.font->max_bounds.descent ; - - /* Tab size has changed. Resize all tabs and request a new size */ - for(i=0, childP=tw->composite.children; - i < tw->composite.num_children; - ++i, ++childP) - if( XtIsManaged(*childP) ) - TabWidth(*childP) ; - PreferredSize(tw, &tw->core.width, &tw->core.height, NULL,NULL) ; - needRedraw = True ; - tw->tabs.needs_layout = True ; - } + if( tw->tabs.font != NULL ) + tw->tabs.tab_height += tw->tabs.font->max_bounds.ascent + + tw->tabs.font->max_bounds.descent ; + + /* Tab size has changed. Resize all tabs and request a new size */ + for(i=0, childP=tw->composite.children; + i < tw->composite.num_children; + ++i, ++childP) + if( XtIsManaged(*childP) ) + TabWidth(*childP) ; + PreferredSize(tw, &tw->core.width, &tw->core.height, NULL,NULL) ; + needRedraw = True ; + tw->tabs.needs_layout = True ; + } - /* TODO: if any color changes, need to recompute GCs and redraw */ + /* TODO: if any color changes, need to recompute GCs and redraw */ - if( tw->core.background_pixel != curtw->core.background_pixel || - tw->core.background_pixmap != curtw->core.background_pixmap ) - if( XtIsRealized(new) ) - { - TabsFreeGCs(tw) ; - TabsAllocGCs(tw) ; - needRedraw = True ; - } + if( tw->core.background_pixel != curtw->core.background_pixel || + tw->core.background_pixmap != curtw->core.background_pixmap ) + if( XtIsRealized(new) ) + { + TabsFreeGCs(tw) ; + TabsAllocGCs(tw) ; + needRedraw = True ; + } - if( tw->core.sensitive != curtw->core.sensitive ) - needRedraw = True ; + if( tw->core.sensitive != curtw->core.sensitive ) + needRedraw = True ; - /* If top widget changes, need to change stacking order, redraw tabs. - * Window system will handle the redraws. - */ + /* If top widget changes, need to change stacking order, redraw tabs. + * Window system will handle the redraws. + */ - if( tw->tabs.topWidget != curtw->tabs.topWidget ) - { - if( XtIsRealized(tw->tabs.topWidget) ) - { - Widget w = tw->tabs.topWidget ; - TabsConstraints tab = (TabsConstraints) w->core.constraints ; + if( tw->tabs.topWidget != curtw->tabs.topWidget ) { + if( XtIsRealized(tw->tabs.topWidget) ) + { + Widget w = tw->tabs.topWidget ; + TabsConstraints tab = (TabsConstraints) w->core.constraints ; - XRaiseWindow(XtDisplay(w), XtWindow(w)) ; + XRaiseWindow(XtDisplay(w), XtWindow(w)) ; #ifdef NEED_MOTIF - XtVaSetValues(curtw->tabs.topWidget, XmNtraversalOn, False, 0) ; - XtVaSetValues(w, XmNtraversalOn, True, 0) ; + XtVaSetValues(curtw->tabs.topWidget, XmNtraversalOn, False, 0) ; + XtVaSetValues(w, XmNtraversalOn, True, 0) ; #endif - if( tab->tabs.row != tw->tabs.numRows-1 ) - TabsShuffleRows(tw) ; + if( tab->tabs.row != tw->tabs.numRows-1 ) + TabsShuffleRows(tw) ; - needRedraw = True ; - } - else - tw->tabs.needs_layout = True ; - } + needRedraw = True ; + } + } + else + tw->tabs.needs_layout = True ; - return needRedraw ; + return needRedraw ; } @@ -820,8 +819,8 @@ Dimension th ; /* space used by tabs */ Dimension wid,hgt ; /* Tabs widget size */ - rw = tab->tabs.wid ; - rh = tab->tabs.hgt ; + rw = cw = tab->tabs.wid ; + rh = ch = tab->tabs.hgt ; /* find out what the resulting preferred size would be */ @@ -1059,7 +1058,7 @@ TabsPage(Widget w, XEvent *event, String *params, Cardinal *num_params) { TabsWidget tw = (TabsWidget) w ; - Widget newtop ; + Widget newtop = NULL; Widget *childP ; int idx ; int nc = tw->composite.num_children ; @@ -1122,7 +1121,7 @@ TabsHighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) { TabsWidget tw = (TabsWidget) w ; - Widget newhl ; + Widget newhl = NULL; Widget *childP ; int idx ; int nc = tw->composite.num_children ;