From 0be41a04a7dfefbdd728bbe314ddb4303bd0203e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Br=C3=B8nner?= Date: Sat, 22 Feb 2020 20:11:51 +0100 Subject: [PATCH] dnd: rip out the window immediatedly when ctrl is held down (scratch also) (only works properly in wayland) --- tiling.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tiling.js b/tiling.js index 360eae9..b8240ba 100644 --- a/tiling.js +++ b/tiling.js @@ -2725,10 +2725,15 @@ function grabBegin(metaWindow, type) { case Meta.GrabOp.MOVING: inGrab = new Extension.imports.grab.MoveGrab(metaWindow, type); - if (!inGrab.initialSpace || inGrab.initialSpace.indexOf(metaWindow) === -1) - return; + let dm = Clutter.DeviceManager.get_default(); + let d = dm.get_core_device(Clutter.InputDeviceType.KEYBOARD_DEVICE); + if (d.get_modifier_state() & Clutter.ModifierType.CONTROL_MASK) { + inGrab.begin(); + inGrab.beginDnD(); + } else if (inGrab.initialSpace && inGrab.initialSpace.indexOf(metaWindow) > -1) { + inGrab.begin(); + } - inGrab.begin(); break; case Meta.GrabOp.RESIZING_NW: case Meta.GrabOp.RESIZING_N: