X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fglyphs-x.c;h=04519968dac85a0d5b8682b656d14c933cd65616;hb=2b7371e841478fd7b9bc7e4d9a515e0c26b9ed9a;hp=e0fa2d29abf6d0edb78da2cb4fc4801a2c242b23;hpb=c5e615c17f89a5d09fedffc7a387162d12e1b8a6;p=chise%2Fxemacs-chise.git- diff --git a/src/glyphs-x.c b/src/glyphs-x.c index e0fa2d2..0451996 100644 --- a/src/glyphs-x.c +++ b/src/glyphs-x.c @@ -156,6 +156,8 @@ static void update_tab_widget_face (widget_value* wv, Lisp_Image_Instance* ii, Lisp_Object domain); #endif +void +emacs_Xt_handle_widget_losing_focus (struct frame* f, Widget losing_widget); #include "bitmaps.h" @@ -2130,6 +2132,12 @@ x_unmap_subwindow (Lisp_Image_Instance *p) } else /* must be a widget */ { + /* Since we are being unmapped we want the enclosing frame to + get focus. The losing with simple scrolling but is the safest + thing to do. */ + emacs_Xt_handle_widget_losing_focus + ( XFRAME (IMAGE_INSTANCE_FRAME (p)), + IMAGE_INSTANCE_X_WIDGET_ID (p)); XtUnmapWidget (IMAGE_INSTANCE_X_CLIPWIDGET (p)); } } @@ -2261,7 +2269,7 @@ x_redisplay_widget (Lisp_Image_Instance *p) } /* Adjust offsets within the frame. */ - if (XFRAME (IMAGE_INSTANCE_FRAME (p))->frame_changed) + if (XFRAME (IMAGE_INSTANCE_FRAME (p))->size_changed) { Arg al[2]; XtSetArg (al [0], XtNx, &IMAGE_INSTANCE_X_WIDGET_XOFFSET (p));