dnd: Make startDrag() fail if there is a current grab

This call just went through stomping over previous drag operations if any,
_maybeStartDrag() accounted for this, but other callers (well, WindowClone
in workspace.js) don't. This must bail out early even if a drag operation is
requested, luckily all callers account for it already.

This broke shell state by preserving connected captured-event handlers if
one tried to drag multiple windows simultaneously through multitouch. We
of course don't support that, now more elegantly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/455
This commit is contained in:
Carlos Garnacho 2019-03-12 01:53:16 +01:00 committed by Georges Basile Stavracas Neto
parent fb737ebde0
commit 4a7e2ddff5

View File

@ -306,6 +306,9 @@ var _Draggable = class _Draggable {
* for the draggable. * for the draggable.
*/ */
startDrag(stageX, stageY, time, sequence, device) { startDrag(stageX, stageY, time, sequence, device) {
if (currentDraggable)
return;
if (device == undefined) { if (device == undefined) {
let event = Clutter.get_current_event(); let event = Clutter.get_current_event();