Don't handle DRI2 events on emulator 82/10282/1 accepted/tizen_ivi_stable/20131116.011823 submit/tizen_ivi_stable/20131116.011123
authorjinhyung.jo <jinhyung.jo@samsung.com>
Thu, 26 Sep 2013 03:08:44 +0000 (12:08 +0900)
committerjinhyung.jo <jinhyung.jo@samsung.com>
Thu, 26 Sep 2013 04:55:29 +0000 (13:55 +0900)
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 <s.vorobiov@samsung.com>
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
packaging/libdri2.spec
src/dri2.c

index e38f38d..a69b456 100644 (file)
@@ -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
index dfb091f..1701ad3 100755 (executable)
@@ -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;
 }