diff src/glyphs-x.c @ 450:98528da0b7fc r21-2-40

Import from CVS: tag r21-2-40
author cvs
date Mon, 13 Aug 2007 11:39:20 +0200
parents 3078fd1074e8
children d7a9135ec789
line wrap: on
line diff
--- a/src/glyphs-x.c	Mon Aug 13 11:38:26 2007 +0200
+++ b/src/glyphs-x.c	Mon Aug 13 11:39:20 2007 +0200
@@ -156,6 +156,8 @@
 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 @@
     }
   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 @@
     }
 
   /* 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));