[Merge] ~3v1n0/ubuntu/+source/gnome-shell:ubuntu/bionic-touch-two-clicks-fix into ~ubuntu-desktop/ubuntu/+source/gnome-shell:ubuntu/bionic

2018-10-30 Thread Treviño
Marco Trevisan (Treviño) has proposed merging 
~3v1n0/ubuntu/+source/gnome-shell:ubuntu/bionic-touch-two-clicks-fix into 
~ubuntu-desktop/ubuntu/+source/gnome-shell:ubuntu/bionic with 
~3v1n0/ubuntu/+source/gnome-shell:ubuntu/bionic-theming-fixes as a prerequisite.

Requested reviews:
  Ubuntu Desktop (ubuntu-desktop)
Related bugs:
  Bug #1739931 in gnome-shell (Ubuntu): "Separator lines in shell popup menus 
are too faint to see"
  https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1739931
  Bug #1743058 in gnome-shell (Ubuntu): "Input field height changes slightly 
when entering in st password fields."
  https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1743058
  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/357993
-- 
Your team Ubuntu Desktop is requested to review the proposed merge of 
~3v1n0/ubuntu/+source/gnome-shell:ubuntu/bionic-touch-two-clicks-fix into 
~ubuntu-desktop/ubuntu/+source/gnome-shell:ubuntu/bionic.
diff --git a/debian/changelog b/debian/changelog
index 0ce4a7d..c6ad925 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ gnome-shell (3.28.3-0ubuntu0.18.04.3) UNRELEASED; urgency=medium
   * debian/ubuntu.css:
 - use defined color for menu separators (LP: #1739931)
 - set StEntry minimun height to work properly with Ubuntu font (LP: #1743058)
+  * debian/patches/st-button-Ignore-pointer-emulated-touch-events.patch:
+- Don't emit two click events on touch under X11 (LP: #1745888)
 
  -- Marco Trevisan (Treviño)   Wed, 03 Oct 2018 00:50:42 +0200
 
diff --git a/debian/patches/series b/debian/patches/series
index ad2c4be..217740f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -25,4 +25,5 @@ popupMenu-Don-t-handle-key-presses-directly-if-there-are-.patch
 viewSelector-Cancel-search-on-overview-hidden.patch
 search-Cancel-search-provider-operations-on-clear.patch
 search-Ignore-search-provider-results-metas-if-search-is-.patch
+st-button-Ignore-pointer-emulated-touch-events.patch
 ubuntu/search-call-XUbuntuCancel-method-on-providers-when-no-dat.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 000..538bb17
--- /dev/null
+++ b/debian/patches/st-button-Ignore-pointer-emulated-touch-events.patch
@@ -0,0 +1,42 @@
+From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= 
+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
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


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

2018-10-30 Thread Treviño
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   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 000..538bb17
--- /dev/null
+++ b/debian/patches/st-button-Ignore-pointer-emulated-touch-events.patch
@@ -0,0 +1,42 @@
+From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= 
+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
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop