GNOME Bugzilla – Bug 784545
Comes out of overview if pointer is on top of a window thumbnail
Last modified: 2017-11-17 16:34:52 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
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...)
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)
This seems to happen when typing something while the overview is coming into view.
maybe duplicate https://bugzilla.gnome.org/show_bug.cgi?id=787417
*** Bug 787417 has been marked as a duplicate of this bug. ***
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
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.
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.
Review of attachment 363846 [details] [review]: LGTM
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 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
(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.
Pushed the gnome-shell patch as well. Attachment 363847 [details] pushed as cdc212f - overview: Protect ::drag-end handlers
(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.