mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-05 11:46:57 +00:00
liveAltTab: Add live previews of scratch windows
Make a clone of pseudo focused scratch windows which gets pushed to the top (Can't use raise as it would mutate the stack level).
This commit is contained in:
@@ -174,6 +174,18 @@ var LiveAltTab = Lang.Class({
|
||||
let from = this._switcherList.windows[this._selectedIndex];
|
||||
let to = this._switcherList.windows[num];
|
||||
|
||||
this.clone && this.clone.destroy();
|
||||
// Show pseudo focused scratch windows
|
||||
if (Scratch.isScratchWindow(to)) {
|
||||
let actor = to.get_compositor_private();
|
||||
let clone = new Clutter.Clone({source: actor});
|
||||
clone.position = actor.position;
|
||||
this.clone = clone;
|
||||
Main.uiGroup.add_child(clone);
|
||||
// Raise the switcherpopup to the top
|
||||
Main.uiGroup.set_child_above_sibling(this.actor, clone);
|
||||
}
|
||||
|
||||
let fromIndex = from.get_workspace().workspace_index;
|
||||
let toIndex = to.get_workspace().workspace_index;
|
||||
if (toIndex !== fromIndex) {
|
||||
|
||||
Reference in New Issue
Block a user