GNOME Bugzilla – Bug 164427
BadImplementation X Window System error
Last modified: 2011-02-04 16:17:29 UTC
If the RENDER extension is available, it must have the CompositeTrapezoids feature, protocol >= 0.4.
Created attachment 36154 [details] [review] Check for protocol >= 0.4 if RENDER extension available Idea from James Henstridge <james@jamesh.id.au> on gtk-devel-list (http://mail.gnome.org/archives/gtk-devel-list/2005-January/msg00109.html). Solution to the following X error: X Error of failed request: BadImplementation (server does not implement operation) Major opcode of failed request: 152 (RENDER) Minor opcode of failed request: 10 (RenderTrapezoids) Serial number of failed request: 487 Current serial number in output stream: 728
Created attachment 36157 [details] [review] Update. Outer "if" now at same level as preceding "if" (to test for Sun RENDER). Figured it should be at the same level to test for another "broken" RENDER extension.
Hmm, this check will break if the render protocol ever goes 1.0. I'll have to ask keithp if he intends to bump the major from 0 to 1 once render is considered finished.
Yeah, that's true. How about we just change: if ((major_version < XRENDER_TETRAPEZOIDS_MAJOR) || ((major_version == XRENDER_TETRAPEZOIDS_MAJOR) && (minor_version < XRENDER_TETRAPEZOIDS_MINOR))) x11display->have_render = GDK_NO; to: if (major_version == XRENDER_TETRAPEZOIDS_MAJOR && minor_version < XRENDER_TETRAPEZOIDS_MINOR) x11display->have_render = GDK_NO;
On second thought, I don't see the problem with a 1.0 protocol (I'm assuming major_version == 1, minor_version == 0) in this case. I guess checking is a good idea.
Well, in general major version bumps *do* indicate incompatible changes, so I think it is correct to only allow major versions which we know to support. I think we may need to special case major == 0 to be treated as compatible to 1. But I'll ask keith about his plans
Created attachment 36180 [details] [review] Separate out so non-trapezoid uses of RENDER still use RENDER Owen Taylor, in http://mail.gnome.org/archives/gtk-devel-list/2005-January/msg00119.html, asked that this be separated out.
2005-01-18 Matthias Clasen <mclasen@redhat.com> Avoid X errors when running against servers which implement XRender < 0.4. (#164427, Albert Chin) * gdk/x11/gdkprivate-x11.h: * gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render_with_trapezoids): New function to check for trapezoid support in XRender. (gdk_x11_draw_trapezoids, _gdk_x11_drawable_draw_xtrapezoids): Use it here. * gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add a separate have_render_with_trapezoids field. * gdk/x11/gdkdisplay-x11.c (gdk_display_open): Initialize it.
Thanks. I forgot to include the gdk/x11/gdkdisplay-x11.h patch and I totally missed gdk/x11/gdkdisplay-x11.c.
*** Bug 163907 has been marked as a duplicate of this bug. ***
*** Bug 165795 has been marked as a duplicate of this bug. ***