xorg-server: Changes to 'upstream-1.11+input'

2012-04-19 Thread Chase Douglas
 Xext/xtest.c|   10 ++
 Xi/exevents.c   |  229 
 Xi/xiallowev.c  |   81 +++---
 Xi/xipassivegrab.c  |7 +
 configure.ac|2 
 dix/eventconvert.c  |4 
 dix/events.c|   39 +++-
 dix/getevents.c |   37 +---
 dix/inpututils.c|3 
 dix/touch.c |   76 +++--
 include/exevents.h  |7 +
 include/input.h |   10 +-
 include/inputstr.h  |1 
 test/.gitignore |1 
 test/xi2/.gitignore |1 
 15 files changed, 312 insertions(+), 196 deletions(-)

New commits:
commit cc5bf30ebc4e9486b1ce360c7234cb6ede5c4a17
Author: Chase Douglas 
Date:   Thu Mar 29 18:06:03 2012 -0700

Implement passive touch ungrabbing

Whoops. Forgot to implement this. The code currently generates an error
due to the unhandled grab type.

X.Org Bug 48069 

Signed-off-by: Chase Douglas 
Reviewed-by: Peter Hutterer 
Signed-off-by: Keith Packard 
(cherry picked from commit 1110facdfeb95b1ad47d03c0ca3d73933b86dbd6)
(cherry picked from commit 259aa5a69b69aa72be3fb7402b68560f9a6b05d6)

Conflicts:

Xi/xipassivegrab.c

Signed-off-by: Chase Douglas 

diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index d911702..89a285f 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -303,14 +303,16 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
 if (stuff->grab_type != XIGrabtypeButton &&
 stuff->grab_type != XIGrabtypeKeycode &&
 stuff->grab_type != XIGrabtypeEnter &&
-stuff->grab_type != XIGrabtypeFocusIn)
+stuff->grab_type != XIGrabtypeFocusIn &&
+stuff->grab_type != XIGrabtypeTouchBegin)
 {
 client->errorValue = stuff->grab_type;
 return BadValue;
 }
 
 if ((stuff->grab_type == XIGrabtypeEnter ||
- stuff->grab_type == XIGrabtypeFocusIn) && stuff->detail != 0)
+ stuff->grab_type == XIGrabtypeFocusIn ||
+ stuff->grab_type == XIGrabtypeTouchBegin) && stuff->detail != 0)
 {
 client->errorValue = stuff->detail;
 return BadValue;
@@ -336,6 +338,7 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
 case XIGrabtypeKeycode:  tempGrab->type = XI_KeyPress;break;
 case XIGrabtypeEnter:   tempGrab->type = XI_Enter;   break;
 case XIGrabtypeFocusIn: tempGrab->type = XI_FocusIn; break;
+case XIGrabtypeTouchBegin: tempGrab->type = XI_TouchBegin; break;
 }
 tempGrab->grabtype = XI2;
 tempGrab->modifierDevice = mod_dev;

commit 447cabbb16533c735dafdb000f791eb7eef3250e
Author: Peter Hutterer 
Date:   Wed Mar 21 14:05:29 2012 +1000

dix: set raw event values before adding up relative values (#46976)

Regression introduced in 4e52cc0ef48145134cd58d357fb7289e6f8bb709

Raw event values are values as-is from the driver, modified only be
transformation or acceleration. 4e52cc caused the mask to be updated from
relative to absolute coordinates which then got written into the raw events.

Move the raw event update into the respective branches for absolute/relative
events.

X.Org Bug 46976 

Signed-off-by: Peter Hutterer 
Reviewed-by: Chase Douglas 
Reviewed-by: Daniel Stone 
Tested-by: Sven Arvidsson 
Reviewed-by: Simon Thum 
(cherry picked from commit 908ab3d580188533168c8cdfd2cab9dc689b4218)
(cherry picked from commit 5eb20062208177172ff3443e522096a2e8f2f1e8)

Conflicts:

dix/getevents.c

Signed-off-by: Chase Douglas 

diff --git a/dix/getevents.c b/dix/getevents.c
index 73b1f21..71c55f5 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1311,17 +1311,18 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr 
pDev, int type,
 
 transformAbsolute(pDev, &mask);
 clipAbsolute(pDev, &mask);
+if ((flags & POINTER_NORAW) == 0)
+set_raw_valuators(raw, &mask, raw->valuators.data);
 } else {
 if (flags & POINTER_ACCELERATE)
 accelPointer(pDev, &mask, ms);
+if ((flags & POINTER_NORAW) == 0)
+set_raw_valuators(raw, &mask, raw->valuators.data);
+
 moveRelative(pDev, &mask);
 }
 
 /* valuators are in device coordinate system in absolute coordinates */
