Needed to ensure all windows belong to the space's workspace. Especially this
case:
- Start navigating (from A) to the previous workspace (B).
- Drag and drop a window (X) from B to A
- Navigate back to A and end navigation.
X still belongs to B unless the full event handler run.
ref commit: Ensure all windows in the space belong to the workspace before completing workspace switch
- Activate destination workspace if it isn't active, fake it if not.
If a «stuck» window have focus, consider it selected.
If selected window or one its transient window has focus, fake focus
handler. Otherwise activate it.
- delay workspace change until DnD end (partial Navigator destroy)
- sync scratch window frame with clone on grab end
Bug in the wip commit fixed: (focus was not always preserved on workspace dnd)
- DnD a window
- switch to a different workspace using the workspace carousel
- drop the window
-> the DnD-window loose focus on workspace change (in step 2)
Note: Mutter enforce focus_window.workspace === active_workspace, changing focus
window if necessary.
This simplifies code moving windows between workspaces without messing with the
focus. (since mutter enforce focus_window.workspace == active_workspace)
Mainly preparation for DnD fixes in the next commit.
Creates dropdown menu to let user choose between never, always, or
only showing scratch windows. The state is tracked by two
booleans,'disable-scratch-in-overview' and 'only-scratch-in-overview'.
With `topbar-follow-focus` set to false we still moved the topbar (to its own position).
This caused issues with dash-to-panel with panels on all monitors.
So only move the topbar to the primary monitor when `topbar-follow-focus` is toggled
off by the user.
There's still some issues with dash-to-panel and the workarea on secondary monitors,
but this makes it at least somewhat usable.
Co-authored-by: Simon Epstein <simon.epstein@67bricks.com>