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 164427 - BadImplementation X Window System error
BadImplementation X Window System error
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 163907 165795 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-01-18 06:57 UTC by The Written Word
Modified: 2011-02-04 16:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Check for protocol >= 0.4 if RENDER extension available (753 bytes, patch)
2005-01-18 06:59 UTC, The Written Word
none Details | Review
Update. (760 bytes, patch)
2005-01-18 07:20 UTC, The Written Word
none Details | Review
Separate out so non-trapezoid uses of RENDER still use RENDER (2.32 KB, patch)
2005-01-18 14:17 UTC, The Written Word
none Details | Review

Description The Written Word 2005-01-18 06:57:12 UTC
If the RENDER extension is available, it must have the CompositeTrapezoids
feature, protocol >= 0.4.
Comment 1 The Written Word 2005-01-18 06:59:04 UTC
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
Comment 2 The Written Word 2005-01-18 07:20:39 UTC
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.
Comment 3 Matthias Clasen 2005-01-18 13:13:04 UTC
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.
Comment 4 The Written Word 2005-01-18 13:18:20 UTC
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;
Comment 5 The Written Word 2005-01-18 13:22:11 UTC
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.
Comment 6 Matthias Clasen 2005-01-18 13:24:13 UTC
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
Comment 7 The Written Word 2005-01-18 14:17:03 UTC
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.
Comment 8 Matthias Clasen 2005-01-18 15:22:34 UTC
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.

Comment 9 The Written Word 2005-01-18 15:55:29 UTC
Thanks. I forgot to include the gdk/x11/gdkdisplay-x11.h patch and I totally
missed gdk/x11/gdkdisplay-x11.c.
Comment 10 Owen Taylor 2005-01-19 19:29:51 UTC
*** Bug 163907 has been marked as a duplicate of this bug. ***
Comment 11 Matthias Clasen 2005-01-31 13:12:43 UTC
*** Bug 165795 has been marked as a duplicate of this bug. ***