Ole Jørgen Brønner
ec7fa6eac0
get_pointer seems to be a reliable way to get modifiers on both X11 and wayland
2020-05-29 16:23:56 +02:00
Ole Jørgen Brønner
82abd2bcb6
Hack to make clone marks survive grabs
2020-05-29 16:17:00 +02:00
Ole Jørgen Brønner
6e71b07c2a
Bugfix: (X11 only?) fix occationally initial jump when moving window
...
The `global.get_pointer` is not necessarily in sync with the clutter motion event.
We use `global.get_pointer` to set the anchor in `begin`, but sometimes (fast
motions more likely to trigger) it's an extra event in the `motion` event queue.
The motion handler will in effect see a reality that occured before the anchor
was set, triggering a "jump".
Also notice that `global.get_pointer` seems to be ahead of the actual grab event
:/ meaning we get less responsive window moving. We don't have access the actual
click coordinates which triggered the move :(
2020-05-29 16:10:20 +02:00
Ole Jørgen Brønner
b33f2d859d
getModiferState: always return 0 on X11
...
The clutter reported modifier state is easily stuck on X11:
- Enter "clutter mode". Press and hold ctrl whild exiting (usually ctrl-ecs)
- Clutter will now report ctrl after ctrl is released causing windows to go
directly to dnd mode when moved.
2020-03-14 12:07:07 +01:00
Tor Hedin Brønner
3bfcb46405
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-03-08 14:48:00 +01:00
Tor Hedin Brønner
b9a3f9d4a9
navigator finish: ensure moveDone is run
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner
f64e804da3
navigator: do action before forcing dnd
2020-03-08 14:48:00 +01:00
Ole Jørgen Brønner
954bb4247f
dnd: bugfix zone selection
2020-03-08 14:48:00 +01:00
Ole Jørgen Brønner
c7327b9430
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-03-08 14:48:00 +01:00
Tor Hedin Brønner
3daf35e293
ctrl grab: support gnome 3.36
2020-03-08 14:48:00 +01:00
Ole Jørgen Brønner
61628e1ae0
dnd: rip out the window immediatedly when ctrl is held down (scratch also)
...
(only works properly in wayland)
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner
c3e412cfea
fix clone jumping when dragging in a scaled space
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner
816b1d8c63
grab: fix for scratch windows
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner
c732e9c42c
begin: fix scratchish detection
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner
4198b1093b
dnd: hide minimap
...
This is a bit ugly, should probably have a proper method for this.
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner
23224dfb5e
navigator: pseudo focus when hitting escape in grab
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner
67ebf1ba31
Substitute scratch windows with clones
...
This is necessary for events to pass through to the space.
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner
78d458a4dd
scratch: Add animateWindows and showWindows
2020-03-08 14:48:00 +01:00
Tor Hedin Brønner
3fa4c7b5c4
navigator: Start DnD if grab is active on finish
2020-03-08 14:48:00 +01:00
Ole Jørgen Brønner
ddd6460892
dnd: rip out the window immediatedly when ctrl is held down
...
(only works properly in wayland)
2020-03-08 14:48:00 +01:00
Ole Jørgen Brønner
610f65487a
dnd: handle empty spaces (on demand zones)
2020-03-08 14:48:00 +01:00
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