- 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.
Some windows apparently report the wrong frame.y value when they've just
been maximized, leaving us with the old incorrect value. Simply hardcode
the correct y value instead.
When unlocking the desktop with a fullscreen window focused we'd incorrectly
show the topbar.
Run fixTopBar after all spaces have been fully setup to fix it.
If there's already a fullscreen window in the workspace, gnome-shell
won't trigger a hide on the topbar. Meaning fixTopBar won't run
automatically, so we need to run on any fullscreen changes.
- Simply move the fullscreen clone if not visible
- Do not start a new animation one is already in progress
- Do not run animateDown when starting navigation
It looks like mutter doesn't maintain override_redirect on wayland windows (ie.
it doesn't try to emulate the X11-only(?) concept)
This caused many menues (eg. gtk menues) to be registered by us (creating clone,
registering resize signals, etc.)
Particularily noticable in libreoffice - the menus was very delayed and
sometimes didn't show up at all. (Observed in GS 3.34.3, libreoffice 6.2.6.2)
(TOOLTIP is checked preemptively)
For some reason after a successful `move_frame`, and `position-changed`,
the window is moved back to it's original position. This only happens
sporadically...
Anyway, just do the simply thing and make sure all `position-changed`
signals are correct.
NOTE: need a grab guard or something for non-clutter dnd