summaryrefslogtreecommitdiff
path: root/src/gtkutil.c
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2010-04-13 17:16:42 +0200
committerJan Djärv <jan.h.d@swipnet.se>2010-04-13 17:16:42 +0200
commit92848133b2c17d028b2172b6f3ef43e6c1a1370c (patch)
tree9f699bc4cf352b188dad6a09086b99f8d56b4536 /src/gtkutil.c
parent4bef8d2634d33d234c91be7b95d9c9fb8cfc7a0c (diff)
downloademacs-92848133b2c17d028b2172b6f3ef43e6c1a1370c.tar.gz
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.
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r--src/gtkutil.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 2764382e8a1..25da0baec79 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -529,7 +529,7 @@ static void
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 @@ xg_set_geometry (f)
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 @@ xg_set_geometry (f)
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 @@ x_wm_set_size_hint (f, flags, user_position)
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,