-
-if ((flags & POINTER_NORAW) == 0)
-set_raw_valuators(raw, &mask, raw->valuators.data);
-
 scale_to_desktop(pDev, &mask, &devx, &devy, &screenx, &screeny);
 scr = positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : 
Relative,
  &mask, &devx, &devy, &screenx, &screeny);

commit d4880e674b057aecd77b9fc6239b670a0294e133
Author: Peter Hutterer 
Date:   Wed Mar 21 14:03:27 2012 +1000

dix: fix compiler warning "unused variable 'scr'"

getevents.c: In function 'updateSlaveDevice

xorg-server: Changes to 'upstream-1.11+input'

2012-03-23 Thread Chase Douglas
 hw/xfree86/common/xf86Config.c |8 
 hw/xfree86/common/xf86Init.c   |   31 ---
 2 files changed, 28 insertions(+), 11 deletions(-)

New commits:
commit c3eea9872d90bd64bf1470518553ccdb80a85ce6
Author: Chase Douglas 
Date:   Fri Mar 23 17:25:04 2012 -0700

Revert "xfree86: use NewInputDeviceRequest for xorg.conf devices too"

This commit uses the new 1.12 input option abi. We are sticking with the
1.11 option abi. This ends up causing memory corruption and segfaults.

This reverts commit 7ee1621364d2b6230bb1c02bbdb5b6abb74ad2ff.

Signed-off-by: Chase Douglas 

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index f93724b..b831d9a 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1239,10 +1239,6 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool 
implicitLayout)
if (foundPointer) {
Pointer->options = xf86AddNewOption(Pointer->options,
"CorePointer", "on");
-   Pointer->options = xf86AddNewOption(Pointer->options,
-   "driver", 
confInput->inp_driver);
-   Pointer->options = xf86AddNewOption(Pointer->options,
-   "identifier", 
confInput->inp_identifier);
servlayoutp->inputs = addDevice(servlayoutp->inputs, Pointer);
}
 }
@@ -1333,10 +1329,6 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool 
implicitLayout)
if (foundKeyboard) {
Keyboard->options = xf86AddNewOption(Keyboard->options,
 "CoreKeyboard", "on");
-   Keyboard->options = xf86AddNewOption(Keyboard->options,
-"driver", 
confInput->inp_driver);
-   Keyboard->options = xf86AddNewOption(Keyboard->options,
-"identifier", 
confInput->inp_identifier);
servlayoutp->inputs = addDevice(servlayoutp->inputs, Keyboard);
}
 }
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index e4abfae..5ee68cd 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -791,6 +791,21 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
 NULL);
 }
 
+static InputInfoPtr
+duplicateDevice(InputInfoPtr pInfo)
+{
+InputInfoPtr dup = calloc(1, sizeof(InputInfoRec));
+if (dup) {
+dup->name = strdup(pInfo->name);
+dup->driver = strdup(pInfo->driver);
+dup->options = xf86OptionListDuplicate(pInfo->options);
+/* type_name is a const string */
+dup->type_name = pInfo->type_name;
+dup->fd = -1;
+}
+return dup;
+}
+
 /**
  * Initialize all supported input devices present and referenced in the
  * xorg.conf.
@@ -807,8 +822,20 @@ InitInput(int argc, char **argv)
 
 /* Initialize all configured input devices */
 for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) {
+InputInfoPtr dup;
+/* Replace obsolete keyboard driver with kbd */
+if (!xf86NameCmp((*pInfo)->driver, "keyboard")) {
+strcpy((*pInfo)->driver, "kbd");
+}
+
+/* Data passed into xf86NewInputDevice will be freed on shutdown.
+ * Duplicate from xf86ConfigLayout.inputs, otherwise we don't have any
+ * xorg.conf input devices in the second generation
+ */
+dup = duplicateDevice(*pInfo);
+
 /* If one fails, the others will too */
-if (NewInputDeviceRequest((*pInfo)->options, NULL, &dev) == BadAlloc)
+if (xf86NewInputDevice(dup, &dev, TRUE) == BadAlloc)
 break;
 }
 

commit f9a799a5c022d36bf02fe6ac397ef75e40c0e530
Author: Chase Douglas 
Date:   Fri Mar 23 17:23:41 2012 -0700

Revert "xfree86: duplicate name and driver from pInfo for 
NewInputDeviceRequest"

This commit uses the new 1.12 input option abi. We are sticking with the
1.11 option abi. This ends up causing memory corruption and segfaults.

This reverts commit 4b7dd4523c11ef4952b78e4164b2fa7b34588867.

