GNOME Bugzilla – Bug 316180
Withdrawn windows staying around
Last modified: 2011-02-04 16:19:21 UTC
When a window is mapped and withdrawn quickly enough, sometimes a patch remains on the screen where the window used to be. Reproducable with gtk+ 2.6.10 and metacity 2.10.2
Created attachment 52163 [details] testcase Double-clicking on the 'click me' leaves a gray patch of the 'label' window.
Must be some race condition with the window manager. It doesn't happen when run without a wm.
Elijah, do you have any idea ? Ray and I do remember looking at a similar bug in the past, but we don't know where the bug was and how we resolved it (if we resolved it).
Possibly a dup of bug 307877.
Thanks for the pointer. Yes, looks like a dup. *** This bug has been marked as a duplicate of 307877 ***
i can reproduce this using sawfish. since 307877 is a metacity bug, i'm reopening this as a gtk+ bug.
Originally the bug was seen with matchbox but these days it's working around the issue.
Created attachment 52273 [details] testcase with workarounds basically what happens is that the xserver gets a map command immediately followed by an unmap command for the same toplevel xwindow. if a window manager is running, the map command is turned into a MapRequest which is sent to the window manager, so the following unmap command attempts to unmap a not yet mapped window and is ignored. here's a new attachment that shows off the behaviour at the gtk+, gdk and xlib level. it also implements two possible workarounds, one is using gtk_widget_show_now(), the other is setting up an event handler to enforce unmapping.
fixed by means of comitting: Thu Sep 15 15:27:55 2005 Tim Janik <timj@imendio.com> * gtk/gtkwindow.c: gtk_window_map_event(): new function to work around lost unmap requests. fixes bug #316180.
*** Bug 307877 has been marked as a duplicate of this bug. ***
Will the fix be applied to gtk-2-8 as well? It applies cleanly and works for all the testcases I have available. Thanks for fixing this Tim!
Reopening on 2.8.4 milestone so I don't forget to get this
hmm, patch didn't fix the first testcase.
Frederic: Which patch did you use and what are you referring to as the first testcase?
I tested http://bugzilla.gnome.org/attachment.cgi?id=52163&action=view with gtk-2-8 CVS where Tim committed the gtk_window_map_event() function today.
forget my initial comment, my gtk 2.8 build was broken. patch is indeed working. sorry for the false alarm.