Commit Graph
1629 Commits
Author SHA1 Message Date
Tor Hedin Brønner 7bc192a6d4 grab: pass the correct focus window to navigator
When ending a grab we want to have full control over what space and
window gains focus. So simply pass the window through navigator.finish
in addition to the space.
2020-12-05 20:36:19 +01:00
Tor Hedin Brønner d1e594e6cf navigator finish: ensure moveDone is run 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner 9c94606355 navigator: do action before forcing dnd 2020-12-05 20:36:19 +01:00
Ole Jørgen Brønner 740628781a dnd: bugfix zone selection 2020-12-05 20:36:19 +01:00
Ole Jørgen Brønner 09020cc8ec dnd: restore wider zone on empty workspaces (regression)
Also move zone actor creation to zone activation.

(regression after "dnd: create zones and actors on the fly")
2020-12-05 20:36:19 +01:00
Tor Hedin Brønner ac58cb5a7f ctrl grab: support gnome 3.36 2020-12-05 20:36:19 +01:00
Ole Jørgen Brønner 0be41a04a7 dnd: rip out the window immediatedly when ctrl is held down (scratch also)
(only works properly in wayland)
2020-12-05 20:36:19 +01:00
Tor Hedin Brønner 61ff9ce48f fix clone jumping when dragging in a scaled space 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner 45608e03c8 grab: fix for scratch windows 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner 512ea78898 begin: fix scratchish detection 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner 94529ad29a dnd: hide minimap
This is a bit ugly, should probably have a proper method for this.
2020-12-05 20:36:19 +01:00
Tor Hedin Brønner a4fd3e45ff navigator: pseudo focus when hitting escape in grab 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner 25fcdeaf29 Substitute scratch windows with clones
This is necessary for events to pass through to the space.
2020-12-05 20:36:19 +01:00
Tor Hedin Brønner 87b6518851 scratch: Add animateWindows and showWindows 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner 775db1b2a5 navigator: Start DnD if grab is active on finish 2020-12-05 20:36:19 +01:00
Ole Jørgen Brønner 6e22da7278 dnd: rip out the window immediatedly when ctrl is held down
(only works properly in wayland)
2020-12-05 20:36:19 +01:00
Ole Jørgen Brønner ecf487c157 dnd: handle empty spaces (on demand zones) 2020-12-05 20:36:19 +01:00
Ole Jørgen Brønner 78dd56dc36 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-12-05 20:36:19 +01:00
Ole Jørgen Brønner 04a0e5ec83 utils: crude actor tree printer 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner a2312dd7ca refactor to globalToScroll and globalToViewport 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner 4670338f29 wip: implemnt keyboard grab 2020-12-05 20:36:19 +01:00
Ole Jørgen Brønner ab7e7cc2a4 utils:trace: don't require a metawindow 2020-12-05 20:36:19 +01:00
Ole Jørgen Brønner 5aeab6f1dc 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-12-05 20:36:19 +01:00
Ole Jørgen Brønner bf2de90d0d 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-12-05 20:36:19 +01:00
Tor Hedin Brønner ab33b9a268 grab: make re-grabbing a window smoother 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner abe9ac1ec0 moveDone: guard against all grabbing
We now do all move grabbing in clutter.
2020-12-05 20:36:19 +01:00
Tor Hedin Brønner b1f6130375 space: fix scroll direction 2020-12-05 20:36:19 +01:00
Ole Jørgen Brønner de4a31b0ed Ensure grab window remains focused when ending navigation before dnd 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner 73442b9a62 begin dnd when pointer moves to another monitor 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner ff527b992d navigator: never move a visible space 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner d6dc25eee2 non dnd motion: coords were already monitor relative 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner cf09b9333d cleanup 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner 19b668d0d2 navigate to correct space on grab.end() 2020-12-05 20:36:19 +01:00
Tor Hedin Brønner f257e2618c 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-12-05 20:36:19 +01:00
Tor Hedin Brønner 76f0811a89 reposition clone using pointer after insertion
For some reason this is accurate
2020-12-05 20:36:19 +01:00
Tor Hedin Brønner 8afae530d3 space: only scroll if navigating or in a grab 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner 41778b1f30 grab: remove scroll-event 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner 2ebc2a0efb grab: remove positionChanged 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner 06d1a765f9 space button-press: navigate to space if clicking on background 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner b75a49c2bb navigator: always start dnd if grab is active 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner df0cdbc5bf position clone correctly when popped out of scaled space 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner 369d3c99a6 get_coords doesn't take scaling into account
Use get_pointer, and transform_stage_point for to get correct
coordinates...
2020-12-05 20:36:18 +01:00
Tor Hedin Brønner 049c1331fb isWindowAtPoint: use correct clone coordinate 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner 01d9ce435d navigator: start dnd if in grab 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner 685c1ea20f guard 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner 85c0c9d48f fix some coordinate transforms 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner 371453cec0 fix grab y position 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner 095cc72327 better pointeroffset 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner c6ad376764 wip: grab everywhere 2020-12-05 20:36:18 +01:00
Tor Hedin Brønner 3752114f62 wip: always use fake grab 2020-12-05 20:36:18 +01:00