Marco Trevisan (Treviño) has proposed merging 
~3v1n0/ubuntu/+source/gnome-shell:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-shell:ubuntu/master.

Requested reviews:
  Ubuntu Desktop (ubuntu-desktop)
Related bugs:
  Bug #1745888 in gnome-shell (Ubuntu): "Two instances of a program launch 
whenever you touch a favorites icon"
  https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1745888

For more details, see:
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-shell/+git/gnome-shell/+merge/357992
-- 
Your team Ubuntu Desktop is requested to review the proposed merge of 
~3v1n0/ubuntu/+source/gnome-shell:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-shell:ubuntu/master.
diff --git a/debian/changelog b/debian/changelog
index ecf0df1..1bcb1a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 gnome-shell (3.30.1-2ubuntu2) UNRELEASED; urgency=medium
 
+  [ Didier Roche ]
   * debian/patches/ubuntu/background_login.patch:
     - match Yaru theme in the ubuntu session instead of our previous GDM
       background (LP: #1789356)
@@ -7,6 +8,10 @@ gnome-shell (3.30.1-2ubuntu2) UNRELEASED; urgency=medium
     - ensure we resolve finale theme file path to correctly load assets
       under gdm (LP: #1798747)
 
+  [ Marco Trevisan (Treviño) ]
+  * debian/patches/st-button-Ignore-pointer-emulated-touch-events.patch:
+    - Don't emit two click events on touch under X11 (LP: #1745888)
+
  -- Didier Roche <[email protected]>  Wed, 17 Oct 2018 14:58:42 +0200
 
 gnome-shell (3.30.1-2ubuntu1) cosmic; urgency=medium
diff --git a/debian/patches/series b/debian/patches/series
index 2d27e92..8a58fee 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -18,5 +18,6 @@ main-add-backtrace-crashes-all-and-backtrace-all.patch
 sessionMode-add-support-for-debugFlags-parameter.patch
 st-scroll-view-Handle-the-case-where-scrollbars-are-NULL.patch
 st-scroll-view-Remove-scrollbars-references-on-dispose.patch
+st-button-Ignore-pointer-emulated-touch-events.patch
 ubuntu/search-call-XUbuntuCancel-method-on-providers-when-no-dat.patch
 ubuntu/resolve_alternate_theme_path.patch
diff --git a/debian/patches/st-button-Ignore-pointer-emulated-touch-events.patch b/debian/patches/st-button-Ignore-pointer-emulated-touch-events.patch
new file mode 100644
index 0000000..538bb17
--- /dev/null
+++ b/debian/patches/st-button-Ignore-pointer-emulated-touch-events.patch
@@ -0,0 +1,42 @@
+From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <[email protected]>
+Date: Thu, 25 Oct 2018 06:35:25 +0200
+Subject: st-button: Ignore pointer emulated touch events
+
+In X11, pointer emulated touch events are replicated with normal PRESS, RELEASE
+pair events which are generated by the server. Thus for a single tap we get:
+ - TOUCH_BEGIN -> TOUCH_END, PRESS -> RELEASE
+
+This will cause st-button to send two "clicked" signals, instead of just one,
+breaking extensions (like dash-to-dock) that show buttons in the main stage
+which will be checked two times or that will receive the same signal two times.
+
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1745888
+Forwarded: yes, https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/272
+---
+ src/st/st-button.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/st/st-button.c b/src/st/st-button.c
+index 8f5c492..a3a7b24 100644
+--- a/src/st/st-button.c
++++ b/src/st/st-button.c
+@@ -248,14 +248,17 @@ st_button_touch_event (ClutterActor      *actor,
+   if (event->type == CLUTTER_TOUCH_BEGIN && !priv->press_sequence)
+     {
+       clutter_input_device_sequence_grab (device, sequence, actor);
+-      st_button_press (button, device, 0, sequence);
++      if (!clutter_event_is_pointer_emulated ((ClutterEvent*) event))
++        st_button_press (button, device, 0, sequence);
+       return CLUTTER_EVENT_STOP;
+     }
+   else if (event->type == CLUTTER_TOUCH_END &&
+            priv->device == device &&
+            priv->press_sequence == sequence)
+     {
+-      st_button_release (button, device, mask, 0, sequence);
++      if (!clutter_event_is_pointer_emulated ((ClutterEvent*) event))
++        st_button_release (button, device, mask, 0, sequence);
++
+       clutter_input_device_sequence_ungrab (device, sequence);
+       return CLUTTER_EVENT_STOP;
+     }
-- 
ubuntu-desktop mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop

Reply via email to