Signed-off-by: Chase Douglas 

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 0a47140..e4abfae 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -807,8 +807,6 @@ InitInput(int argc, char **argv)
 
 /* Initialize all configured input devices */
 for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) {
-(*pInfo)->options = xf86AddNewOption((*pInfo)->options, "driver", 
(*pInfo)->driver);
-(*pInfo)->options = xf86AddNewOption((*pInfo)->options, "identifier", 
(*pInfo)->name);
 /* If one fails, the others will too */
 if (NewInputDeviceRequest((*pInfo)->options, NULL, &dev) == BadAlloc)
 break;


-- 
To 

xorg-server: Changes to 'upstream-1.11+input'

2012-02-10 Thread Chase Douglas
 Xext/xace.c  |4 +
 Xext/xselinux_ext.c  |6 -
 configure.ac |7 ++
 dix/dispatch.c   |   14 ++--
 dix/dixutils.c   |7 --
 dix/getevents.c  |   17 -
 dix/grabs.c  |3 
 hw/xfree86/common/xf86Xinput.c   |   11 +--
 hw/xquartz/bundle/Info.plist.cpp |8 +-
 include/inputstr.h   |2 
 mi/mibitblt.c|2 
 os/backtrace.c   |6 +
 os/client.c  |  118 +--
 13 files changed, 156 insertions(+), 49 deletions(-)

New commits:
commit 03e15dc10aa7cec2d1db294beb0c006ea0e24e25
Author: Chase Douglas 
Date:   Wed Jan 18 19:09:21 2012 -0800

Don't set X and Y valuators for indirect touch events

For expediency, it made sense to always have the X and Y axes set for
direct touch device event propagation. The last X and Y values are
stored internally. However, indirect device touch event propagation
does not depend on the touch's X and Y values. Thus, we don't need to
set the values for every indirect touch event.

On top of this, the previous X and Y values aren't stored for indirect
touches, so without this change the axes get erroneously set to 0.

Signed-off-by: Chase Douglas 
Signed-off-by: Peter Hutterer 
(cherry picked from commit e1085a0da0b9299f48b3dc41dee5e33bf022bea5)

Signed-off-by: Chase Douglas 

diff --git a/dix/getevents.c b/dix/getevents.c
index a4343f5..048cba5 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1836,7 +1836,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, 
uint32_t ddx_touchid,
 default:
 return 0;
 }
-if (!(flags & TOUCH_CLIENT_ID))
+if (t->mode == XIDirectTouch && !(flags & TOUCH_CLIENT_ID))
 {
 if (!valuator_mask_isset(&mask, 0))
 valuator_mask_set_double(&mask, 0, 
valuator_mask_get_double(touchpoint.ti->valuators, 0));

commit 17e9669a686c5b943b6e22ed740c2e8ffcb39c27
Author: Daniel Stone 
Date:   Thu Jan 19 22:40:32 2012 +1100

UngrabAllDevices: Don't kill clients if not told to

The kill_client argument to UngrabAllClients specifies if we want to
kill the client holding the grab or just deactivate the grab.

Signed-off-by: Daniel Stone 
Reported-by: Julien Cristau 
Reviewed-by: Cyril Brulebois 
Reviewed-by: Peter Hutterer 
Signed-off-by: Peter Hutterer 
(cherry picked from commit 5201310559fe8708ba8278bdef77cdc1673fff71)

Signed-off-by: Chase Douglas 

diff --git a/dix/grabs.c b/dix/grabs.c
index 701470c..cc2c946 100644
--- a/dix/grabs.c
+++ b/dix/grabs.c
@@ -195,7 +195,8 @@ UngrabAllDevices(Bool kill_client)
 client = clients[CLIENT_ID(dev->deviceGrab.grab->resource)];
 if (!client || client->clientGone)
 dev->deviceGrab.DeactivateGrab(dev);
-CloseDownClient(client);
+if (kill_client)
+CloseDownClient(client);
 }
 
 ErrorF("End list of ungrabbed devices\n");

commit 36d20ea69467e0a873a457078c5032d7447ac984
Author: Chase Douglas 
Date:   Wed Jan 18 18:04:14 2012 -0800

Only update pointer motion data for pointer emulated touch events

Signed-off-by: Chase Douglas 
Reviewed-by: Peter Hutterer 
Signed-off-by: Peter Hutterer 
(cherry picked from commit 9b1e18f42a05a79d9ebec372a37b47442e397ca9)

Signed-off-by: Chase Douglas 

diff --git a/dix/getevents.c b/dix/getevents.c
index 1dc7615..a4343f5 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1878,9 +1878,13 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, 
uint32_t ddx_touchid,
  &devx, &devy, &screenx, &screeny);
 
 /* see fill_pointer_events for coordinate systems */
-updateHistory(dev, &mask, ms);
+if (emulate_pointer)
+updateHistory(dev, &mask, ms);
+
 clipValuators(dev, &mask);
-storeLastValuators(dev, &mask, 0, 1, devx, devy);
+
+if (emulate_pointer)
+storeLastValuators(dev, &mask, 0, 1, devx, devy);
 
 event->root = scr->root->drawable.id;
 

