Commit 1a021f57 authored by Jon Turney's avatar Jon Turney
Browse files

ephyr: Fix compilation when ./configure'd with --enable-debug

/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
46cf6bf5

, some instances of ephyrCurScreen were
not converted to screen->pScreen->myNum.

v2: Don't use a trivial local variable which will be unused when ./configure'd
with --disable-debug
Signed-off-by: Jon Turney's avatarJon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent 875dbcef
......@@ -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);
......@@ -977,7 +977,7 @@ ephyrProcessButtonPress(xcb_generic_event_t *xev)
if (!ephyrMouse ||
!((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) {
EPHYR_LOG("skipping mouse press:%d\n", ephyrCurScreen);
EPHYR_LOG("skipping mouse press:%d\n", screen_from_window(button->event)->pScreen->myNum);
return;
}
......@@ -987,7 +987,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_from_window(button->event)->pScreen->myNum);
KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0);
}
......@@ -1004,7 +1004,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_from_window(button->event)->pScreen->myNum);
KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment