From 22aa44a857f87f99b6fb77ff148ff1481dbf29f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 18 Apr 2010 13:24:59 +0200 Subject: [PATCH] Set USER_POS in hint_flags to work around Cygwin problem. 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 | 5 +++++ src/gtkutil.c | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0fe9d8d0d53..9789b3dbd04 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-04-18 Jan Djärv + + * 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 Fix a crash when an NSM character is inserted at BEGV. diff --git a/src/gtkutil.c b/src/gtkutil.c index 25da0baec79..c2b425b4562 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -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, -- 2.39.2