All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-xfce][PATCH 1/1] xfwm4: add patch to fix touch event handling
@ 2016-01-28 10:54 Ioan-Adrian Ratiu
  2016-01-28 11:52 ` Andreas Müller
  0 siblings, 1 reply; 6+ messages in thread
From: Ioan-Adrian Ratiu @ 2016-01-28 10:54 UTC (permalink / raw)
  To: openembedded-devel

Patch sent upstream, pending acceptance

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@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@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@ni.com>
+Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [meta-xfce][PATCH 1/1] xfwm4: add patch to fix touch event handling
  2016-01-28 10:54 [meta-xfce][PATCH 1/1] xfwm4: add patch to fix touch event handling Ioan-Adrian Ratiu
@ 2016-01-28 11:52 ` Andreas Müller
  2016-01-28 13:29   ` Ioan-Adrian Ratiu
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Müller @ 2016-01-28 11:52 UTC (permalink / raw)
  To: openembedded-devel

On Thu, Jan 28, 2016 at 11:54 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com> wrote:
> Patch sent upstream, pending acceptance
>
> Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@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@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@ni.com>
> +Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@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
>
I've checked the thread you point to: I am using xfce for touch
screens and can resize windows, maximize them, move around and close
them all with touch. What kind of error is fixed?

Andreas


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-xfce][PATCH 1/1] xfwm4: add patch to fix touch event handling
  2016-01-28 11:52 ` Andreas Müller
@ 2016-01-28 13:29   ` Ioan-Adrian Ratiu
  2016-01-28 14:01     ` Andreas Müller
  0 siblings, 1 reply; 6+ messages in thread
From: Ioan-Adrian Ratiu @ 2016-01-28 13:29 UTC (permalink / raw)
  To: openembedded-devel

On Thu, 28 Jan 2016 12:52:06 +0100
Andreas Müller <schnitzeltony@googlemail.com> wrote:

> On Thu, Jan 28, 2016 at 11:54 AM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com> wrote:
> > Patch sent upstream, pending acceptance
> >
> > Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@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@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@ni.com>
> > +Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@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
> >  
> I've checked the thread you point to: I am using xfce for touch
> screens and can resize windows, maximize them, move around and close
> them all with touch. What kind of error is fixed?

Thank you for challenging this, it helped bring more light on the issue.
It is a workaround the bug [1] in xserver which was fixed. More details here [2]
I did not knew this untill I asked on the xfwm bugzilla.

So instead of "fixing" it here, we should try to backport that fix to OE or verify
if it's not contained in OE's xserver already since it's working for you :)

[1] http://cgit.freedesktop.org/xorg/xserver/commit/?id=24b943132f
[2] https://bugzilla.xfce.org/show_bug.cgi?id=12427

> 
> Andreas



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-xfce][PATCH 1/1] xfwm4: add patch to fix touch event handling
  2016-01-28 13:29   ` Ioan-Adrian Ratiu
@ 2016-01-28 14:01     ` Andreas Müller
  2016-01-28 14:14       ` Ioan-Adrian Ratiu
  2016-01-28 14:17       ` Ioan-Adrian Ratiu
  0 siblings, 2 replies; 6+ messages in thread
From: Andreas Müller @ 2016-01-28 14:01 UTC (permalink / raw)
  To: openembedded-devel

On Thu, Jan 28, 2016 at 2:29 PM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com> wrote:
>> I've checked the thread you point to: I am using xfce for touch
>> screens and can resize windows, maximize them, move around and close
>> them all with touch. What kind of error is fixed?
>
> Thank you for challenging this, it helped bring more light on the issue.
> It is a workaround the bug [1] in xserver which was fixed. More details here [2]
> I did not knew this untill I asked on the xfwm bugzilla.
>
> So instead of "fixing" it here, we should try to backport that fix to OE or verify
> if it's not contained in OE's xserver already since it's working for you :)
>
> [1] http://cgit.freedesktop.org/xorg/xserver/commit/?id=24b943132f
This is the correct fix and - I checked in source - is included in
xserver-xorg 1.17.2. That version is shipped with jethro I am working
with currently. Don't know when it came in (for elder oe-core
releases) but master and jethro don't need to fix.

