mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-12-04 04:11:38 +00:00
Ensure grab window remains focused when ending navigation before dnd
This commit is contained in:
committed by
Tor Hedin Brønner
parent
73442b9a62
commit
de4a31b0ed
+6
-2
@@ -289,7 +289,11 @@ var Navigator = class Navigator {
|
||||
// again doesn't trigger a switch signal
|
||||
force && Tiling.spaces.animateToSpace(this.space);
|
||||
} else {
|
||||
this.space.workspace.activate(global.get_current_time());
|
||||
if (Tiling.inGrab && Tiling.inGrab.window) {
|
||||
this.space.workspace.activate_with_focus(Tiling.inGrab.window, global.get_current_time());
|
||||
} else {
|
||||
this.space.workspace.activate(global.get_current_time());
|
||||
}
|
||||
}
|
||||
|
||||
selected = this.space.indexOf(selected) !== -1 ? selected :
|
||||
@@ -299,7 +303,7 @@ var Navigator = class Navigator {
|
||||
if (focus && focus.is_on_all_workspaces())
|
||||
selected = focus;
|
||||
|
||||
if (selected) {
|
||||
if (selected && !Tiling.inGrab) {
|
||||
let hasFocus = selected && selected.has_focus();
|
||||
selected.foreach_transient(mw => hasFocus = mw.has_focus() || hasFocus);
|
||||
if (hasFocus) {
|
||||
|
||||
@@ -1625,6 +1625,10 @@ class Spaces extends Map {
|
||||
let toSpace = this.spaceOf(to);
|
||||
let fromSpace = this.spaceOf(from);
|
||||
|
||||
if (inGrab && inGrab.window) {
|
||||
inGrab.window.change_workspace(toSpace.workspace);
|
||||
}
|
||||
|
||||
for (let metaWindow of toSpace.getWindows()) {
|
||||
// Make sure all windows belong to the correct workspace.
|
||||
// Note: The 'switch-workspace' signal (this method) runs before mutter decides on focus window.
|
||||
|
||||
Reference in New Issue
Block a user