]> code.delx.au - gnu-emacs/commitdiff
* gtkutil.c (x_wm_set_size_hint): Use one row in call to
authorJan Djärv <jan.h.d@swipnet.se>
Thu, 8 Mar 2012 18:49:13 +0000 (19:49 +0100)
committerJan Djärv <jan.h.d@swipnet.se>
Thu, 8 Mar 2012 18:49:13 +0000 (19:49 +0100)
FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
zero.

Fixes: debbugs:10954
src/ChangeLog
src/gtkutil.c

index ef57223b9cac63505764ea14de2f03bf7e73a3b7..f623e9d46e76cf35a4ad25d90cca7102bed8054c 100644 (file)
@@ -1,3 +1,9 @@
+2012-03-08  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * gtkutil.c (x_wm_set_size_hint): Use one row in call to
+       FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
+       zero (Bug#10954).
+
 2012-03-03  Glenn Morris  <rgm@gnu.org>
 
        * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
index 1ed5833bd5cc114d272715dde57ca79c8f87f916..4dbef65dedfa982514ba4b3bca5b3d8cb7c70473 100644 (file)
@@ -1304,10 +1304,13 @@ x_wm_set_size_hint (FRAME_PTR f, long int flags, int user_position)
 
   hint_flags |= GDK_HINT_BASE_SIZE;
   base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0) + FRAME_TOOLBAR_WIDTH (f);
-  base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0)
+  /* Use one row here so base_height does not become zero.
+     Gtk+ and/or Unity on Ubuntu 12.04 can't handle it.  */
+  base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
     + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
 
   check_frame_size (f, &min_rows, &min_cols);
+  if (min_rows > 0) --min_rows; /* We used one row in base_height = ... 1); */
 
   size_hints.base_width = base_width;
   size_hints.base_height = base_height;