GNOME Bugzilla – Bug 522269
Evince windows sometimes incorrectly unmaximized, caused by missing flag initialization
Last modified: 2008-08-04 01:50:57 UTC
Please describe the problem: Evince windows sometimes erroneously unmaximize when used under Compiz. A detailed description can be found under http://bugs.opencompositing.org/show_bug.cgi?id=521 Closer inspection showed that this is caused by gdk wrongly unmaximizing the window, caused by missing initialization of the have_horzmax and have_vertmax members of the GdkToplevelX11 structure. Imagine the following situation: - window is maximized, - mapped afterwards and - desktop is set What now happens is - gdk_event_translate (gdkevents-x11.c) receives the PropertyNotify for _NET_WM_STATE (maximization), but ignores it as it is pre-map - gdk_event_translate receives the PropertyNotify for _NET_WM_DESKTOP - it calls gdk_check_wm_desktop_changed - this one calls do_net_wm_state_changes - as in this function old_state includes GDK_WINDOW_STATE_MAXIMIZED, it uses the not-previously-set have_maxhorz and have_maxvert members to determine if the window is still maximized - as those are initialized to FALSE, the window will be unmaximized. The correct solution is to properly initialize those flags. I'll attach a patch that does that. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 107233 [details] [review] Fix proposal This patch completely cures the issue for me.
(In reply to comment #1) > Created an attachment (id=107233) [edit] > Fix proposal > > This patch completely cures the issue for me. Thanks a lot for the analysis and patch. Bratsche, tbf, please apply.
2008-05-25 Cody Russell <bratsche@gnome.org> Bug 522269 - Evince windows sometimes incorrectly unmaximized, caused by missing flag initialization * gdk/x11/gdkwindow-x11.c (set_initial_hints): Initialize top-level private flags correctly. Patch by Danny Baumann.
Was this actually committed? I can still reproduce the bug with latest build from svn and I can't find any info about this bug in changelog.
Sorry, thought that it was a bug in evince.