X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fglyphs-x.c;h=0651929017b8c5b50e91943328499e374b14f275;hp=6124be40898ad836779f6fcbb0a7c63b4e493fd9;hb=2fd9701a4f902054649dde9143a3f77809afee8f;hpb=efab7bccd7d7da13ff3979d2890a417a048ec960 diff --git a/src/glyphs-x.c b/src/glyphs-x.c index 6124be4..0651929 100644 --- a/src/glyphs-x.c +++ b/src/glyphs-x.c @@ -2189,6 +2189,12 @@ x_update_widget (Lisp_Image_Instance *p) need to update most other things after the items have changed.*/ if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p)) { + /* Pick up the items we recorded earlier. We do this here so + that the callbacks get set up with the new items. */ + IMAGE_INSTANCE_WIDGET_ITEMS (p) = + IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (p); + IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (p) = Qnil; + wv = gui_items_to_widget_values (IMAGE_INSTANCE_WIDGET_ITEMS (p)); wv->change = STRUCTURAL_CHANGE; @@ -2201,6 +2207,9 @@ x_update_widget (Lisp_Image_Instance *p) /* Now do non structural updates. */ wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (p)); + if (!wv) + return; + /* Possibly update the colors and font */ if (IMAGE_INSTANCE_WIDGET_FACE_CHANGED (p) || @@ -2692,6 +2701,11 @@ x_tab_control_update (Lisp_Object image_instance) IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii)) { widget_value* wv = lw_get_all_values (IMAGE_INSTANCE_X_WIDGET_LWID (ii)); + + /* #### I don't know why this can occur. */ + if (!wv) + return; + update_tab_widget_face (wv, ii, IMAGE_INSTANCE_SUBWINDOW_FRAME (ii));