From 31a14520ea64416c51e37cccdf082ee7bd62c23d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Br=C3=B8nner?= Date: Mon, 16 Oct 2017 07:37:02 +0200 Subject: [PATCH] Support most of our own actions in "supermode" As a consequence the metawindows now keep track of their destination when animated by `move_to`. Ideally the minimap/multimap should listen for changes to the space and react accordingly instead of doing a manual sync like this. "most actions" means actions that is registered as PER_WINDOW and doesn't mutate the space. --- tiling.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tiling.js b/tiling.js index ac04e97..924905f 100644 --- a/tiling.js +++ b/tiling.js @@ -130,6 +130,7 @@ move = (meta_window, x, y, onComplete, onStart, delay, transition) => { let pivot = actor.pivot_point; actor.set_pivot_point(pivot.x, y_offset/buffer.height); } + meta_window.destinationX = x; Tweener.addTween(actor, {x: x - x_offset , y: y - y_offset , time: 0.25 - delay @@ -141,6 +142,7 @@ move = (meta_window, x, y, onComplete, onStart, delay, transition) => { onStart && onStart(); } , onComplete: () => { + meta_window.destinationX = undefined; if(meta_window.get_compositor_private()) { // If the actor is gone, the window is in process of closing meta_window.move_frame(true, x, y); @@ -801,6 +803,17 @@ PreviewedWindowNavigator = new Lang.Class({ } else if (mutterActionId === Meta.KeyBindingAction.MOVE_TO_WORKSPACE_UP) { this.selectSpace(Meta.MotionDirection.UP, true); return true; + } else { + let action = paperActions.byId(mutterActionId); + if (action) { + let metaWindow = this.space[this._selectedIndex]; + action.handler(null, null, metaWindow); + let minimap = this._switcherList.getSelected(); + minimap.layout(); + minimap.sync(metaWindow.destinationX); + this._switcherList.highlight(this._selectedIndex); + return true; + } } return false;