PaperWM
PaperWM copied to clipboard
Integrate the activity overview properly
Should at least support these things:
- [x] Overview should preserve the window order
- [x] Window animations should start and stop with the same actor properties
- [ ] Drag and drop windows within the workspace
Example of how to hook into the overview layout: https://extensions.gnome.org/extension/18/native-window-placement/ -- source
NB: There's some outdated approaches too: https://extensions.gnome.org/extension/318/overview-window-sequence/
Ensure that the "on-mouse-over" highlight/chrome doesn't get out of sync when windows are moved between workspaces: (eg. move the first window in a tiling to another workspace)
This seems to happen because the tiling layout is updated (ensure_viewport) when windows are moved out/in. This moves the windows and as a side effect(?) of how gnome-shell's WindowCloneLayout
[1] is implemented the clones in the overview moves too. The chrome (WindowOverlay
[1]) isn't directly tied to the clone so it does not move.
Might be considered a bug upstream. The overview doesn't handle that windows change position when it's open.
[1] workspace.js
The following is a quick and dirty fix: (the window layout in the overview still becomes a bit messed up, but the chrome and wndowclone is at least in sync)
Workspace = imports.ui.workspace;
Workspace.WindowCloneLayout.prototype._makeBoxForWindow = function(window) {
// We need to adjust the position of the actor because of the
// consequences of invisible borders -- in reality, the texture
// has an extra set of "padding" around it that we need to trim
// down.
// The outer rect (from which we compute the bounding box)
// paradoxically is the smaller rectangle, containing the positions
// of the visible frame. The input rect contains everything,
// including the invisible border padding.
let inputRect = window.get_buffer_rect();
let bb = window.get_frame_rect();
let box = new Clutter.ActorBox();
box.set_origin(inputRect.x - bb.x,
inputRect.y - bb.y);
box.set_size(inputRect.width, inputRect.height);
return box;
}