diff options
author | Nick Bowler <[email protected]> | 2010-07-14 12:01:49 -0400 |
---|---|---|
committer | Jesse Barnes <[email protected]> | 2010-07-14 10:23:09 -0700 |
commit | f8d81c31cee30821da3aab331a57f484f6a07a5d (patch) | |
tree | 4cc95206c52314c402a87b0943c2ad5272406697 /src/glx/glx_pbuffer.c | |
parent | 467928c6e01d66ea83d90df9903c2a8f0e675240 (diff) |
dri2: Track event mask in client code.
When direct rendering is being used, DRI2 BufferSwapComplete events are
sent unconditionally to clients, even if they haven't been requested.
This causes error messages to be printed by every freeglut application
of the form
freeglut (./gears): Unknown X event type: 104
and might confuse other clients.
This is a fixed up version of the patch by Jesse Barnes, which drops
BufferSwapComplete events if they are not requested by clients.
Fixes fdo bug 27962.
Signed-off-by: Nick Bowler <[email protected]>
Signed-off-by: Jesse Barnes <[email protected]>
Diffstat (limited to 'src/glx/glx_pbuffer.c')
-rw-r--r-- | src/glx/glx_pbuffer.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c index b8d0f21bf06..c081836376d 100644 --- a/src/glx/glx_pbuffer.c +++ b/src/glx/glx_pbuffer.c @@ -86,8 +86,10 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable, const CARD32 * attribs, size_t num_attribs) { __GLXdisplayPrivate *priv = __glXInitialize(dpy); + __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, NULL); CARD32 *output; CARD8 opcode; + int i; if ((dpy == NULL) || (drawable == 0)) { return; @@ -129,6 +131,15 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable, UnlockDisplay(dpy); SyncHandle(); + for (i = 0; i < num_attribs; i++) { + switch(attribs[i * 2]) { + case GLX_EVENT_MASK: + /* Keep a local copy for masking out DRI2 proto events as needed */ + pdraw->eventMask = attribs[i * 2 + 1]; + break; + } + } + return; } |