After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781738 - Need to click twice in shutdown menu
Need to click twice in shutdown menu
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.24.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 781783 782599 784880 787138 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-04-25 19:34 UTC by Jan Niklas Hasse (Account disabled)
Modified: 2019-02-27 18:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
system: Emulate click action button release (1.72 KB, patch)
2017-06-18 00:28 UTC, Florian Müllner
committed Details | Review

Description Jan Niklas Hasse (Account disabled) 2017-04-25 19:34:48 UTC
Since updating to 3.24 I know need to click twice in the shutdown dialog in order for the clicks to get recognized. Changing the focus with the Tab key also works only after the first click.
Comment 1 Florian Müllner 2017-04-25 21:27:50 UTC
To rule out bug 775869, please use something like

 $ dbus-monitor interface=org.gnome.SessionManager.EndSessionDialog

to see whether the gnome-session side requests a second dialog.
Comment 2 Jan Niklas Hasse (Account disabled) 2017-04-26 09:27:30 UTC
method call time=1493198791.738556 sender=:1.16 -> destination=:1.21 serial=1050 path=/org/gnome/SessionManager/EndSessionDialog; interface=org.gnome.SessionManager.EndSessionDialog; member=Open
   uint32 1
   uint32 0
   uint32 60
   array [
      object path "/org/gnome/SessionManager/Inhibitor64"
      object path "/org/gnome/SessionManager/Inhibitor66"
   ]
signal time=1493198793.610681 sender=:1.21 -> destination=(null destination) serial=1843 path=/org/gnome/SessionManager/EndSessionDialog; interface=org.gnome.SessionManager.EndSessionDialog; member=Canceled
signal time=1493198793.613253 sender=:1.21 -> destination=(null destination) serial=1844 path=/org/gnome/SessionManager/EndSessionDialog; interface=org.gnome.SessionManager.EndSessionDialog; member=Closed
Comment 3 Florian Müllner 2017-04-26 17:52:13 UTC
*** Bug 781783 has been marked as a duplicate of this bug. ***
Comment 4 Jeremy Bicha 2017-05-13 16:22:18 UTC
*** Bug 782599 has been marked as a duplicate of this bug. ***
Comment 5 Inactive account 2017-05-13 16:29:23 UTC
Previously this only affected the Shutdown and Restart buttons for me, however for some reason starting today the Cancel button is now also affected.
Comment 6 Inactive account 2017-05-13 16:30:01 UTC
Someone else also reported this issue downstream here: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1683867 So a lot of people seem to have the issue.
Comment 7 Strangiato 2017-05-13 17:32:15 UTC
I can confirm this bug on Arch running Gnome 3.24.2.
Comment 8 slatchurie 2017-05-27 01:34:47 UTC
I did some tests, it seems the bug appeared with :

commit 2c070d38fb417dced66bf8589c4caa66bbd2d9ed
system: Switch between alternatives on long-press
Comment 9 Vladimir Stoyakin 2017-06-14 18:03:17 UTC
I don't know whether it is related, but this bug present on my machine with nouveau video driver and not present on machine with intel driver. And, just for clarity, first click may be executed in any point of screen, after that buttons become active.
Comment 10 Inactive account 2017-06-14 18:05:56 UTC
I have Intel drivers on this machine and the bug is present as well so I don't think it's driver vendor specific. Though I can confirm that the first click can be done anywhere on the screen, just not 'Cancel' button, because for some reason a single click works on that button at least for me!
Comment 11 Jan Niklas Hasse (Account disabled) 2017-06-14 18:23:44 UTC
I can confirm this bug with the radeon driver.
Comment 12 Vladimir Stoyakin 2017-06-15 16:55:58 UTC
Fact #1: this bug reproducible under both X and wayland sessions.
Fact #2: buttons become active after 10 seconds without additional click. Can someone else confirm this behavior?