commit b6e21d8b973f46fe70517d37385342b5e2f47d22
Author: Chase Douglas 
Date:   Wed Jan 18 18:04:13 2012 -0800

Only scale direct device touch coordinates

Indirect touch devices provide valuator values in pure device
coordinates. They also don't need to be fixed up for screen crossings.

Signed-off-by: Chase Douglas 
Reviewed-by: Peter Hutterer 
Signed-off-by: Peter Hutterer 
(cherry picked from commit f00e5b02f5d9928cd88961e761da91b5faff1b32)

Signed-off-by: Chase Douglas 

diff --git a/dix/getevents.c b/dix/getevents.c
index 3b40a5b..1dc7615 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1867,7 +1867,12 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, 
uint32_t ddx_touchid,
 if (need_rawevent)
 set_raw_valuators(

xorg-server: Changes to 'upstream-1.11+input'

2012-01-17 Thread Chase Douglas
 dix/events.c |5 +++--
 render/animcur.c |3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 7014cf0a6497f122bfa2b0e6e7794dc3e30c0c6f
Author: Chase Douglas 
Date:   Wed Jan 11 07:38:12 2012 -0800

Use event time instead of CurrentTime for grab times

When {XI,X,}AllowEvents is called, the timestamp is compared against the
grab time to ensure that the request pertains to the current grab in the
server. While many clients may use CurrentTime (client-side), the
timestamp of the event causing the grab is also valid.

This change ensures that the server's notion of the grab time is the
time of the event that activated the grab rather than the time that the
grab is actually activated.

This bug was exposed through nested touch then pointer grabs.

Signed-off-by: Chase Douglas 
Reviewed-by: Peter Hutterer 
Signed-off-by: Peter Hutterer 
(cherry picked from commit f9e6858d5c10be6a8439c0f18bfb2325fa0ee070)

Signed-off-by: Chase Douglas 

diff --git a/dix/events.c b/dix/events.c
index 0c4255c..04d7fb5 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3723,7 +3723,8 @@ ActivatePassiveGrab(DeviceIntPtr device, GrabPtr grab, 
InternalEvent *event,
 }
 }
 
