diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-02-25 16:49:16 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-02-27 15:15:56 +0900 |
commit | e87365117acbd80b7d80fbb5eb30890ef7153291 (patch) | |
tree | 6f3181320e1ab48ca6a587650347a9145e6adbf5 /src/radeon_dri2.c | |
parent | d5dbb07db22d5420c81dfebc060f0dd86e7b8a20 (diff) |
DRI2: Also clear dri2_flipping when client disconnects before event
Fixes the following problem:
With DRI3 enabled, run glxgears with LIBGL_DRI3_DISABLE=1, make it
fullscreen and press Escape while it's still fullscreen. This could
result in dri2_flipping not getting cleared, spuriously preventing apps
using DRI3 from flipping.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_dri2.c')
-rw-r--r-- | src/radeon_dri2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index d30bbd0b..740a9d3c 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -647,6 +647,9 @@ xf86CrtcPtr radeon_dri2_drawable_crtc(DrawablePtr pDraw, Bool consider_disabled) static void radeon_dri2_flip_event_abort(ScrnInfoPtr scrn, void *event_data) { + RADEONInfoPtr info = RADEONPTR(scrn); + + info->drmmode.dri2_flipping = FALSE; free(event_data); } @@ -654,7 +657,6 @@ static void radeon_dri2_flip_event_handler(ScrnInfoPtr scrn, uint32_t frame, uint64_t usec, void *event_data) { - RADEONInfoPtr info = RADEONPTR(scrn); DRI2FrameEventPtr flip = event_data; unsigned tv_sec, tv_usec; DrawablePtr drawable; @@ -698,7 +700,6 @@ radeon_dri2_flip_event_handler(ScrnInfoPtr scrn, uint32_t frame, uint64_t usec, DRI2SwapComplete(flip->client, drawable, frame, tv_sec, tv_usec, DRI2_FLIP_COMPLETE, flip->event_complete, flip->event_data); - info->drmmode.dri2_flipping = FALSE; break; default: xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: unknown vblank event received\n", __func__); |