After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 589369 - [csw] GDM background redraw issue
[csw] GDM background redraw issue
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: Alexander Larsson
gtk-bugs
csw
Depends on:
Blocks:
 
 
Reported: 2009-07-22 12:39 UTC by Tomas Bzatek
Modified: 2009-08-10 12:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GDM-Screenshot.jpg (701.91 KB, image/jpeg)
2009-07-22 12:43 UTC, Tomas Bzatek
  Details
a patch (1001 bytes, patch)
2009-08-07 13:51 UTC, Matthias Clasen
none Details | Review

Description Tomas Bzatek 2009-07-22 12:39:14 UTC
Old bug is back again. 2.17.5 was working fine, todays snapshot http://git.gnome.org/cgit/gtk+/commit/?id=cfc27be34e7aeb4fa288eb135598c299aab376c5 exposes the problem again.

gdm-2.26.1-13.fc12.x86_64
Comment 1 Tomas Bzatek 2009-07-22 12:43:23 UTC
Created attachment 138995 [details]
GDM-Screenshot.jpg
Comment 2 Alexander Larsson 2009-07-23 18:07:46 UTC
Could you try bisecting this?
Comment 3 Matthias Clasen 2009-07-26 03:08:49 UTC
027f411150b313082c4bb729ed242d561c98782f is first bad commit
commit 027f411150b313082c4bb729ed242d561c98782f
Author: Alexander Larsson <alexl@redhat.com>
Date:   Sat Jul 18 20:37:19 2009 +0200

    Check for viewable to avoid doing work instead of mapped
    
    This is now cheap and allows us to avoid more work.

Comment 4 Sebastien Bacher 2009-07-27 17:51:52 UTC
Confirming on Ubuntu karmic https://bugs.launchpad.net/bugs/405392
Comment 5 Baptiste Mille-Mathias 2009-07-30 14:18:08 UTC
yeah the bug has arised in last gtk+ for me.
Comment 6 Matthias Clasen 2009-08-07 13:51:30 UTC
Created attachment 140115 [details] [review]
a patch

here is a patch that I've put in the Fedora packages for now.
Comment 7 Alexander Larsson 2009-08-08 18:23:43 UTC
Seems to imply a bug in the ->viewable calculation, because that should never be set for !MAPPED windows.
Comment 8 Matthias Clasen 2009-08-09 00:26:18 UTC
It might be relevant that this is the root window we are talking about here. 
Comment 9 Alexander Larsson 2009-08-09 18:41:04 UTC
Are you saying the root window has !GDK_WINDOW_IS_MAPPED (window) == TRUE?
Comment 10 Matthias Clasen 2009-08-10 02:12:13 UTC
It appears so:

[mclasen@planemask ~]$ python
Python 2.6.2 (r262:71600, Jul 30 2009, 17:08:54) 
[GCC 4.4.1 20090725 (Red Hat 4.4.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
>>> gtk.gdk.display_get_default().get_default_screen().get_root_window().get_state()
<flags GDK_WINDOW_STATE_WITHDRAWN of type GdkWindowState>
>>> 
Comment 11 Alexander Larsson 2009-08-10 12:16:03 UTC
Ah, turns out the root window is always !mapped, but we still report it as viewable in gdk_window_is_viewable(), which is a bit weird, but whatever.

The problem happens when metacity gets a GraphicsExpose on the root window due to some XCopyArea operation, and this then invalidates on the root window causing it to be manually cleared (with the wrong background color, etc). I fixed this by explicitly not allowing invalidating root windows.