comparison 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
comparison
equal deleted inserted replaced
449:c83749d23eb5 450:98528da0b7fc
154 Lisp_Image_Instance* ii, Lisp_Object domain); 154 Lisp_Image_Instance* ii, Lisp_Object domain);
155 static void 155 static void
156 update_tab_widget_face (widget_value* wv, 156 update_tab_widget_face (widget_value* wv,
157 Lisp_Image_Instance* ii, Lisp_Object domain); 157 Lisp_Image_Instance* ii, Lisp_Object domain);
158 #endif 158 #endif
159 void
160 emacs_Xt_handle_widget_losing_focus (struct frame* f, Widget losing_widget);
159 161
160 #include "bitmaps.h" 162 #include "bitmaps.h"
161 163
162 164
163 /************************************************************************/ 165 /************************************************************************/
2128 (IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (p), 2130 (IMAGE_INSTANCE_X_SUBWINDOW_DISPLAY (p),
2129 IMAGE_INSTANCE_X_CLIPWINDOW (p)); 2131 IMAGE_INSTANCE_X_CLIPWINDOW (p));
2130 } 2132 }
2131 else /* must be a widget */ 2133 else /* must be a widget */
2132 { 2134 {
2135 /* Since we are being unmapped we want the enclosing frame to
2136 get focus. The losing with simple scrolling but is the safest
2137 thing to do. */
2138 emacs_Xt_handle_widget_losing_focus
2139 ( XFRAME (IMAGE_INSTANCE_FRAME (p)),
2140 IMAGE_INSTANCE_X_WIDGET_ID (p));
2133 XtUnmapWidget (IMAGE_INSTANCE_X_CLIPWIDGET (p)); 2141 XtUnmapWidget (IMAGE_INSTANCE_X_CLIPWIDGET (p));
2134 } 2142 }
2135 } 2143 }
2136 2144
2137 /* map the subwindow. This is used by redisplay via 2145 /* map the subwindow. This is used by redisplay via
2259 lw_add_widget_value_arg (wv, XtNheight, 2267 lw_add_widget_value_arg (wv, XtNheight,
2260 (Dimension)IMAGE_INSTANCE_HEIGHT (p)); 2268 (Dimension)IMAGE_INSTANCE_HEIGHT (p));
2261 } 2269 }
2262 2270
2263 /* Adjust offsets within the frame. */ 2271 /* Adjust offsets within the frame. */
2264 if (XFRAME (IMAGE_INSTANCE_FRAME (p))->frame_changed) 2272 if (XFRAME (IMAGE_INSTANCE_FRAME (p))->size_changed)
2265 { 2273 {
2266 Arg al[2]; 2274 Arg al[2];
2267 XtSetArg (al [0], XtNx, &IMAGE_INSTANCE_X_WIDGET_XOFFSET (p)); 2275 XtSetArg (al [0], XtNx, &IMAGE_INSTANCE_X_WIDGET_XOFFSET (p));
2268 XtSetArg (al [1], XtNy, &IMAGE_INSTANCE_X_WIDGET_YOFFSET (p)); 2276 XtSetArg (al [1], XtNy, &IMAGE_INSTANCE_X_WIDGET_YOFFSET (p));
2269 XtGetValues (FRAME_X_TEXT_WIDGET 2277 XtGetValues (FRAME_X_TEXT_WIDGET