]> git.eshelyaron.com Git - emacs.git/commitdiff
Set USER_POS in hint_flags to work around Cygwin problem.
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 18 Apr 2010 11:24:59 +0000 (13:24 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 18 Apr 2010 11:24:59 +0000 (13:24 +0200)
gtkutil.c (xg_set_geometry): Set size in geometry string also.
(x_wm_set_size_hint): Set USER_POS in hint_flags (Bug#5968).

src/ChangeLog
src/gtkutil.c

index 0fe9d8d0d53c06cc258c8a093d6d884ee550796a..9789b3dbd0403b759c08012b11563d02bcb3e214 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-18  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * gtkutil.c (xg_set_geometry): Set size in geometry string also.
+       (x_wm_set_size_hint): Set USER_POS in hint_flags (Bug#5968).
+
 2010-04-17  Eli Zaretskii  <eliz@gnu.org>
 
        Fix a crash when an NSM character is inserted at BEGV.
index 25da0baec7929803b21166a104d1e2fb82b91a02..c2b425b4562d7d6a1fc86d17c05bf62d025a6f21 100644 (file)
@@ -542,7 +542,9 @@ xg_set_geometry (f)
       if (yneg)
         top = -top;
 
-      sprintf (geom_str, "%c%d%c%d",
+      sprintf (geom_str, "=%dx%d%c%d%c%d",
+               FRAME_PIXEL_WIDTH (f),
+               FRAME_PIXEL_HEIGHT (f),
                (xneg ? '-' : '+'), left,
                (yneg ? '-' : '+'), top);
 
@@ -951,6 +953,12 @@ x_wm_set_size_hint (f, flags, user_position)
   else if (win_gravity == StaticGravity)
     size_hints.win_gravity = GDK_GRAVITY_STATIC;
 
+  if (user_position)
+    {
+      hint_flags &= ~GDK_HINT_POS;
+      hint_flags |= GDK_HINT_USER_POS;
+    }
+
   if (hint_flags != f->output_data.x->hint_flags
       || memcmp (&size_hints,
                 &f->output_data.x->size_hints,