Archlinux
gnome-shell 3.24.2-1
libinput 1.7.2-1
mesa 17.1.1-1
Comment 13 Florian Müllner 2017-06-15 16:58:47 UTC
FWIW, I've tried to reproduce this issue in a VM and wasn't able to - after rebooting five times in a row, I stopped trying ...
Comment 14 slatchurie 2017-06-15 17:09:14 UTC
(In reply to Florian Müllner from comment #13)
> FWIW, I've tried to reproduce this issue in a VM and wasn't able to - after
> rebooting five times in a row, I stopped trying ...

I can reproduce this with a live usb of ubuntu gnome 17.04 and fedora 26 alpha on NVIDIA and Intel. Also on a jhbuild gnome session on real hardware.

The problem seems to be triggered by the Clutter.ClickAction in the AltSwitcher. As soon as I remove it, I don't have to click twice (of course, the long press doesn't work anymore).
Comment 15 Vladimir Stoyakin 2017-06-15 17:32:50 UTC
(In reply to Florian Müllner from comment #13)
> FWIW, I've tried to reproduce this issue in a VM and wasn't able to - after
> rebooting five times in a row, I stopped trying ...

Maybe special patch for debug output would be helpful?
Comment 16 Saurav Sengupta 2017-06-15 19:13:32 UTC
(In reply to Vladimir Stoyakin from comment #12)
> Fact #2: buttons become active after 10 seconds without additional click.
> Can someone else confirm this behavior?

Buttons do NOT become active after any amount of time on my system with Fedora 26, gnome-shell 3.24.2-1.
Comment 17 Mark Blakeney 2017-06-15 21:15:46 UTC
Those buttons don't become active after time for me either on both my Intel desktop PC and my Dell XPS 13 (9343) where this problem happens 100% repeatably since GNOME 3.24. Running up to date Arch Linux (gnome-shell 3.24.2-1). The problem still occurs after disabling all extensions and cleanly rebooting.

This bug is re-programming me to double click those buttons for the rest of my life regardless of if/when it gets fixed :(
Comment 18 Florian Müllner 2017-06-16 15:14:51 UTC
(In reply to slatchurie from comment #14)
> The problem seems to be triggered by the Clutter.ClickAction in the
> AltSwitcher.

That's a data point, but not enough, otherwise the issue would reproduce for me as well - I've still been unsuccessful (VM and real hardware, touchpad and mouse, X11 and wayland) ...

In any case, given that this sounds like a grab issue in relation to the click action, I'll take a guess - does this patch make a difference:

diff --git a/js/ui/status/system.js b/js/ui/status/system.js
index 02b683075..500ff85c5 100644
--- a/js/ui/status/system.js
+++ b/js/ui/status/system.js
@@ -55,7 +55,10 @@ const AltSwitcher = new Lang.Class({

         this.actor = new St.Bin();
         this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
-        this.actor.connect('notify::mapped', () => { this._flipped = false; });
+        this.actor.connect('notify::mapped', () => {
+            this._flipped = false;
+            this._clickAction.release();
+        });
     },

     _sync: function() {
Comment 19 slatchurie 2017-06-16 16:27:43 UTC
(In reply to Florian Müllner from comment #18)
> (In reply to slatchurie from comment #14)
> > The problem seems to be triggered by the Clutter.ClickAction in the
> > AltSwitcher.
> 
> That's a data point, but not enough, otherwise the issue would reproduce for
> me as well - I've still been unsuccessful (VM and real hardware, touchpad
> and mouse, X11 and wayland) ...

That's strange because it happens everywhere for me. I haven't tested in a VM though.
Unfortunately, I don't know how to debug gnome-shell/clutter yet.

> In any case, given that this sounds like a grab issue in relation to the
> click action, I'll take a guess - does this patch make a difference:
> 
> diff --git a/js/ui/status/system.js b/js/ui/status/system.js
> index 02b683075..500ff85c5 100644
> --- a/js/ui/status/system.js
> +++ b/js/ui/status/system.js
> @@ -55,7 +55,10 @@ const AltSwitcher = new Lang.Class({
> 
>          this.actor = new St.Bin();
>          this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
> -        this.actor.connect('notify::mapped', () => { this._flipped = false;
> });
> +        this.actor.connect('notify::mapped', () => {
> +            this._flipped = false;
> +            this._clickAction.release();
> +        });
>      },
> 
>      _sync: function() {

And that's a good guess.
I have tested it in a jhbuild session and  trithis does theck for me.
Thanks.
Comment 20 Vladimir Stoyakin 2017-06-16 17:54:32 UTC
(In reply to Florian Müllner from comment #18)
> In any case, given that this sounds like a grab issue in relation to the
> click action, I'll take a guess - does this patch make a difference:

Confirmed. Patch works for me too.
Thanks.
Comment 21 Mark Blakeney 2017-06-16 23:16:59 UTC
Applied the patch to both my desktop PC and my notebook and it fixes the problem.
Comment 22 Florian Müllner 2017-06-18 00:28:24 UTC
Created attachment 353969 [details] [review]
system: Emulate click action button release

Since commit 2c070d38, we add a ClickAction to the visible AltSwitcher
button to track long-presses. As a result, we now have two components
that will grab and ungrab the pointer for the button, so to make sure
we don't end up with a stuck grab, we need to release the second's
component grab when the first activates.

Currently we only drop the StButton grab on long-press, we also need
to cancel any initiated long-press on click.
Comment 23 Florian Müllner 2017-06-18 00:33:44 UTC
The attached patch *should* do the same as the one pasted earlier, but I did change it a bit to make more sense, so retesting would be highly appreciated.

(Given that I cannot test it myself - I still don't understand under what exact conditions the issue occurs, which makes me slightly uncomfortable ...)
Comment 24 Mark Blakeney 2017-06-18 00:48:09 UTC
That second patch also fixes the problem on my desktop PC and my notebook.
Comment 25 slatchurie 2017-06-18 00:57:35 UTC
I can confirm. With the latest patch, both the shutdown dialog and the long press action work as intended.
Comment 26 Florian Müllner 2017-06-18 01:34:22 UTC
Awesome, thanks! I'll wait for code review then ...
Comment 27 Piotr Drąg 2017-07-12 22:03:26 UTC
*** Bug 784880 has been marked as a duplicate of this bug. ***
Comment 28 Rui Matos 2017-07-13 09:54:19 UTC
Review of attachment 353969 [details] [review]:

makes sense
Comment 29 Florian Müllner 2017-07-13 10:29:23 UTC
Attachment 353969 [details] pushed as 2339c39 - system: Emulate click action button release
Comment 30 Jan Niklas Hasse (Account disabled) 2017-07-14 09:14:19 UTC
I can also confirm that this has fixed the issue.

Will this get backported to 3.24?
Comment 31 Florian Müllner 2017-07-14 09:48:50 UTC
(In reply to Jan Niklas Hasse from comment #30)
> I can also confirm that this has fixed the issue.
> Will this get backported to 3.24?

It has already been backported yesterday, I pushed the patch to both master and gnome-3-24.
Comment 32 Jan Niklas Hasse (Account disabled) 2017-07-14 11:56:37 UTC
Ah sorry, didn't notice that. Awesome :) Thank you
Comment 33 Douglas 2017-07-15 03:25:23 UTC
When will the fix arrive for Fedora 26 Workstation? I see it's "RESOLVED FIXED" now, but the recent set of updates didn't fix it yet. I'm unfamiliar with this process. Sorry.
Comment 34 Douglas 2017-07-15 03:28:14 UTC
> When will the fix arrive for Fedora 26 Workstation? I see it's "RESOLVED
> FIXED" now, but the recent set of updates didn't fix it yet. I'm unfamiliar
> with this process. Sorry.

Oh, right. I forgot I'm in GNOME bugzilla and not Red Hat's. Fedora needs to push the update now. So your job is done. Interesting. Thanks!
Comment 35 Florian Müllner 2019-02-27 18:27:17 UTC
*** Bug 787138 has been marked as a duplicate of this bug. ***