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 757676 - Moving window between computer monitors freezes mouse and keyboard events
Moving window between computer monitors freezes mouse and keyboard events
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks: WaylandRelated
 
 
Reported: 2015-11-06 11:23 UTC by boloomka
Modified: 2016-04-27 16:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
journalctl output (430.14 KB, text/x-vhdl)
2015-11-06 11:23 UTC, boloomka
  Details
tracebacks from running gdb on gnome-shell (11.02 KB, text/plain)
2015-11-06 12:28 UTC, boloomka
  Details
dnd: cancel the animation on drag actor destruction (1.93 KB, patch)
2016-03-31 12:34 UTC, Marek Chalupa
none Details | Review
Cancel drag animation on drag actor destruction (4.30 KB, patch)
2016-04-15 12:34 UTC, Marek Chalupa
none Details | Review
Cancel drag animation on drag actor destruction (4.76 KB, patch)
2016-04-22 12:43 UTC, Marek Chalupa
reviewed Details | Review
Cancel drag animation on drag actor destruction (4.57 KB, patch)
2016-04-25 07:12 UTC, Marek Chalupa
none Details | Review
Cancel drag animation on drag actor destruction (4.30 KB, patch)
2016-04-25 07:16 UTC, Marek Chalupa
committed Details | Review

Description boloomka 2015-11-06 11:23:53 UTC
Created attachment 314975 [details]
journalctl output

On Fedora 23 with GNOME 3.18.1 on Wayland, when I move window of Polari IRC client in Overview from one screen to the other (from one computer screen to another computer screen on the left), GNOME Shell stops responding to keyboard and mouse events (I can still move cursor though). It doesn't freeze, since it shows blinking cursors and it shows new message events etc, but it doesn't respond to keyboard or mouse (and switching to another TTY also doesn't work).

It only happens when moving window from one screen to the other - it doesn't occur when moving between different workspaces.

Steps to reproduce:
1. Use dual-monitor setup
2. Start Polari app
3. While in overview, move Polari window from primary screen to secondary screen

Versions:
Up-to-date Fedora 23 with GNOME 3.18.1, mutter-3.18.1-4.fc23.x86_64 and polari-3.18.1-1.fc23.x86_64

I'm also attaching journalctl output but it shows nothing useful prior to SysRq call (that I used to reboot my system).
Comment 1 boloomka 2015-11-06 11:35:12 UTC
Now it's happening also with GNOME Terminal, Files and Geary, but not with Emacs, Firefox or Atom. One thing that I've noticed is that mouse cursor stays with "window is being dragged" image.
Comment 2 boloomka 2015-11-06 11:47:00 UTC
OK so after another bit of playing with it I think that I know how to reproduce this. It happens with Wayland-enabled applications only (so XWayland are OK) and it happens only with *maximized* applications - that's the reason I couldn't reproduce this with Terminal before - it wasn't maximized.

So steps to reproduce are:
1. Use dual-monitor setup
2. Start any GNOME app
3. Maximize it
4. In overview, move its window between screens
Comment 3 boloomka 2015-11-06 12:27:58 UTC
I was able to get tracebacks using gdb and remote login. I'm attaching them now.
Comment 4 boloomka 2015-11-06 12:28:49 UTC
Created attachment 314982 [details]
tracebacks from running gdb on gnome-shell
Comment 5 Olivier Fourdan 2015-11-06 16:54:22 UTC
Yeap, it's reproducible at will indeed using the steps from comment 2.

Looks like the grab remains active after even the button release. But this /might/ possibly be as well a bug in gnome-shell rather than mutter, overview and drag'n drop of windows being implemented in gnome-shell.
Comment 6 Kamil Páral 2015-11-09 14:34:43 UTC
Olivier, is it expected that Ctrl+Alt+Fx keys can't be used to switch to a terminal after this bug occurs? And is there something we could do to prevent this (i.e. make Ctrl+Alt+Fx shortcut work in case of compositor/higher-layer bug?) Could we perhaps even implement something like Ctrl+Alt+Backspace to restart the whole compositor/session, similarly to X11? It might be a bit off topic, but this is a nice example of how a bug in compositor might render the whole system completely unresponsive, while all the layers below work well.
Comment 7 Kamil Páral 2016-01-04 12:57:50 UTC
Still happening with mutter 3.19.3.1.
Comment 8 Marek Chalupa 2016-03-31 12:34:16 UTC
Created attachment 325082 [details] [review]
dnd: cancel the animation on drag actor destruction

The events are being fed into the dnd handler even after dropping the window, because the _onAnimationComplete() callback is not called
Comment 9 Olivier Fourdan 2016-03-31 13:28:57 UTC
I confirm that attachment 325082 [details] [review] fixes the issue in my case as well.
Comment 10 Rui Matos 2016-04-01 17:33:56 UTC
Review of attachment 325082 [details] [review]:

we have this.actor and this._dragActor and they may or may not be the same object. I'd prefer that we register a different 'destroy' signal handler for this._dragActor to perform the animation complete actions if needed
Comment 11 Marek Chalupa 2016-04-15 12:34:18 UTC
Created attachment 326091 [details] [review]
Cancel drag animation on drag actor destruction
Comment 12 Florian Müllner 2016-04-15 13:22:17 UTC
Review of attachment 326091 [details] [review]:

::: js/ui/dnd.js
@@ +602,3 @@
+        // finish animation if the actor gets destroyed
+        // during it
+        this._dragActor.connect('destroy', this._finishAnimation);

If dragActor isn't destroyed at the end of the drag though, this may cancel the animation of a completely unrelated drag operation
Comment 13 Marek Chalupa 2016-04-22 12:43:34 UTC
Created attachment 326546 [details] [review]
Cancel drag animation on drag actor destruction

v2. disconnect the signal on animation complete
Comment 14 Florian Müllner 2016-04-22 13:23:18 UTC
Review of attachment 326546 [details] [review]:

I haven't actually tested, but looks mostly good.

Some additional nits in the commit message:
 - Capitalize subject (Cancel ...)
 - Full sentence in body: (If ..., end with full stop)
 - Drop the v2 line

::: js/ui/dnd.js
@@ +594,3 @@
+        // start animation
+        this._dragActorEaseOut(eventTime,
+                               {time: REVERT_ANIMATION_TIME});

Style nit: missing spaces before/after braces

@@ +597,3 @@
+    },
+
+    _dragActorEaseOut: function (eventTime, params) {

The function name is a bit vague - there are three tweeners that easeOut dragActor, but you are only replacing one of them. _animateDragEnd() or _doDragEndAnimation() maybe?

@@ +602,3 @@
+        // finish animation if the actor gets destroyed
+        // during it
+        this._dragActorDestroyCbId =

We usually use signalName+Id or object+SignalName+Id, by that convention the name would be _dragActorDestroyId

@@ +629,2 @@
     _onAnimationComplete : function (dragActor, eventTime) {
+        // disconnect the destoy signal from drag actor

Typo: destoy

Or just drop the comment altogether, the code is self-explanatory
Comment 15 Marek Chalupa 2016-04-25 07:12:51 UTC
Created attachment 326659 [details] [review]
Cancel drag animation on drag actor destruction
Comment 16 Marek Chalupa 2016-04-25 07:16:57 UTC
Created attachment 326660 [details] [review]
Cancel drag animation on drag actor destruction

forget to remove an argument from _finishAnimation call (it now takes none)
Comment 17 Florian Müllner 2016-04-25 14:34:43 UTC
Review of attachment 326660 [details] [review]:

LGTM