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 552956 - Should check composite extension version
Should check composite extension version
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-09-19 22:46 UTC by Owen Taylor
Modified: 2008-09-27 03:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch checking composite version (834 bytes, patch)
2008-09-19 22:47 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2008-09-19 22:46:17 UTC
We rely on the change made last summer to the Composite extension. 

commit 1838412121d0bac8ce443d362e75439d58a93a4d
Author: Keith Packard <keithp@neko.keithp.com>
Date:   Tue Jul 3 14:09:41 2007 -0700

    Define new manual-redirect clipping semantics and bump version to 0.4.
    
    Manual-redirect windows no longer clip their parents, nor do they affect
    expose event computation. This makes it possible to create application-level
    composited windows which can be damaged by other window manipulations.

So we should check for it. Otherwise people using apps that rely on 
gdk_display_supports_composite() will mysteriously get missing drawing 
on older X servers.
Comment 1 Owen Taylor 2008-09-19 22:47:10 UTC
Created attachment 119019 [details] [review]
Patch checking composite version
Comment 2 Allison Karlitskaya (desrt) 2008-09-19 23:14:02 UTC
I was supposed to add this check when I first rolled the patch.

Originally, I think, the idea was to complain loudly (g_warning) on the first attempt to call set_composite() that the user needed to upgrade their X server and then to allow compositing to be used anyway (since it's still slightly useful -- you can work around the expose issues by doing manual invalidation).

I think there was a string freeze or something that got in the way of that at the time?  I forget...
Comment 3 Owen Taylor 2008-09-20 13:15:03 UTC
I don't see any reason to encourage developers to write a 3rd code path
"half working composite", and AFAIK, the support for IncludeInferiors 
rendering was never added into cairo.

Especially since anybody doing active development likely has a compliant
X server now, a year and two xserver releases later and I think a simple
check should suffice.
Comment 4 Allison Karlitskaya (desrt) 2008-09-20 18:42:00 UTC
The IncludeInferiors support was added to cairo (http://gitweb.freedesktop.org/?p=cairo;a=commit;h=0c5d28a4e5ce5e4dd72c0f416ce5e960e92b808b) and turned on by default, but only for the _source_ of draw operations.

I think at the time when I thought this was a good idea I was either using a patched cairo or making XRender calls for myself... either way, not something that non-insane people will want to do (which is pretty much exactly why I bugged Keith for the change).

So probably you're right about this one.

It might be worth it to change this message:

      g_warning ("gdk_window_set_composited called but "
                 "compositing is not supported");

to note that, on X11, you need version 0.4.  It's not really the right place to make note of this (since probably the user is actually wondering why gdk_display_supports_composite() returns FALSE), but at the same time, adding the warning to gdk_display_supports_composite() would cause inappropriate stderr spew.

To be honest, though, probably not so many people are running these old X servers anymore, so who cares? :)
Comment 5 Matthias Clasen 2008-09-27 03:44:06 UTC
2008-09-26  Matthias Clasen  <mclasen@redhat.com>

        Bug 552956 – Should check composite extension version

        * gdk/x11/gdkdisplay-x11.c: Check that the version of the
        composite extension is at least 0.4.
        Patch by Owen Taylor