[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg-server: Changes to 'ubuntu'



 debian/changelog                           |   18 ++++
 debian/patches/207_dga_master_device.patch |   27 +++++++
 debian/patches/208_switch_on_release.diff  |  109 +++++++++++++++++++++++++++++
 debian/patches/series                      |    2 
 4 files changed, 156 insertions(+)

New commits:
commit 8ec8f0068170a012b371c13b8463b6d4550bce9a
Author: Bryce Harrington <bryce@canonical.com>
Date:   Thu Jan 6 14:38:16 2011 -0800

    Make layout switching key combos not interfere with application shortcut
    key combos.

diff --git a/debian/changelog b/debian/changelog
index b0a509b..77f8bbd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+xorg-server (2:1.9.0.902-1ubuntu4) natty; urgency=low
+
+  * Add 208_switch_on_release.diff: Perform keyboard layout switches on
+    key-release rather than key-press events.  This solves a very
+    long-standing issue where e.g. <ctrl>+<shift>+<key> fails when
+    ctrl+shift is configured for layout switching.
+    (LP: #36812)
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Thu, 06 Jan 2011 14:35:59 -0800
+
 xorg-server (2:1.9.0.902-1ubuntu3) natty; urgency=low
 
   * Add 207_dga_master_device.patch: Cherrypick from upstream xserver git
diff --git a/debian/patches/208_switch_on_release.diff b/debian/patches/208_switch_on_release.diff
new file mode 100644
index 0000000..86a7f5c
--- /dev/null
+++ b/debian/patches/208_switch_on_release.diff
@@ -0,0 +1,109 @@
+diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
+index 2cdb6fc..3ed6263 100644
+--- a/xkb/xkbActions.c
++++ b/xkb/xkbActions.c
+@@ -325,24 +325,83 @@ _XkbFilterLatchState(	XkbSrvInfoPtr	xkbi,
+     return 1;
+ }
+ 
++static int xkbSwitchGroupOnRelease(void)
++{
++    /* TODO: user configuring */
++    return TRUE;
++}
++
++static void xkbUpdateLockedGroup(XkbSrvInfoPtr xkbi, XkbAction* pAction)
++{
++    XkbGroupAction ga = pAction->group;
++    if (ga.flags&XkbSA_GroupAbsolute)
++	xkbi->state.locked_group= XkbSAGroup(&ga);
++    else xkbi->state.locked_group+= XkbSAGroup(&ga);
++}
++
++static XkbFilterPtr _XkbNextFreeFilter(XkbSrvInfoPtr xkbi);
++
+ static int
+-_XkbFilterLockState(	XkbSrvInfoPtr	xkbi,
++_XkbFilterLockGroup(	XkbSrvInfoPtr	xkbi,
+ 			XkbFilterPtr	filter,
+ 			unsigned	keycode,
+ 			XkbAction *	pAction)
+ {
+-    if (pAction&&(pAction->type==XkbSA_LockGroup)) {
+-	if (pAction->group.flags&XkbSA_GroupAbsolute)
+-	     xkbi->state.locked_group= XkbSAGroup(&pAction->group);
+-	else xkbi->state.locked_group+= XkbSAGroup(&pAction->group);
+-	return 1;
++    int sendEvent = 1;
++
++    if (!xkbSwitchGroupOnRelease()) {
++	xkbUpdateLockedGroup(xkbi, pAction);
++	return sendEvent;
++    }
++    
++    /* Delay switch till button release */
++    if (filter->keycode==0) {		/* initial press */
++	filter->keycode = keycode;
++	filter->active = 1;
++	filter->filterOthers = 0; /* for what? */
++	filter->filter = _XkbFilterLockGroup;
++
++	/* filter->priv = 0; */
++	filter->upAction = *pAction;
++
++	/* Ok, now we need to simulate the action which would go if this action didn't block it.
++	   XkbSA_SetMods is the one: it is to set modifier' flag up. */
++	{
++	    XkbStateRec	fake_state = xkbi->state;
++	    XkbAction act;
++
++	    fake_state.mods = 0;
++	    act = XkbGetKeyAction(xkbi, &fake_state, keycode);
++
++	    /* KLUDGE: XkbSA_SetMods only? */
++	    if (act.type == XkbSA_SetMods) { 
++		XkbFilterPtr filter = _XkbNextFreeFilter(xkbi);
++		sendEvent = _XkbFilterSetState(xkbi,filter,keycode,&act);
++	    }
++	}
+     }
++    else {
++  	/* do nothing if some button else is pressed */
++	if (!pAction)
++	    xkbUpdateLockedGroup(xkbi, &filter->upAction);
++	filter->active = 0;
++    }
++
++    return sendEvent;
++}
++
++static int
++_XkbFilterLockMods(	XkbSrvInfoPtr	xkbi,
++			XkbFilterPtr	filter,
++			unsigned	keycode,
++			XkbAction *	pAction)
++{
+     if (filter->keycode==0) {		/* initial press */
+ 	filter->keycode = keycode;
+ 	filter->active = 1;
+ 	filter->filterOthers = 0;
+ 	filter->priv = 0;
+-	filter->filter = _XkbFilterLockState;
++	filter->filter = _XkbFilterLockMods;
+ 	filter->upAction = *pAction;
+ 	xkbi->state.locked_mods^= pAction->mods.mask;
+ 	xkbi->setMods = pAction->mods.mask;
+@@ -1104,9 +1163,12 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev);
+ 		    sendEvent=_XkbFilterLatchState(xkbi,filter,key,&act);
+ 		    break;
+ 		case XkbSA_LockMods:
++		    filter = _XkbNextFreeFilter(xkbi);
++		    sendEvent=_XkbFilterLockMods(xkbi,filter,key,&act);
++		    break;
+ 		case XkbSA_LockGroup:
+ 		    filter = _XkbNextFreeFilter(xkbi);
+-		    sendEvent=_XkbFilterLockState(xkbi,filter,key,&act);
++		    sendEvent=_XkbFilterLockGroup(xkbi,filter,key,&act);
+ 		    break;
+ 		case XkbSA_ISOLock:
+ 		    filter = _XkbNextFreeFilter(xkbi);
diff --git a/debian/patches/series b/debian/patches/series
index 44083d8..3ac9667 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -34,3 +34,4 @@
 204_fix-neg-sync-transition.patch
 206_intel_8xx_default_to_fbdev.patch
 207_dga_master_device.patch
+208_switch_on_release.diff

commit f3da63ec3767cfac1dc896a25f24aaad74a0ffbd
Author: Bryce Harrington <bryce@canonical.com>
Date:   Thu Jan 6 12:19:43 2011 -0800

    Patch for crash bug 597895

diff --git a/debian/changelog b/debian/changelog
index 0fde10f..b0a509b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+xorg-server (2:1.9.0.902-1ubuntu3) natty; urgency=low
+
+  * Add 207_dga_master_device.patch: Cherrypick from upstream xserver git
+    to fix crash with a bluetooth keyboard when using XBMC full screen.
+    (LP: #597895)
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Thu, 06 Jan 2011 12:17:16 -0800
+
 xorg-server (2:1.9.0.902-1ubuntu2) natty; urgency=low
 
   [ Christopher James Halse Rogers ]
diff --git a/debian/patches/207_dga_master_device.patch b/debian/patches/207_dga_master_device.patch
new file mode 100644
index 0000000..185c7cf
--- /dev/null
+++ b/debian/patches/207_dga_master_device.patch
@@ -0,0 +1,27 @@
+diff --git a/mi/mieq.c b/mi/mieq.c
+index fa60b40..af1bc84 100644
+--- a/mi/mieq.c
++++ b/mi/mieq.c
+@@ -320,6 +320,7 @@ CopyGetMasterEvent(DeviceIntPtr sdev,
+ {
+     DeviceIntPtr mdev;
+     int len = original->any.length;
++    int type = original->any.type;
+ 
+     CHECKEVENT(original);
+ 
+@@ -327,7 +328,12 @@ CopyGetMasterEvent(DeviceIntPtr sdev,
+     if (!sdev || !sdev->u.master)
+         return NULL;
+ 
+-    switch(original->any.type)
++#if XFreeXDGA
++    if (type == ET_DGAEvent)
++        type = original->dga_event.subtype;
++#endif
++
++    switch(type)
+     {
+         case ET_KeyPress:
+         case ET_KeyRelease:
+
diff --git a/debian/patches/series b/debian/patches/series
index 171e99b..44083d8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -33,3 +33,4 @@
 203_gestures-extension.patch
 204_fix-neg-sync-transition.patch
 206_intel_8xx_default_to_fbdev.patch
+207_dga_master_device.patch


Reply to: