Merge ~3v1n0/ubuntu/+source/gnome-shell:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-shell:ubuntu/master

Proposed by Marco Trevisan (Treviño) on 2018-10-30
Status: Merged
Merged at revision: 6c34d00299b3742b872a761e9b47bb664c4c7179
Proposed branch: ~3v1n0/ubuntu/+source/gnome-shell:ubuntu/master
Merge into: ~ubuntu-desktop/ubuntu/+source/gnome-shell:ubuntu/master
Diff against target: 81 lines (+48/-0)
3 files modified
debian/changelog (+5/-0)
debian/patches/series (+1/-0)
debian/patches/st-button-Ignore-pointer-emulated-touch-events.patch (+42/-0)
Reviewer Review Type Date Requested Status
Didier Roche 2018-10-30 Approve on 2018-10-30
Review via email: mp+357992@code.launchpad.net
To post a comment you must log in.
Didier Roche (didrocks) wrote :

Makes sense, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index ecf0df1..1bcb1a6 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,5 +1,6 @@
6 gnome-shell (3.30.1-2ubuntu2) UNRELEASED; urgency=medium
7
8+ [ Didier Roche ]
9 * debian/patches/ubuntu/background_login.patch:
10 - match Yaru theme in the ubuntu session instead of our previous GDM
11 background (LP: #1789356)
12@@ -7,6 +8,10 @@ gnome-shell (3.30.1-2ubuntu2) UNRELEASED; urgency=medium
13 - ensure we resolve finale theme file path to correctly load assets
14 under gdm (LP: #1798747)
15
16+ [ Marco Trevisan (Treviño) ]
17+ * debian/patches/st-button-Ignore-pointer-emulated-touch-events.patch:
18+ - Don't emit two click events on touch under X11 (LP: #1745888)
19+
20 -- Didier Roche <didrocks@ubuntu.com> Wed, 17 Oct 2018 14:58:42 +0200
21
22 gnome-shell (3.30.1-2ubuntu1) cosmic; urgency=medium
23diff --git a/debian/patches/series b/debian/patches/series
24index 2d27e92..8a58fee 100644
25--- a/debian/patches/series
26+++ b/debian/patches/series
27@@ -18,5 +18,6 @@ main-add-backtrace-crashes-all-and-backtrace-all.patch
28 sessionMode-add-support-for-debugFlags-parameter.patch
29 st-scroll-view-Handle-the-case-where-scrollbars-are-NULL.patch
30 st-scroll-view-Remove-scrollbars-references-on-dispose.patch
31+st-button-Ignore-pointer-emulated-touch-events.patch
32 ubuntu/search-call-XUbuntuCancel-method-on-providers-when-no-dat.patch
33 ubuntu/resolve_alternate_theme_path.patch
34diff --git a/debian/patches/st-button-Ignore-pointer-emulated-touch-events.patch b/debian/patches/st-button-Ignore-pointer-emulated-touch-events.patch
35new file mode 100644
36index 0000000..538bb17
37--- /dev/null
38+++ b/debian/patches/st-button-Ignore-pointer-emulated-touch-events.patch
39@@ -0,0 +1,42 @@
40+From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
41+Date: Thu, 25 Oct 2018 06:35:25 +0200
42+Subject: st-button: Ignore pointer emulated touch events
43+
44+In X11, pointer emulated touch events are replicated with normal PRESS, RELEASE
45+pair events which are generated by the server. Thus for a single tap we get:
46+ - TOUCH_BEGIN -> TOUCH_END, PRESS -> RELEASE
47+
48+This will cause st-button to send two "clicked" signals, instead of just one,
49+breaking extensions (like dash-to-dock) that show buttons in the main stage
50+which will be checked two times or that will receive the same signal two times.
51+
52+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1745888
53+Forwarded: yes, https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/272
54+---
55+ src/st/st-button.c | 7 +++++--
56+ 1 file changed, 5 insertions(+), 2 deletions(-)
57+
58+diff --git a/src/st/st-button.c b/src/st/st-button.c
59+index 8f5c492..a3a7b24 100644
60+--- a/src/st/st-button.c
61++++ b/src/st/st-button.c
62+@@ -248,14 +248,17 @@ st_button_touch_event (ClutterActor *actor,
63+ if (event->type == CLUTTER_TOUCH_BEGIN && !priv->press_sequence)
64+ {
65+ clutter_input_device_sequence_grab (device, sequence, actor);
66+- st_button_press (button, device, 0, sequence);
67++ if (!clutter_event_is_pointer_emulated ((ClutterEvent*) event))
68++ st_button_press (button, device, 0, sequence);
69+ return CLUTTER_EVENT_STOP;
70+ }
71+ else if (event->type == CLUTTER_TOUCH_END &&
72+ priv->device == device &&
73+ priv->press_sequence == sequence)
74+ {
75+- st_button_release (button, device, mask, 0, sequence);
76++ if (!clutter_event_is_pointer_emulated ((ClutterEvent*) event))
77++ st_button_release (button, device, mask, 0, sequence);
78++
79+ clutter_input_device_sequence_ungrab (device, sequence);
80+ return CLUTTER_EVENT_STOP;
81+ }

Subscribers

People subscribed via source and target branches