aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-11-15 09:03:52 +0100
committermarha <marha@users.sourceforge.net>2013-11-15 09:03:52 +0100
commit4d64875593956234795d9947ac1d225e5b110f0f (patch)
tree5cc58965cdfe27a50f86f0d8872a7da80cc7248d /xorg-server
parent9837797b353b2e24e7ac96d3a74159497410c21a (diff)
parentaa095d69b3874eb179cb77f033109a7f8f351041 (diff)
downloadvcxsrv-4d64875593956234795d9947ac1d225e5b110f0f.tar.gz
vcxsrv-4d64875593956234795d9947ac1d225e5b110f0f.tar.bz2
vcxsrv-4d64875593956234795d9947ac1d225e5b110f0f.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xcb-proto mesa xserver git update 15 nov 2013 Conflicts: xorg-server/mi/mieq.c
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr.c9
-rw-r--r--xorg-server/hw/kdrive/ephyr/hostx.c4
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.c3
-rw-r--r--xorg-server/hw/kdrive/src/kdrive.h1
-rw-r--r--xorg-server/hw/kdrive/src/kinput.c10
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.c3
-rw-r--r--xorg-server/include/input.h12
-rw-r--r--xorg-server/test/Makefile.am4
8 files changed, 30 insertions, 16 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c
index 08ec5d751..a10f47286 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.c
@@ -970,7 +970,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 510dd2456..873033373 100644
--- a/xorg-server/hw/kdrive/ephyr/hostx.c
+++ b/xorg-server/hw/kdrive/ephyr/hostx.c
@@ -310,8 +310,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);
}
diff --git a/xorg-server/hw/kdrive/src/kdrive.c b/xorg-server/hw/kdrive/src/kdrive.c
index f2426ca43..d56ba8fc5 100644
--- a/xorg-server/hw/kdrive/src/kdrive.c
+++ b/xorg-server/hw/kdrive/src/kdrive.c
@@ -330,7 +330,8 @@ KdParseScreen(KdScreenInfo * screen, const char *arg)
screen->height = pixels;
screen->height_mm = mm;
}
- if (delim != 'x' && delim != '@' && delim != 'X' && delim != 'Y')
+ if (delim != 'x' && delim != '@' && delim != 'X' && delim != 'Y' &&
+ (delim != '\0' || i == 0))
return;
}
diff --git a/xorg-server/hw/kdrive/src/kdrive.h b/xorg-server/hw/kdrive/src/kdrive.h
index 52cde4f0d..f52072003 100644
--- a/xorg-server/hw/kdrive/src/kdrive.h
+++ b/xorg-server/hw/kdrive/src/kdrive.h
@@ -506,6 +506,7 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo * ki, unsigned char scan_code,
#define KD_BUTTON_4 0x08
#define KD_BUTTON_5 0x10
#define KD_BUTTON_8 0x80
+#define KD_POINTER_DESKTOP 0x40000000
#define KD_MOUSE_DELTA 0x80000000
void
diff --git a/xorg-server/hw/kdrive/src/kinput.c b/xorg-server/hw/kdrive/src/kinput.c
index 7f47a1da5..d5171a7f7 100644
--- a/xorg-server/hw/kdrive/src/kinput.c
+++ b/xorg-server/hw/kdrive/src/kinput.c
@@ -1918,6 +1918,8 @@ KdEnqueuePointerEvent(KdPointerInfo * pi, unsigned long flags, int rx, int ry,
}
else {
dixflags = POINTER_ABSOLUTE;
+ if (flags & KD_POINTER_DESKTOP)
+ dixflags |= POINTER_DESKTOP;
if (x != pi->dixdev->last.valuators[0] ||
y != pi->dixdev->last.valuators[1])
_KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags,
@@ -2051,25 +2053,25 @@ KdCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y)
dx = KdScreenOrigin(pNewScreen)->x - KdScreenOrigin(pScreen)->x;
dy = KdScreenOrigin(pNewScreen)->y - KdScreenOrigin(pScreen)->y;
if (*x < 0) {
- if (dx <= 0 && -dx < best_x) {
+ if (dx < 0 && -dx < best_x) {
best_x = -dx;
n_best_x = n;
}
}
else if (*x >= pScreen->width) {
- if (dx >= 0 && dx < best_x) {
+ if (dx > 0 && dx < best_x) {
best_x = dx;
n_best_x = n;
}
}
if (*y < 0) {
- if (dy <= 0 && -dy < best_y) {
+ if (dy < 0 && -dy < best_y) {
best_y = -dy;
n_best_y = n;
}
}
else if (*y >= pScreen->height) {
- if (dy >= 0 && dy < best_y) {
+ if (dy > 0 && dy < best_y) {
best_y = dy;
n_best_y = n;
}
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c
index 2a02c8507..a441fd16a 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.c
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c
@@ -1863,6 +1863,9 @@ SetCompatOutput(xf86CrtcConfigPtr config)
DisplayModePtr maxmode = NULL, testmode, mode;
int o, compat = -1, count, mincount = 0;
+ if (config->num_output == 0)
+ return NULL;
+
/* Look for one that's definitely connected */
for (o = 0; o < config->num_output; o++) {
test = config->output[o];
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h
index 1fa091666..b42510d9b 100644
--- a/xorg-server/include/input.h
+++ b/xorg-server/include/input.h
@@ -244,12 +244,12 @@ typedef struct _InputAttributes {
#define KEY_POSTED 2
#define BUTTON_POSTED 2
-extern void set_key_down(DeviceIntPtr pDev, int key_code, int type);
-extern void set_key_up(DeviceIntPtr pDev, int key_code, int type);
-extern int key_is_down(DeviceIntPtr pDev, int key_code, int type);
-extern void set_button_down(DeviceIntPtr pDev, int button, int type);
-extern void set_button_up(DeviceIntPtr pDev, int button, int type);
-extern int button_is_down(DeviceIntPtr pDev, int button, int type);
+extern _X_EXPORT void set_key_down(DeviceIntPtr pDev, int key_code, int type);
+extern _X_EXPORT void set_key_up(DeviceIntPtr pDev, int key_code, int type);
+extern _X_EXPORT int key_is_down(DeviceIntPtr pDev, int key_code, int type);
+extern _X_EXPORT void set_button_down(DeviceIntPtr pDev, int button, int type);
+extern _X_EXPORT void set_button_up(DeviceIntPtr pDev, int button, int type);
+extern _X_EXPORT int button_is_down(DeviceIntPtr pDev, int button, int type);
extern void InitCoreDevices(void);
extern void InitXTestDevices(void);
diff --git a/xorg-server/test/Makefile.am b/xorg-server/test/Makefile.am
index e59c412ee..2852bb3e0 100644
--- a/xorg-server/test/Makefile.am
+++ b/xorg-server/test/Makefile.am
@@ -1,11 +1,11 @@
if ENABLE_UNIT_TESTS
SUBDIRS= .
-noinst_PROGRAMS = list string touch
+noinst_PROGRAMS = list string
if XORG
# Tests that require at least some DDX functions in order to fully link
# For now, requires xf86 ddx, could be adjusted to use another
SUBDIRS += xi2
-noinst_PROGRAMS += xkb input xtest misc fixes xfree86 hashtabletest os signal-logging
+noinst_PROGRAMS += xkb input xtest misc fixes xfree86 hashtabletest os signal-logging touch
endif
check_LTLIBRARIES = libxservertest.la