diff src/xmenu.c @ 105693:964ff7cbc8a6

Fix resize due to font change on a maximized/xmonad-controlled frame. * xterm.h (x_wait_for_event): Declare it. * xterm.c (pending_event_wait): New variable. (handle_one_xevent): Set pending_event_wait.eventtype to 0 if we see pending_event_wait.eventtype. (handle_one_xevent): Don't change gravity when parent changes. (x_new_font): Call change_frame_size with new rows/columns before we try to resize the frame. (x_wait_for_event): New function. (x_set_window_size_1): Don't change gravity unless change_gravity is set. Call XResizeWindow with FRAME_OUTER_WINDOW. If we are visible, don't change frame size, instead wait for the ConfigureNotify. (x_set_window_size): Call x_set_window_size_1 for USE_X_TOOLKIT also. (x_wm_set_size_hint): Remove ifdefs for USE_X_TOOLKIT. (x_initialize): Initialize pending_event_wait. * xmenu.c (set_frame_menubar): Add internal border width to menu bar size. * widget.c (EmacsFrameSetValues): Add comment. (EmacsFrameSetCharSize): Just call x_set_window_size. * gtkutil.c (xg_frame_set_char_size): Flush events and call x_wait_for_event. (flush_and_sync): Removed again. (xg_get_font_name): Suggest monospace if no previous font is known.
author Jan Djärv <jan.h.d@swipnet.se>
date Wed, 21 Oct 2009 18:29:46 +0000
parents 68dd71358159
children 21bdda3ded62
line wrap: on
line diff
--- a/src/xmenu.c	Wed Oct 21 14:04:00 2009 +0000
+++ b/src/xmenu.c	Wed Oct 21 18:29:46 2009 +0000
@@ -1555,8 +1555,10 @@
 	    + f->output_data.x->menubar_widget->core.border_width)
 	 : 0);
 
-#if 0 /* Experimentally, we now get the right results
-	 for -geometry -0-0 without this.  24 Aug 96, rms.  */
+#if 1 /* Experimentally, we now get the right results
+	 for -geometry -0-0 without this.  24 Aug 96, rms.
+         Maybe so, but the menu bar size is missing the pixels so the
+         WM size hints are off by theses pixel.  Jan D, oct 2009.  */
 #ifdef USE_LUCID
     if (FRAME_EXTERNAL_MENU_BAR (f))
       {
@@ -1566,7 +1568,7 @@
         menubar_size += ibw;
       }
 #endif /* USE_LUCID */
-#endif /* 0 */
+#endif /* 1 */
 
     f->output_data.x->menubar_height = menubar_size;
   }