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 784545 - Comes out of overview if pointer is on top of a window thumbnail
Comes out of overview if pointer is on top of a window thumbnail
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.26.x
Other Linux
: Normal critical
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 787417 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-07-05 12:36 UTC by Bastien Nocera
Modified: 2017-11-17 16:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
compositor: End MetaDnd grab on plugin grab end (3.28 KB, patch)
2017-11-16 16:34 UTC, Carlos Garnacho
committed Details | Review
overview: Protect ::drag-end handlers (1.16 KB, patch)
2017-11-16 16:34 UTC, Carlos Garnacho
committed Details | Review

Description Bastien Nocera 2017-07-05 12:36:01 UTC
gnome-shell-3.24.2-1.fc26.x86_64

After *something* happens (see below), gnome-shell refuses to stay in the overview.

Press Super or Click "Activities" or Throw the cursor in the corner
Let the cursor linger on a window thumbnail for a second
It comes out of overview focusing the window that was under the cursor

libinput-debug-events doesn't see stray events from the touchscreen, touchpad or keyboard.

During the brief time that the overview mode is active, typing on the keyboard will type in the window that's under the mouse instead of in the overview search entry, leading to potential leaks of information in, say, a chat window.

There's no warnings or any output of any sort in journalctl when reproducing the problem, but there was a warning when the problems started happening:
Jul 05 14:21:04 classic gnome-shell[20561]: JS ERROR: TypeError: dragEvent.targetActor._delegate is null
                                            Overview<._onDragMotion/this._windowSwitchTimeoutId<@resource:///org/gnome/shell/ui/overview.js:349:49

Looking at the error message, it could be that my drag'n'drops from epiphany were the problem.

1. With epiphany opened fullscreen, go to https://koji.fedoraproject.org/koji/packageinfo?packageID=10814
2. Click on a download link and (either with or without moving the mouse), alt-tab to a fullscreen terminal
3. (either with or without moving the mouse) drop the link on the terminal
Comment 1 Bastien Nocera 2017-07-05 13:02:22 UTC
This is the code in question:
https://git.gnome.org//browse/gnome-shell/tree/js/ui/overview.js#n345

My guess is that dragEvent.targetActor disappeared before the timeout, throws an error in the timeout callback which never reaches the end?

(this._windowSwitchTimeoutId is set to 0 before the error, so nobody can remove the timeout...)
Comment 2 Bastien Nocera 2017-07-05 14:27:33 UTC
About 20 minutes after the problem seems to have happened again (at least the same warning occureed), I got:
Jul 05 14:40:06 classic gnome-shell[20561]: JS ERROR: TypeError: dragEvent.targetActor._delegate is null
                                            Overview<._onDragMotion/this._windowSwitchTimeoutId<@resource:///org/gnome/shell/ui/overview.js:349:49
Jul 05 14:40:08 classic gnome-shell[20561]: JS WARNING: [resource:///org/gnome/shell/ui/dash.js 482]: reference to undefined property this._dragMonitor
Jul 05 14:40:08 classic gnome-shell[20561]: JS WARNING: [resource:///org/gnome/shell/ui/workspaceThumbnail.js 738]: reference to undefined property this._dragMonitor
Jul 05 14:40:12 classic org.gnome.Shell.desktop[20561]: libinput error: libinput bug: timer: offset negative (-644585)
Jul 05 14:40:24 classic gnome-shell[20561]: gclosure.c:724: unable to remove uninstalled invalidation notifier: 0x7f3cc0699a70 (0x558800dab4e0)
Jul 05 14:40:24 classic gnome-shell[20561]: gclosure.c:724: unable to remove uninstalled invalidation notifier: 0x7f3cc0699a70 (0x558800e5e720)
(and about 3 terminal pages of the same afterwards)
Comment 3 Bastien Nocera 2017-07-15 15:19:36 UTC
This seems to happen when typing something while the overview is coming into view.
Comment 4 Strangiato 2017-11-07 16:57:13 UTC
maybe duplicate
https://bugzilla.gnome.org/show_bug.cgi?id=787417
Comment 5 Bastien Nocera 2017-11-07 17:00:40 UTC
*** Bug 787417 has been marked as a duplicate of this bug. ***
Comment 6 Strangiato 2017-11-07 17:07:04 UTC
It happens only under Wayland...
open nautilus and vlc player
drag a video file from nautilus to "Activities" on top left corner and wait for overview mode
drop the file on vlc window
press super key to active overview mode, mouseover any window
Result: shell automatically leaves overview mode

Gnome 3.26.2 on Arch, no extension enabled
Comment 7 Carlos Garnacho 2017-11-16 16:34:10 UTC
Created attachment 363846 [details] [review]
compositor: End MetaDnd grab on plugin grab end

We must emit ::dnd-leave to pair the ::dnd-enter that shall be
emitted whenever the plugin grab begins, otherwise we leave
listeners unable to clean up if the plugin begins and ends a
grab while there is an ongoing DnD operation.
Comment 8 Carlos Garnacho 2017-11-16 16:34:44 UTC
Created attachment 363847 [details] [review]
overview: Protect ::drag-end handlers

These end up emitting item-drag-end/window-drag-end pretty much
without checks. Given the MetaDnd object may end up emitting
::drag-leave as a result of the plugin ending its grab, this
would result on spurious emission of those events and subsequent
warnings.
Comment 9 Florian Müllner 2017-11-17 00:05:16 UTC
Review of attachment 363846 [details] [review]:

LGTM
Comment 10 Florian Müllner 2017-11-17 00:05:31 UTC
Review of attachment 363847 [details] [review]:

Mmmh, it is a bit fishy to protect against one particular misuse of the API (stray end*Drag calls) but not others (pairs of beginItemDrag/endWindowDrag or beginWindowDrag/endItemDrag calls). But meh, let's go with this - thanks for tracking this down :-)
Comment 11 Carlos Garnacho 2017-11-17 14:53:11 UTC
Comment on attachment 363846 [details] [review]
compositor: End MetaDnd grab on plugin grab end

Pushed mutter patch to master and gnome-3-26

Attachment 363846 [details] pushed as d053196 - compositor: End MetaDnd grab on plugin grab end
Comment 12 Carlos Garnacho 2017-11-17 15:03:02 UTC
(In reply to Florian Müllner from comment #10)
> Review of attachment 363847 [details] [review] [review]:
> 
> Mmmh, it is a bit fishy to protect against one particular misuse of the API
> (stray end*Drag calls) but not others (pairs of beginItemDrag/endWindowDrag
> or beginWindowDrag/endItemDrag calls). But meh, let's go with this - thanks
> for tracking this down :-)

Yeah, that also briefly went through my head, but didn't go too far in checking those couldn't be crossed :). I ended up splitting the inDrag check to additionally handle this.
Comment 13 Carlos Garnacho 2017-11-17 15:06:59 UTC
Pushed the gnome-shell patch as well.

Attachment 363847 [details] pushed as cdc212f - overview: Protect ::drag-end handlers
Comment 14 Florian Müllner 2017-11-17 16:34:52 UTC
(In reply to Carlos Garnacho from comment #12)
> I ended up splitting the inDrag check to additionally handle this.

The alternative would have been to check for _inXdndDrag in _onDragEnd() to protect against this particular issue, but what you did sounds nicer.