Commit Graph
1580 Commits
Author SHA1 Message Date
Ole Jørgen Brønner d594dc81a2 dnd: create zones and actors on the fly
Precreated zones doesn't work when the user can alter the space during
grab. (eg. resize a window or insert new ones)

TODO: handle empty spaces
2020-03-08 14:48:00 +01:00
Ole Jørgen Brønner ffb51ad2a5 utils: crude actor tree printer 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 280a874c99 refactor to globalToScroll and globalToViewport 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 12cd5977e7 wip: implemnt keyboard grab 2020-03-08 14:48:00 +01:00
Ole Jørgen Brønner 950efe04e0 utils:trace: don't require a metawindow 2020-03-08 14:48:00 +01:00
Ole Jørgen Brønner d4e24b1ee9 Only react to background clicks when in preview mode
Background click outside preview caused background to be "permanently" tracked
when only scratch windows was visible.
2020-03-08 14:48:00 +01:00
Ole Jørgen Brønner dfa999412b Always run a complete switch workspace handler on navigation end (inPreview)
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
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 58d1cd875c grab: make re-grabbing a window smoother 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 2f04b872db moveDone: guard against all grabbing
We now do all move grabbing in clutter.
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner e6397c724f space: fix scroll direction 2020-03-08 14:48:00 +01:00
Ole Jørgen Brønner 25829709a3 Ensure grab window remains focused when ending navigation before dnd 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner f7a2b456ee begin dnd when pointer moves to another monitor 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 470182c151 navigator: never move a visible space 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner eb1e3f5f3b non dnd motion: coords were already monitor relative 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 17855a6e80 cleanup 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 4c1bff9e4d navigate to correct space on grab.end() 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 2f58d796ed navigator: rewrite finish/destroy code
- 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.
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 7e25f9ad53 reposition clone using pointer after insertion
For some reason this is accurate
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 69ec12c863 space: only scroll if navigating or in a grab 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 613abd2bce grab: remove scroll-event 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 32c6ad3fd2 grab: remove positionChanged 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 9fb8b0e9bb space button-press: navigate to space if clicking on background 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner f43de26ab2 navigator: always start dnd if grab is active 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner f42cee970f position clone correctly when popped out of scaled space 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 9bff4dc44c get_coords doesn't take scaling into account
Use get_pointer, and transform_stage_point for to get correct
coordinates...
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 08f902a626 isWindowAtPoint: use correct clone coordinate 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 9dc3880b87 navigator: start dnd if in grab 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner c4808c3ba1 guard 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 245d7aa30a fix some coordinate transforms 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner fa75a40955 fix grab y position 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 4ad4899fbb better pointeroffset 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 818d90ad75 wip: grab everywhere 2020-03-08 14:48:00 +01:00
Tor Hedin Brønner 772b698e77 wip: always use fake grab 2020-03-08 14:48:00 +01:00
Ole Jørgen Brønner 99744ad970 DnD mouse cursor 2020-03-08 14:46:47 +01:00
Ole Jørgen Brønner 510a70d9a8 utils: less verbose trace functions 2020-03-08 14:46:47 +01:00
Ole Jørgen Brønner b4c023e1fb Do DnD outside mutter grab
- 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.
2020-03-08 14:46:47 +01:00
Ole Jørgen Brønner b8f5733dda Ensure all windows in the space belong to the workspace before completing workspace switch
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.
2020-03-08 14:46:47 +01:00
Tor Hedin Brønner dd644161fd Use clones global coordinates to insert 2020-03-08 14:46:47 +01:00
Ole Jørgen Brønner e5764dfb5e wip: do DnD outside mutter grab
This is much more flexible: we can drag windows across workspaces in the
carousel, react on keybindings, scroll, etc.
2020-03-08 14:46:47 +01:00
Tor Hedin Brønner 2e407554be maximized: fix y position of eg. firefox wayland
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.
36.0
2020-03-07 14:25:19 +01:00
Tor Hedin Brønner f1b151524a edge overlays: Do not set when browsing workspaces 2020-03-07 13:30:10 +01:00
Tor Hedin Brønner add08a38d2 Fix top bar on enable
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.
2020-03-07 13:26:16 +01:00
Tor Hedin Brønner 4f9383a430 Fix top bar on notify::fullscreen
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.
2020-03-07 13:26:16 +01:00
Tor Hedin Brønner 108f7202ff edge overlays: hide when selecting a maximized window 2020-03-02 16:27:18 +01:00
Tor Hedin Brønner 5727ea94cf Space.isVisible: Work correctly with fullscreen windows 2020-03-01 18:55:42 +01:00
Tor Hedin Brønner a7da294946 Space.isVisible: use current, not future, coordinates 2020-03-01 18:54:54 +01:00
Tor Hedin Brønner 5dcee36d71 Polish up animate down for fullscreen windows
- 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
2020-03-01 18:54:27 +01:00
Tor Hedin Brønner 0c3f71d94d selection highlight: add rounded border 2020-03-01 18:13:05 +01:00
Ole Jørgen Brønner 8971ae73e3 Wayland-safe(r) override-redirect check
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)
2020-02-28 21:13:10 +01:00
Tor Hedin Brønner 069f687fcd readme: Update for 3.36 support 2020-02-27 15:35:02 +01:00