aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/ephyr
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/kdrive/ephyr')
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr.c9
-rw-r--r--xorg-server/hw/kdrive/ephyr/hostx.c4
2 files changed, 10 insertions, 3 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c
index 91e949d79..ef4b3210c 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.c
@@ -959,7 +959,14 @@ ephyrProcessMouseMotion(xcb_generic_event_t *xev)
}
EPHYR_LOG("final (x,y):(%d,%d)\n", x, y);
#endif
- KdEnqueuePointerEvent(ephyrMouse, mouseState, x, y, 0);
+
+ /* convert coords into desktop-wide coordinates.
+ * fill_pointer_events will convert that back to
+ * per-screen coordinates where needed */
+ x += screen->pScreen->x;
+ y += screen->pScreen->y;
+
+ KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_POINTER_DESKTOP, x, y, 0);
}
}
diff --git a/xorg-server/hw/kdrive/ephyr/hostx.c b/xorg-server/hw/kdrive/ephyr/hostx.c
index ee9ae455c..3e01a4770 100644
--- a/xorg-server/hw/kdrive/ephyr/hostx.c
+++ b/xorg-server/hw/kdrive/ephyr/hostx.c
@@ -304,8 +304,8 @@ hostx_init(void)
| XCB_EVENT_MASK_STRUCTURE_NOTIFY;
EPHYR_DBG("mark");
-
- if ((HostX.conn = xcb_connect(NULL, &HostX.screen)) == NULL) {
+ HostX.conn = xcb_connect(NULL, &HostX.screen);
+ if (xcb_connection_has_error(HostX.conn)) {
fprintf(stderr, "\nXephyr cannot open host display. Is DISPLAY set?\n");
exit(1);
}