From: jinhyung.jo Date: Thu, 26 Sep 2013 03:08:44 +0000 (+0900) Subject: Don't handle DRI2 events on emulator X-Git-Tag: accepted/tizen_ivi_stable/20131116.011823^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c0b75607e00e7db92c58bd9139134ac5edf74e81;p=platform%2Fcore%2Fuifw%2Flibdri2.git Don't handle DRI2 events on emulator XESetWireToEvent/XESetEventToWire can only set one event handler for a particular event. When libdri2 is used together with OpenGL on emulator all DRI2 events will go either to libdri2 or OpenGL whatever connects to DRI2 protocol last. OpenGL needs to handle all DRI2 events and libdri2 just skips them, so it's reasonable to not handle DRI2 events in libdri2 at all on emulator Change-Id: I854a42625465a7c649955673342931087623a799 Signed-off-by: Stanislav Vorobiov Signed-off-by: Jinhyung Jo --- diff --git a/packaging/libdri2.spec b/packaging/libdri2.spec index e38f38d..a69b456 100644 --- a/packaging/libdri2.spec +++ b/packaging/libdri2.spec @@ -34,7 +34,11 @@ cp %{SOURCE1001} . %build +%ifarch %{ix86} +CFLAGS="$CFLAGS -D_EMUL_" %reconfigure --disable-static +%else %reconfigure --disable-static +%endif make %{?jobs:-j%jobs} %install diff --git a/src/dri2.c b/src/dri2.c index dfb091f..1701ad3 100755 --- a/src/dri2.c +++ b/src/dri2.c @@ -265,10 +265,12 @@ DRI2QueryVersion(Display * dpy, int *major, int *minor) break; } +#ifndef _EMUL_ for (i = 0; i < nevents; i++) { XESetWireToEvent (dpy, info->codes->first_event + i, DRI2WireToEvent); XESetEventToWire (dpy, info->codes->first_event + i, DRI2EventToWire); } +#endif return True; }