-(*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
+(*grabinfo->ActivateGrab)(device, grab,
+  ClientTimeToServerTime(event->any.time), TRUE);
 
 if (xE)
 {

commit 4989bff6bfe2c0409127a523e56f177b3141b8d1
Author: Peter Hutterer 
Date:   Fri Jan 6 13:20:45 2012 +1000

render: don't bother with animated cursors on floating slaves (#39989)

X.Org Bug 39989 

Signed-off-by: Peter Hutterer 
Reviewed-by: Jeremy Huddleston 
(cherry picked from commit bbb6b8c834e0e1491ca14403b5d0840dd14380d3)

Signed-off-by: Chase Douglas 

diff --git a/render/animcur.c b/render/animcur.c
index 31cbab9..8d4a9c2 100644
--- a/render/animcur.c
+++ b/render/animcur.c
@@ -208,6 +208,9 @@ AnimCurDisplayCursor (DeviceIntPtr pDev,
 AnimCurScreenPtras = GetAnimCurScreen(pScreen);
 Bool   ret;
 
+if (IsFloating(pDev))
+   return FALSE;
+
 Unwrap (as, pScreen, DisplayCursor);
 if (IsAnimCur(pCursor))
 {

commit b5f71a5f124eb44eab08f68d3c8ef946df05bb45
Author: Peter Hutterer 
Date:   Mon Jan 9 15:04:10 2012 +1000

dix: Update pointer limits for floating devices too (#43635)

When the screen is restructured, the pointer limits need to be reset for
floating slave devices as well, not just for master pointers. Only skip
devices that don't have a cursor (attached slaves and keyboard)

Bug reproducer: float an absolute slave device, rotate the screen - the
device is now confined to a section of the screen only.

X.Org Bug 43635 

Signed-off-by: Peter Hutterer 
Reviewed-by: Chase Douglas 
(cherry picked from commit 35bd77e9d0701daae87d681900d749604fc6471f)

Signed-off-by: Chase Douglas 

diff --git a/dix/events.c b/dix/events.c
index 5360267..0c4255c 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1368,7 +1368,7 @@ ScreenRestructured (ScreenPtr pScreen)
 
 for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
 {
-if (!DevHasCursor(pDev))
+if (!IsFloating(pDev) && !DevHasCursor(pDev))
 continue;
 
 /* GrabDevice doesn't have a confineTo field, so we don't need to


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1rneni-0004xm...@vasks.debian.org



xorg-server: Changes to 'upstream-1.11+input'

2011-12-22 Thread Chase Douglas
 Xi/exevents.c   |  951 ++
 Xi/extinit.c|   28 
 Xi/xiallowev.c  |   53 +
 Xi/xipassivegrab.c  |   27 
 Xi/xiquerydevice.c  |   41 +
 Xi/xiquerydevice.h  |1 
 Xi/xiselectev.c |   48 +
 configure.ac|2 
 dix/Makefile.am |1 
 dix/devices.c   |   87 ++
 dix/eventconvert.c  |   63 +-
 dix/events.c|   64 +-
 dix/getevents.c |  352 ++-
 dix/grabs.c |3 
 dix/inpututils.c|5 
 dix/touch.c |  982 
 dix/window.c|9 
 hw/xfree86/common/xf86Module.h  |2 
 hw/xfree86/common/xf86Xinput.c  |   24 
 hw/xfree86/common/xf86Xinput.h  |3 
 include/dix.h   |7 
 include/events.h|1 
 include/eventstr.h  |   30 
 include/exevents.h  |   12 
 include/input.h |   87 ++
 include/inputstr.h  |   55 +
 include/misc.h  |4 
 include/protocol-versions.h |2 
 mi/mieq.c   |   37 -
 test/Makefile.am|3 
 test/input.c|   17 
 test/touch.c|  270 
 test/xi2/protocol-eventconvert.c|  106 +++
 test/xi2/protocol-xipassivegrabdevice.c |2 
 test/xi2/protocol-xiselectevents.c  |   38 -
 35 files changed, 3321 insertions(+), 96 deletions(-)

New commits:
commit 0c292448ebcfcc6e5072efada55f8135b60b7795
Author: Keith Packard 
Date:   Thu Dec 22 09:35:51 2011 -0800

test/xi2: Fix infinite loop in test_convert_XITouchOwnershipEvent

The touchid test was using a loop like:

for(i = 1; i < 0x; i <<= 1)

When 'i' is a 32-bit variable, this infinite loops as it goes from
0x8000 to 0. 'i' is declared as 'long', which is 32-bit in 32-bit mode.

Signed-off-by: Keith Packard 
(cherry picked from commit e7df42ab68e30588a5e32ed543b0711821daf009)

Signed-off-by: Chase Douglas 

diff --git a/test/xi2/protocol-eventconvert.c b/test/xi2/protocol-eventconvert.c
index 752fbbf..2df9cb9 100644
--- a/test/xi2/protocol-eventconvert.c
+++ b/test/xi2/protocol-eventconvert.c
@@ -1017,10 +1017,12 @@ test_convert_XITouchOwnershipEvent(void)
 test_XITouchOwnershipEvent(&in);
 }
 
-for (i = 1; i <= 0x; i <<= 1)
+for (i = 1; ; i <<= 1)
 {
 in.touchid = i;
 test_XITouchOwnershipEvent(&in);
+   if (i == (1 << 31))
+   break;
 }
 }
 

commit 738549e470ea1ae792840bbc50766a017de23cff
Author: Peter Hutterer 
Date:   Thu Dec 22 10:00:15 2011 +1000

test: fix grab mode value tests for new XIGrabModeTouch

This test checks that last-valid-mode + 1 returns a BadValue. With the
addition of XIGrabModeTouch, that value has changed - sync it up again.

Signed-off-by: Peter Hutterer 
Reviewed-by: Chase Douglas 
(cherry picked from commit f75bdf7fbe757f4603e39139acc3c90538a45e15)

Signed-off-by: Chase Douglas 

diff --git a/test/input.c b/test/input.c
index 1ebf197..c665bfe 100644
--- a/test/input.c
+++ b/test/input.c
@@ -161,22 +161,31 @@ static void dix_check_grab_values(void)
 rc = CheckGrabValues(&client, ¶m);
 assert(rc == Success);
 
-param.this_device_mode = GrabModeAsync + 1;
+param.this_device_mode = XIGrabModeTouch;
+rc = CheckGrabValues(&client, ¶m);
+assert(rc == Success);
+
+param.this_device_mode = XIGrabModeTouch + 1;
 rc = CheckGrabValues(&client, ¶m);
 assert(rc == BadValue);
 assert(client.errorValue == param.this_device_mode);
-assert(client.errorValue == GrabModeAsync + 1);
+assert(client.errorValue == XIGrabModeTouch + 1);
 
 param.this_device_mode = GrabModeSync;
 param.other_devices_mode = GrabModeAsync;
 rc = CheckGrabValues(&client, ¶m);
+
+param.this_device_mode = GrabModeSync;
+param.other_devices_mode = XIGrabModeTouch;
+rc = CheckGrabValues(&client, ¶m);
+assert(rc == Success);
 assert(rc == Success);
 
-param.other_devices_mode = GrabModeAsync + 1;
+param.other_devices_mode = XIGrabModeTouch + 1;
 rc = CheckGrabValues(&client, ¶m);
 assert(rc == BadValue);
 assert(client.errorValue == param.other_devices_mode);
-assert(client.errorValue == GrabModeAsync + 1);
+assert(client.errorValue == XIGrabModeTouch + 1);
 
 param.other_devices_mode = GrabModeSync;
 

commit bc282a9a1492137b44486e39f08b2e4cbc34f92b
Author: Peter Hutterer 
Date:   Wed Dec 21 14:45

xorg-server: Changes to 'upstream-1.11+input'

2011-12-21 Thread Chase Douglas
 Xext/security.c |4 ---
 Xext/shm.c  |2 -
 Xext/xselinux_hooks.c   |4 +--
 configure.ac|   12 +++--
 dix/dispatch.c  |   23 ++
 dix/extension.c |   14 ---
 hw/dmx/examples/Makefile.am |   56 ++--
 hw/dmx/glxProxy/Makefile.am |2 +
 hw/kdrive/linux/keyboard.c  |6 ++--
 hw/kdrive/linux/ms.c|4 +--
 hw/kdrive/linux/ps2.c   |4 +--
 include/dixstruct.h |1 
 include/extension.h |2 -
 record/record.c |8 ++
 14 files changed, 63 insertions(+), 79 deletions(-)

New commits:
commit 625d1088192a9ad972c20fbdbcb4bb9fda979157
Author: Peter Hutterer 
Date:   Fri Dec 16 09:15:25 2011 -0500

dmx: force -fno-strict-aliasing for xinput example

Compiler warning:
xinput.c:272: warning: dereferencing pointer 'e' does break strict-aliasing
rules

The code itself is the usual XInput client-side code:
XEvent event;
XDeviceMotionEvent *e = (XDeviceMotionEvent *)&event;
XNextEvent(display, &event);
printf("%d\n", e->type);

Since XDeviceMotionEvent is not guaranteed the same size as XEvent, clients
must use pointer aliasing as above when using the XNextEvent API. Disable
strict aliasing for this example.

Reviewed-by: Peter Hutterer 
Reviewed-by: Gaetan Nadon 
Signed-off-by: Peter Hutterer 
Signed-off-by: Gaetan Nadon 
Signed-off-by: Keith Packard 
(cherry picked from commit 3aca8199405cff5097ee5813605ec78b5ae44a43)

diff --git a/hw/dmx/examples/Makefile.am b/hw/dmx/examples/Makefile.am
index 229bb57..d055ddc 100644
--- a/hw/dmx/examples/Makefile.am
+++ b/hw/dmx/examples/Makefile.am
@@ -10,60 +10,60 @@ bin_PROGRAMS = \
 noinst_PROGRAMS = xinput xtest evi res xled xbell $(EV_PROG)
 
 dmxinfo_SOURCES = dmxinfo.c
-dmxinfo_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxinfo_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxinfo_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxinfo_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxwininfo_SOURCES = dmxwininfo.c
-dmxwininfo_LDADD = @DMXXMUEXAMPLES_DEP_LIBS@
-dmxwininfo_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@
+dmxwininfo_LDADD = $(DMXXMUEXAMPLES_DEP_LIBS)
+dmxwininfo_CFLAGS = $(DMXXMUEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxreconfig_SOURCES = dmxreconfig.c
-dmxreconfig_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxreconfig_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxreconfig_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxreconfig_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxresize_SOURCES = dmxresize.c
-dmxresize_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxresize_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxresize_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxresize_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxaddscreen_SOURCES = dmxaddscreen.c
-dmxaddscreen_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxaddscreen_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxaddscreen_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxaddscreen_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxrmscreen_SOURCES = dmxrmscreen.c
-dmxrmscreen_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxrmscreen_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxrmscreen_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxrmscreen_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxaddinput_SOURCES = dmxaddinput.c
-dmxaddinput_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxaddinput_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxaddinput_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxaddinput_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 dmxrminput_SOURCES = dmxrminput.c
-dmxrminput_LDADD = @DMXEXAMPLES_DEP_LIBS@
-dmxrminput_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
+dmxrminput_LDADD = $(DMXEXAMPLES_DEP_LIBS)
+dmxrminput_CFLAGS = $(DMXEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 xinput_SOURCES = xinput.c
-xinput_LDADD = @DMXXIEXAMPLES_DEP_LIBS@
-xinput_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@
+xinput_LDADD = $(DMXXIEXAMPLES_DEP_LIBS)
+xinput_CFLAGS = $(DMXXIEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 xtest_SOURCES = xtest.c
-xtest_LDADD = @XTSTEXAMPLES_DEP_LIBS@
-xtest_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@
+xtest_LDADD = $(XTSTEXAMPLES_DEP_LIBS)
+xtest_CFLAGS = $(XTSTEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 evi_SOURCES = evi.c
-evi_LDADD = @X11EXAMPLES_DEP_LIBS@
-evi_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
+evi_LDADD = $(X11EXAMPLES_DEP_LIBS)
+evi_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 res_SOURCES = res.c
-res_LDADD = @XRESEXAMPLES_DEP_LIBS@
-res_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@
+res_LDADD = $(XRESEXAMPLES_DEP_LIBS)
+res_CFLAGS = $(XRESEXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 xled_SOURCES = xled.c
-xled_LDADD = @X11EXAMPLES_DEP_LIBS@
-xled_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
+xled_LDADD = $(X11EXAMPLES_DEP_LIBS)
+xled_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 xbell_SOURCES = xbell.c
-xbell_LDADD = @X11EXAMPLES_DEP_LIBS@
-xbell_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@
+xbell_LDADD = $(X11EXAMPLES_DEP_LIBS)
+xbell_CFLAGS = $(X11EXAMPLES_DEP_CFLAGS) $(CWARNFLAGS)
 
 ev_SOURCE

xorg-server: Changes to 'upstream-1.11+input'

2011-12-21 Thread Chase Douglas
 dix/events.c |5 +++--
 dix/inpututils.c |2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit ce03688df5447e6634667a32785276105c31230e
Author: Peter Hutterer 
Date:   Fri Dec 16 12:41:08 2011 +1000

dix: button state must show the logical buttons, not physical buttons

If the device is mapped 3 2 1, a click on physical button 1 sends a button 3
press, but the state was set for button 1. Fix this, the state must be set
for that button's logical mapping.

https://bugzilla.gnome.org/show_bug.cgi?id=655928

Signed-off-by: Peter Hutterer 
Reviewed-by: Chase Douglas 
(cherry picked from commit fcda98c48610fd507ca0b89c6006a5497d9dc1c9)

Signed-off-by: Chase Douglas 

diff --git a/dix/inpututils.c b/dix/inpututils.c
index d062cbc..4f3a64e 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -671,7 +671,7 @@ void event_set_state(DeviceIntPtr mouse, DeviceIntPtr kbd, 
DeviceEvent *event)
 
 for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
 if (BitIsOn(mouse->button->down, i))
-SetBit(event->buttons, i);
+SetBit(event->buttons, mouse->button->map[i]);
 
 if (kbd && kbd->key)
 {

commit d2178c5f2931363c8626ee27352235aa5688931d
Author: Peter Hutterer 
Date:   Mon Dec 19 14:52:41 2011 +1000

dix: don't retrieve the syncEvents tail on an empty list

An empty list points to itself but syncEvents has the list head only and is
of a different format than the elements. Thus, casting it to a QdEventPtr
gives us garbage.

Segfaults with XTS test case Xlib13/XGrabKeyboard

Introduced in 7af23259d88f4c28ed21140f82cc03b3724c06bb.

Reported-by: Aaron Plattner 
Signed-off-by: Peter Hutterer 
Reviewed-by: Chase Douglas 
(cherry picked from commit 47da6b6b2c2e9245422655f94770146fb8cd430b)

Signed-off-by: Chase Douglas 

diff --git a/dix/events.c b/dix/events.c
index 8dff299..eb7bd92 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1115,13 +1115,14 @@ NoticeEventTime(InternalEvent *ev)
 void
 EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
 {
-QdEventPtr tail;
+QdEventPtr tail = NULL;
 QdEventPtr qe;
 SpritePtr  pSprite = device->spriteInfo->sprite;
 inteventlen;
 DeviceEvent *event = &ev->device_event;
 
-tail = list_last_entry(&syncEvents.pending, QdEventRec, next);
+if (!list_is_empty(&syncEvents.pending))
+tail = list_last_entry(&syncEvents.pending, QdEventRec, next);
 
 NoticeTime((InternalEvent*)event);
 


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1rdsf9-0008hs...@vasks.debian.org



xorg-server: Changes to 'upstream-1.11+input'

2011-12-14 Thread Chase Douglas
New branch 'upstream-1.11+input' available with the following commits:
commit 3eaf942e727652db144d055a08ac2deb93c86105
Author: Keith Packard 
Date:   Wed Dec 14 11:40:10 2011 -0800

Merge remote-tracking branch 'whot/for-keith'
(cherry picked from commit 7da7aa96a0acb895e1fe57a9d3f2d093479cf2a2)

Signed-off-by: Chase Douglas 

commit 481c6f70eb9889fa52e9ac2cc2805101ff2b8777
Author: Chase Douglas 
Date:   Tue Dec 13 17:39:20 2011 -0800

A few random fixes that are needed due to backport cherry-picking

Signed-off-by: Chase Douglas 

commit a44c1d329d1284939f9948161838193e9de2ef4f
Author: Alan Coopersmith 
Date:   Thu Dec 8 21:52:07 2011 -0800

Change disable_clientpointer return type to void

It doesn't return anything, nor does it's caller expect it to.

Fixes Solaris Studio compiler error:
"xichangehierarchy.c", line 214: Function has no return statement : 
disable_clientpointer

Signed-off-by: Alan Coopersmith 
Reviewed-by: Peter Hutterer 
Signed-off-by: Keith Packard 
(cherry picked from commit 372a6f10dc2d74d2d179e8b92449e9b8636a99ef)

Signed-off-by: Chase Douglas 

commit 77cae4b31f9e22210d3b98dfd2f413818915ffc3
Author: Keith Packard 
Date:   Thu Dec 8 20:57:26 2011 -0800

Merge remote-tracking branch 'whot/for-keith'
(cherry picked from commit 522f8bcc0360d6a117e929a004bc956ab92037e9)

Conflicts:

hw/xfree86/common/xf86Module.h
include/input.h

Signed-off-by: Chase Douglas 

commit 9963b023509a8ec3ff33700faf331994b14bbd84
Author: Keith Packard 
Date:   Thu Dec 1 14:36:58 2011 +

Merge remote-tracking branch 'whot/for-keith'
(cherry picked from commit 3197b773c81e58cd4aa412eccaee49526012ed6f)

Signed-off-by: Chase Douglas 

commit cec13888543742bed1bee9edad0e7ad96b911539
Author: Alan Coopersmith 
Date:   Tue Nov 1 16:56:18 2011 -0700

Make XIGetKnownProperty take a const char * argument

Now that MakeAtom takes const char *, so can XIGetKnownProperty.
Clears 71 warnings from gcc -Wwrite-strings of the form:
devices.c:145:5: warning: passing argument 1 of 'XIGetKnownProperty' 
discards qualifiers from pointer target type
../include/exevents.h:128:23: note: expected 'char *' but argument is of 
type 'const char *'

Signed-off-by: Alan Coopersmith 
Reviewed-by: Peter Hutterer 
(cherry picked from commit 5f285a30a1d6ffba82ebe5e08a0b68352bb51556)

Signed-off-by: Chase Douglas 

commit 92f7f64c91c07ce5a74e5714166ce2372301e807
Author: Alan Coopersmith 
Date:   Mon Oct 24 23:40:45 2011 -0700

Enable memory checking during unit testing

If configure is generated with xorg-macros 1.16.0 or newer, and
an appropriate memory checking library is found for the platform,
use it when running unit tests.   If not, then no harm is done.

Signed-off-by: Alan Coopersmith 
Reviewed-by: Jeremy Huddleston 
(cherry picked from commit e47aa9475027ed6a255daefec85561c6b15789bd)

Signed-off-by: Chase Douglas 

commit 3ea81b1d44befe9fa51bb3fefb51bba5b4a67454
Author: Alan Coopersmith 
Date:   Tue Oct 25 00:12:48 2011 -0700

Don't require ld -wrap for tests that don't need it

If configure is generated with xorg-macros 1.16 or later, this allows
builders to --enable-unit-test and run the tests other than the xi2
tests which require ld -wrap (and are still wrapped in if HAVE_LD_WRAP
in tests/xi2/Makefile).  If an older xorg-macros is used, the existing
behaviour is preserved of requiring ld -wrap for all unit tests, but
no side effects occur, so the minimum xorg-macros version is not raised.

If unit testing is enabled without ld -wrap, then we create a bogus
"xi2-tests" script just to report that we're skipping them.

Signed-off-by: Alan Coopersmith 
Reviewed-by: Jeremy Huddleston 
(cherry picked from commit 36670065bd74b870d0da7c6a69a9c0d222b21706)

Signed-off-by: Chase Douglas 

commit 8eece5a0ef9547a247872419a63c81a9d6cf0223
Author: Peter Hutterer 
Date:   Mon Aug 1 14:14:02 2011 +1000

input: replace remaining GetPairedDevice() with GetMaster()

Wherever it's obvious which device we need (keyboard or pointer), use
GetMaster() instead of GetPairedDevice(). It is more reliable in actually
getting the device type we want.

Signed-off-by: Peter Hutterer 
Reviewed-by: Daniel Stone 
(cherry picked from commit 35ec24cf245e5ef676e98a0bf7c77296a3f1ff63)

Signed-off-by: Chase Douglas 

commit 4b7dd4523c11ef4952b78e4164b2fa7b34588867
Author: Peter Hutterer 
Date:   Tue Nov 1 12:17:50 2011 +1000

xfree86: duplicate name and driver from pInfo for NewInputDeviceRequest

xorg.conf devices had the name and driver set in the DDX's InputInfoPtr list
but not in the option list for those devices. That information was lost when
passing the options into NewInputDeviceRequest. NIDR then ref