[PATCH 3/5] ephyr: Fix compilation when ./configure'd with --enable-debug

Jon TURNEY jon.turney at dronecode.org.uk
Mon Dec 2 06:15:59 PST 2013


/jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessMouseMotion’:
/jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:946:188: error: ‘ephyrCurScreen’ undeclared (first use in this function)
/jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonPress’:
/jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:980:186: error: ‘ephyrCurScreen’ undeclared (first use in this function)
/jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonRelease’:
/jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:1007:186: error: ‘ephyrCurScreen’ undeclared (first use in this function)

Fix ephyr compilation when ./configure'd with --enable-debug after commit
46cf6bf5692ef751ec9d17ae2292565d4b13f14b, some instances of ephyrCurScreen were
not converted to screen->pScreen->myNum.

Cc: Eric Anholt <eric at anholt.net>
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 hw/kdrive/ephyr/ephyr.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index ef4b321..f3d6fc4 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -943,7 +943,7 @@ ephyrProcessMouseMotion(xcb_generic_event_t *xev)
 #ifdef XF86DRI
         EphyrWindowPair *pair = NULL;
 #endif
-        EPHYR_LOG("enqueuing mouse motion:%d\n", ephyrCurScreen);
+        EPHYR_LOG("enqueuing mouse motion:%d\n", screen->pScreen->myNum);
         x = motion->event_x;
         y = motion->event_y;
         EPHYR_LOG("initial (x,y):(%d,%d)\n", x, y);
@@ -974,10 +974,11 @@ static void
 ephyrProcessButtonPress(xcb_generic_event_t *xev)
 {
     xcb_button_press_event_t *button = (xcb_button_press_event_t *)xev;
+    KdScreenInfo *screen = screen_from_window(button->event);
 
     if (!ephyrMouse ||
         !((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) {
-        EPHYR_LOG("skipping mouse press:%d\n", ephyrCurScreen);
+        EPHYR_LOG("skipping mouse press:%d\n", screen->pScreen->myNum);
         return;
     }
 
@@ -987,7 +988,7 @@ ephyrProcessButtonPress(xcb_generic_event_t *xev)
      */
     mouseState |= 1 << (button->detail - 1);
 
-    EPHYR_LOG("enqueuing mouse press:%d\n", ephyrCurScreen);
+    EPHYR_LOG("enqueuing mouse press:%d\n", screen->pScreen->myNum);
     KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0);
 }
 
@@ -995,6 +996,7 @@ static void
 ephyrProcessButtonRelease(xcb_generic_event_t *xev)
 {
     xcb_button_press_event_t *button = (xcb_button_press_event_t *)xev;
+    KdScreenInfo *screen = screen_from_window(button->event);
 
     if (!ephyrMouse ||
         !((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) {
@@ -1004,7 +1006,7 @@ ephyrProcessButtonRelease(xcb_generic_event_t *xev)
     ephyrUpdateModifierState(button->state);
     mouseState &= ~(1 << (button->detail - 1));
 
-    EPHYR_LOG("enqueuing mouse release:%d\n", ephyrCurScreen);
+    EPHYR_LOG("enqueuing mouse release:%d\n", screen->pScreen->myNum);
     KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0);
 }
 
-- 
1.8.3.4



More information about the xorg-devel mailing list