Andreas


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-xfce][PATCH 1/1] xfwm4: add patch to fix touch event handling
  2016-01-28 14:01     ` Andreas Müller
@ 2016-01-28 14:14       ` Ioan-Adrian Ratiu
  2016-01-28 14:17       ` Ioan-Adrian Ratiu
  1 sibling, 0 replies; 6+ messages in thread
From: Ioan-Adrian Ratiu @ 2016-01-28 14:14 UTC (permalink / raw)
  To: openembedded-devel

On Thu, 28 Jan 2016 15:01:04 +0100
Andreas Müller <schnitzeltony@googlemail.com> wrote:

> On Thu, Jan 28, 2016 at 2:29 PM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com> wrote:
> >> I've checked the thread you point to: I am using xfce for touch
> >> screens and can resize windows, maximize them, move around and close
> >> them all with touch. What kind of error is fixed?  
> >
> > Thank you for challenging this, it helped bring more light on the issue.
> > It is a workaround the bug [1] in xserver which was fixed. More details here [2]
> > I did not knew this untill I asked on the xfwm bugzilla.
> >
> > So instead of "fixing" it here, we should try to backport that fix to OE or verify
> > if it's not contained in OE's xserver already since it's working for you :)
> >
> > [1] http://cgit.freedesktop.org/xorg/xserver/commit/?id=24b943132f  
> This is the correct fix and - I checked in source - is included in
> xserver-xorg 1.17.2. That version is shipped with jethro I am working
> with currently. Don't know when it came in (for elder oe-core
> releases) but master and jethro don't need to fix.

Superb! I was going to look into it tommorow morning at the earliest, I'm pretty caught up now.
Thank you for verifying this.

> 
> Andreas



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-xfce][PATCH 1/1] xfwm4: add patch to fix touch event handling
  2016-01-28 14:01     ` Andreas Müller
  2016-01-28 14:14       ` Ioan-Adrian Ratiu
@ 2016-01-28 14:17       ` Ioan-Adrian Ratiu
  1 sibling, 0 replies; 6+ messages in thread
From: Ioan-Adrian Ratiu @ 2016-01-28 14:17 UTC (permalink / raw)
  To: Andreas Müller; +Cc: openembedded-devel

On Thu, 28 Jan 2016 15:01:04 +0100
Andreas Müller <schnitzeltony@googlemail.com> wrote:

> On Thu, Jan 28, 2016 at 2:29 PM, Ioan-Adrian Ratiu <adrian.ratiu@ni.com> wrote:
> >> I've checked the thread you point to: I am using xfce for touch
> >> screens and can resize windows, maximize them, move around and close
> >> them all with touch. What kind of error is fixed?  
> >
> > Thank you for challenging this, it helped bring more light on the issue.
> > It is a workaround the bug [1] in xserver which was fixed. More details here [2]
> > I did not knew this untill I asked on the xfwm bugzilla.
> >
> > So instead of "fixing" it here, we should try to backport that fix to OE or verify
> > if it's not contained in OE's xserver already since it's working for you :)
> >
> > [1] http://cgit.freedesktop.org/xorg/xserver/commit/?id=24b943132f  
> This is the correct fix and - I checked in source - is included in
> xserver-xorg 1.17.2. That version is shipped with jethro I am working
> with currently. Don't know when it came in (for elder oe-core
> releases) but master and jethro don't need to fix.
> 
> Andreas

By the way I just realized you're probably the same person to whom I've sent a pull request on github this morning *nod* *nod* (your email name and his github username are the same)

How small is this world :)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-28 14:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-28 10:54 [meta-xfce][PATCH 1/1] xfwm4: add patch to fix touch event handling Ioan-Adrian Ratiu
2016-01-28 11:52 ` Andreas Müller
2016-01-28 13:29   ` Ioan-Adrian Ratiu
2016-01-28 14:01     ` Andreas Müller
2016-01-28 14:14       ` Ioan-Adrian Ratiu
2016-01-28 14:17       ` Ioan-Adrian Ratiu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.