[oe] [meta-xfce][PATCH 1/1] xfwm4: add patch to fix touch event handling

Ioan-Adrian Ratiu adrian.ratiu at ni.com
Thu Jan 28 10:54:51 UTC 2016


Patch sent upstream, pending acceptance

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu at ni.com>
---
 ...handling-of-touch-events-on-window-border.patch | 42 ++++++++++++++++++++++
 meta-xfce/recipes-xfce/xfwm4/xfwm4_4.12.3.bb       |  6 +++-
 2 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 meta-xfce/recipes-xfce/xfwm4/files/0001-events-fix-handling-of-touch-events-on-window-border.patch

diff --git a/meta-xfce/recipes-xfce/xfwm4/files/0001-events-fix-handling-of-touch-events-on-window-border.patch b/meta-xfce/recipes-xfce/xfwm4/files/0001-events-fix-handling-of-touch-events-on-window-border.patch
new file mode 100644
index 0000000..e01aac5
--- /dev/null
+++ b/meta-xfce/recipes-xfce/xfwm4/files/0001-events-fix-handling-of-touch-events-on-window-border.patch
@@ -0,0 +1,42 @@
+From cb966e51ea51088a1d4fd5914fc7f917684e0b51 Mon Sep 17 00:00:00 2001
+From: Ioan-Adrian Ratiu <adrian.ratiu at ni.com>
+Date: Thu, 28 Jan 2016 11:43:01 +0200
+Subject: [PATCH] events: fix handling of touch events on window borders
+
+When the Xorg server translates touch events into ButtonPress/ButtonRelease
+events, the subwindow in the XEvent structure is set to zero. This change adds
+a querry to determine the subwindow for the event in case it is missing.
+
+Original patch & discussion at [1].
+
+Upstream-Status: Pending acceptance
+
+[1] http://xfce.10915.n7.nabble.com/Re-Xfwm-window-borders-do-not-respond-to-touch-screen-td42357.html
+
+Signed-off-by: Gratian Crisan <gratian.crisan at ni.com>
+Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu at ni.com>
+---
+ src/events.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/events.c b/src/events.c
+index 8aa0f0a..0565594 100644
+--- a/src/events.c
++++ b/src/events.c
+@@ -917,6 +917,13 @@ handleButtonPress (DisplayInfo *display_info, XButtonEvent * ev)
+     {
+         state = ev->state & MODIFIER_MASK;
+         win = ev->subwindow;
++        if (!win) {
++                Window root_ret;
++                int rx,ry,wx,wy;
++                unsigned int mask_ret;
++                XQueryPointer(display_info->dpy, ev->window,
++                              &root_ret, &win, &rx, &ry, &wx, &wy, &mask_ret);
++        }
+         screen_info = c->screen_info;
+ 
+         if ((ev->button == Button1) && (state) && (state == screen_info->params->easy_click))
+-- 
+2.7.0
+
diff --git a/meta-xfce/recipes-xfce/xfwm4/xfwm4_4.12.3.bb b/meta-xfce/recipes-xfce/xfwm4/xfwm4_4.12.3.bb
index 41daa00..aa4b290 100644
--- a/meta-xfce/recipes-xfce/xfwm4/xfwm4_4.12.3.bb
+++ b/meta-xfce/recipes-xfce/xfwm4/xfwm4_4.12.3.bb
@@ -6,7 +6,11 @@ DEPENDS = "virtual/libx11 libxpm gtk+ libxfce4util libxfce4ui xfconf libwnck dbu
 
 inherit xfce update-alternatives
 
-SRC_URI += "file://0001-don-t-block-display-events-when-time-is-set-backward.patch"
+SRC_URI += " \
+    file://0001-don-t-block-display-events-when-time-is-set-backward.patch \
+    file://0001-events-fix-handling-of-touch-events-on-window-border.patch \
+"
+
 SRC_URI[md5sum] = "197ef087ca6a263627f1bea6d5a79d6f"
 SRC_URI[sha256sum] = "f4a988fbc4e0df7e8583c781d271559e56fd28696092f94ae052e9e6edb09eac"
 
-- 
2.7.0




More information about the Openembedded-devel mailing list