emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99895: Fix so top -10 and left -10 i


From: Jan D.
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99895: Fix so top -10 and left -10 in frame parameters work.
Date: Tue, 13 Apr 2010 17:16:42 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99895
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Tue 2010-04-13 17:16:42 +0200
message:
  Fix so top -10 and left -10 in frame parameters work.
  
  * gtkutil.c (xg_set_geometry): Set geometry for PPosition also.
  (x_wm_set_size_hint): Dont set position flags, gtk_window_parse_geometry
  does that.
modified:
  src/ChangeLog
  src/gtkutil.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-04-13 08:19:05 +0000
+++ b/src/ChangeLog     2010-04-13 15:16:42 +0000
@@ -1,5 +1,9 @@
 2010-04-13  Jan Djärv  <address@hidden>
 
+       * gtkutil.c (xg_set_geometry): Set geometry for PPosition also.
+       (x_wm_set_size_hint): Dont set position flags, gtk_window_parse_geometry
+       does that.
+
        * xfns.c (Fx_create_frame, x_create_tip_frame): Set default border width
        to zero.
 

=== modified file 'src/gtkutil.c'
--- a/src/gtkutil.c     2010-02-24 18:23:48 +0000
+++ b/src/gtkutil.c     2010-04-13 15:16:42 +0000
@@ -529,7 +529,7 @@
 xg_set_geometry (f)
      FRAME_PTR f;
 {
-  if (f->size_hint_flags & USPosition)
+  if (f->size_hint_flags & (USPosition | PPosition))
     {
       int left = f->left_pos;
       int xneg = f->size_hint_flags & XNegative;
@@ -542,9 +542,7 @@
       if (yneg)
         top = -top;
 
-      sprintf (geom_str, "=%dx%d%c%d%c%d",
-               FRAME_PIXEL_WIDTH (f),
-               FRAME_TOTAL_PIXEL_HEIGHT (f),
+      sprintf (geom_str, "%c%d%c%d",
                (xneg ? '-' : '+'), left,
                (yneg ? '-' : '+'), top);
 
@@ -552,9 +550,6 @@
                                       geom_str))
         fprintf (stderr, "Failed to parse: '%s'\n", geom_str);
     }
-  else if (f->size_hint_flags & PPosition)
-    gtk_window_move (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
-                     f->left_pos, f->top_pos);
 }
 
 /* Clear under internal border if any.  As we use a mix of Gtk+ and X calls
@@ -956,16 +951,6 @@
   else if (win_gravity == StaticGravity)
     size_hints.win_gravity = GDK_GRAVITY_STATIC;
 
-  if (flags & PPosition) hint_flags |= GDK_HINT_POS;
-  if (flags & USPosition) hint_flags |= GDK_HINT_USER_POS;
-  if (flags & USSize) hint_flags |= GDK_HINT_USER_SIZE;
-
-  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,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]