From 2bb166e8c0b63310df79af60cc7df5b9159c5bee Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mar 08 2012 23:26:03 +0000 Subject: Fix fdo bug 44079, XI2 focus events missing on immediate parent of the focus window --- diff --git a/0001-dix-on-PointerRootWin-send-a-FocusIn-to-the-sprite-w.patch b/0001-dix-on-PointerRootWin-send-a-FocusIn-to-the-sprite-w.patch new file mode 100644 index 0000000..d5f196f --- /dev/null +++ b/0001-dix-on-PointerRootWin-send-a-FocusIn-to-the-sprite-w.patch @@ -0,0 +1,32 @@ +From 3ce102c362cadcd7087bdcf48440d9498eaf77d0 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 5 Jan 2012 07:08:01 -0500 +Subject: [PATCH] dix: on PointerRootWin send a FocusIn to the sprite window + too + +XTS XSetDeviceFocus-7 + +Signed-off-by: Peter Hutterer +Reviewed-by: Chase Douglas +--- + dix/enterleave.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/dix/enterleave.c b/dix/enterleave.c +index 2b8c7c5..89a82ab 100644 +--- a/dix/enterleave.c ++++ b/dix/enterleave.c +@@ -1299,7 +1299,10 @@ DeviceFocusEvents(DeviceIntPtr dev, + for (i = 0; i < nscreens; i++) + DeviceFocusEvent(dev, XI_FocusIn, mode, in, screenInfo.screens[i]->root); + if (to == PointerRootWin) ++ { + DeviceFocusInEvents(dev, GetCurrentRootWindow(dev), sprite->win, mode, NotifyPointer); ++ DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyPointer, sprite->win); ++ } + } + else + { +-- +1.7.7.6 + diff --git a/0001-dix-send-focus-events-to-the-immediate-parent-44079.patch b/0001-dix-send-focus-events-to-the-immediate-parent-44079.patch new file mode 100644 index 0000000..c6d580c --- /dev/null +++ b/0001-dix-send-focus-events-to-the-immediate-parent-44079.patch @@ -0,0 +1,52 @@ +From a125aabda3a5cf27aa98cb61f16e49280b66f451 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 5 Jan 2012 07:02:51 -0500 +Subject: [PATCH] dix: send focus events to the immediate parent (#44079) + +For a transition from windows A to B, A->parent did not receive an event. +DeviceFocusOutEvents sends to windows ]from, to[, so start with the actual +window, not it's parent. + +X.Org Bug 44079 + +Signed-off-by: Peter Hutterer +Reviewed-by: Chase Douglas +Reviewed-by: Keith Packard +--- + dix/enterleave.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/dix/enterleave.c b/dix/enterleave.c +index a39e640..2b8c7c5 100644 +--- a/dix/enterleave.c ++++ b/dix/enterleave.c +@@ -1292,7 +1292,7 @@ DeviceFocusEvents(DeviceIntPtr dev, + NotifyPointer); + DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); + /* next call catches the root too, if the screen changed */ +- DeviceFocusOutEvents(dev, from->parent, NullWindow, mode, ++ DeviceFocusOutEvents(dev, from, NullWindow, mode, + NotifyNonlinearVirtual); + } + /* Notify all the roots */ +@@ -1321,7 +1321,7 @@ DeviceFocusEvents(DeviceIntPtr dev, + if (IsParent(to, from)) + { + DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyAncestor, from); +- DeviceFocusOutEvents(dev, from->parent, to, mode, ++ DeviceFocusOutEvents(dev, from, to, mode, + NotifyVirtual); + DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyInferior, to); + if ((IsParent(to, sprite->win)) && +@@ -1353,7 +1353,7 @@ DeviceFocusEvents(DeviceIntPtr dev, + NotifyPointer); + DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); + if (from->parent != NullWindow) +- DeviceFocusOutEvents(dev, from->parent, common, mode, ++ DeviceFocusOutEvents(dev, from, common, mode, + NotifyNonlinearVirtual); + if (to->parent != NullWindow) + DeviceFocusInEvents(dev, common, to, mode, NotifyNonlinearVirtual); +-- +1.7.7.6 + diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index f257fac..a217d4e 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -30,7 +30,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.11.4 -Release: 1%{?gitdate:.%{gitdate}}%{dist} +Release: 2%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -87,6 +87,10 @@ Patch7007: xserver-1.10.99.1-test.patch # Submitted to upstream but not merged for 1.11 Patch7009: xserver-1.10.99-config-add-udev-systemd-multi-seat-support.patch +# fdo Bug 44079 - XI2 FocusOut events missing parent of focus'd window +Patch7010: 0001-dix-send-focus-events-to-the-immediate-parent-44079.patch +Patch7011: 0001-dix-on-PointerRootWin-send-a-FocusIn-to-the-sprite-w.patch + %define moduledir %{_libdir}/xorg/modules %define drimoduledir %{_libdir}/dri %define sdkdir %{_includedir}/xorg @@ -551,6 +555,10 @@ rm -rf $RPM_BUILD_ROOT %{xserver_source_dir} %changelog +* Fri Mar 09 2012 Peter Hutterer 1.11.4-2 +- Fix fdo bug 44079, XI2 focus events missing on immediate parent of the + focus window + * Thu Feb 09 2012 Peter Hutterer 1.11.4-1 - xserver 1.11.4 - xserver-1.11.2-record-crasher.patch: drop, 53e347b22bb7