* gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized

or fullscreen.

Fixes: debbugs:14627
This commit is contained in:
Jan Djärv 2013-08-24 10:43:36 +02:00
parent 9c05bccfb9
commit 6e1b469ee2
2 changed files with 16 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2013-08-24 Jan Djärv <jan.h.d@swipnet.se>
* gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized
or fullscreen (Bug#14627).
2013-08-24 Paul Eggert <eggert@cs.ucla.edu>
System-dependent integer overflow fixes.

View file

@ -1341,6 +1341,7 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
int base_width, base_height;
int min_rows = 0, min_cols = 0;
int win_gravity = f->win_gravity;
Lisp_Object fs_state, frame;
/* Don't set size hints during initialization; that apparently leads
to a race condition. See the thread at
@ -1348,6 +1349,16 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
if (NILP (Vafter_init_time) || !FRAME_GTK_OUTER_WIDGET (f))
return;
XSETFRAME (frame, f);
fs_state = Fframe_parameter (frame, Qfullscreen);
if (EQ (fs_state, Qmaximized) || EQ (fs_state, Qfullboth))
{
/* Don't set hints when maximized or fullscreen. Apparently KWin and
Gtk3 don't get along and the frame shrinks (!).
*/
return;
}
if (flags)
{
memset (&size_hints, 0, sizeof (size_hints));