Ryan Dwyer
a120d4c79f
Make focus part of transactions
...
Rather than maintain copies of the entire focus stack, this PR
transactionises the focus by introducing two new properties to the
container state and using those when rendering.
* `bool focused` means this container has actual focus. Only one
container should have this equalling true in its current state.
* `struct sway_container *focus_inactive_child` points to the immediate
child that was most recently focused (eg. for tabbed and stacked
containers).
6 years ago
emersion
63b4bf5000
Update for swaywm/wlroots#1126
6 years ago
Brian Ashworth
c833ae64bc
Fix pointer button events for layer surfaces
6 years ago
Tony Crisci
e9ad10c2d6
dont focus-follow-mouse when keyboard grab
7 years ago
emersion
cfd02918c0
Render drag icons
7 years ago
Scott Leggett
609c420501
Initialise previous cursor position.
...
Fix the problem with focus jumping to the container under the cursor
when first starting sway.
7 years ago
Ryan Dwyer
bcdb676abb
Don't set focus to NULL when clicking a surface which has no container
7 years ago
Ryan Dwyer
e4e912ea91
Store swayc coordinates as layout-local
7 years ago
Ryan Dwyer
1f2e399ade
Implement floating
7 years ago
Scott Leggett
4d8120ccf3
Improve comment.
7 years ago
Scott Leggett
b57f88e7db
Avoid assert on container type.
7 years ago
Scott Leggett
1b8de39287
Move previous cursor_position inline.
7 years ago
Scott Leggett
0039f7a4fd
Simplify logic, remove redundant variables.
7 years ago
Scott Leggett
dd86444e59
Rely on view_is_visible rather thank walking the tree ourselves.
7 years ago
Scott Leggett
4cd304e4ba
Store previous position in sway_cursor.
7 years ago
Scott Leggett
06098bef98
Focus containers only on entry.
7 years ago
Drew DeVault
fea654a6ce
Replace oft-failing abort with if statement
...
Fixes #2045
7 years ago
Ivan Chebykin
464ec44b00
Check for next_focus before assert
7 years ago
Ivan Chebykin
6e6b0decd9
Fix usage of sway_assert
7 years ago
Ivan Chebykin
820a8c9c2d
Moved visibility check of of loop, added asserts
7 years ago
Ivan Chebykin
740234a4bc
Break after first tabbed/stacked layout
7 years ago
Ivan Chebykin
53516fa03f
Fix mouse focusing for horizontal/vertical views in tabbed containers
7 years ago
Ivan Chebykin
f85d3e15ba
Fixed styling issues
7 years ago
Ivan Chebykin
e19fe56e2f
Focus inactive container instead of checking cursor position
7 years ago
Ivan Chebykin
3b67253312
Skip all nested containers
7 years ago
Ivan Chebykin
c62efbb5ce
Implement correct focusing for tabbed containers
7 years ago
Ivan Chebykin
c1be4b0153
Fix focusing from other containers
7 years ago
Ivan Chebykin
87af08966a
Don't focus tabbed and stacked containers on mouseover
7 years ago
Drew DeVault
8bbf78fdd4
Fix focus follows mouse with no focus
7 years ago
Ryan Dwyer
c08f9bf257
Implement tabbed layout
7 years ago
Brian Ashworth
82cd55a670
Fix border commands from changing focus
7 years ago
Drew DeVault
a3d3c819cf
Fix focus_follows_mouse over swaybar
...
If you moved your mouse over swaybar (e.g. to scroll between
workspaces), focus would move to the workspace. This is not the right
thing to do. The solution is complicated by the fact that if you move
your mouse into a new output with an empty workspace, that workspace
_should_ receive focus.
7 years ago
Mattias Eriksson
8fbafbfab5
Idle handling for dpms/lockscreen et al
...
Swayidle handles idle events and allows
for dpms and lockscreen handling. It also
handles systemd sleep events, and can
raise a lockscreen on sleep
Fixes #541
7 years ago
emersion
50298dc901
Send pointer discrete axis values and source
...
Update for swaywm/wlroots#970
7 years ago
Drew DeVault
d233e75eec
Hide cursor on touch down
7 years ago
Drew DeVault
52aa245b24
Implement basic touch support
...
This required changing container_at_cursor to container_at_coords so
that we could get the appropriate surface (and sx/xy) without moving the
cursor.
Future work:
- Simulate a cursor for clients which have not bound to wl_touch
- Keep sending motion events when moving outside the surface (#1892 )
- Bind gestures to sway commands
7 years ago
emersion
860d2384b4
Update for swaywm/wlroots#923
7 years ago
emersion
ff61df17ff
Add map_from_region command
7 years ago
emersion
4cf77e1de4
Default to current time when triggering cursor events
7 years ago
emersion
33ed279494
Update cursor when workspace focus changes
7 years ago
Ryan Dwyer
8d06b222f0
Fullscreen rendering and input fixes.
...
* Render background when using fullscreen, because transparency.
* Check that fullscreen surface allows input.
* Don't look for surfaces in top layer if there's a fullscreen view.
7 years ago
Ryan Dwyer
35ccdd67a8
More fullscreen fixes.
...
* Render fullscreen views without wlr function, which makes popups and
lockscreen work.
* Don't allow input events to surfaces behind fullscreen views.
* Use correct output dimensions (for rotated outputs).
7 years ago
Danny Bautista
1edb2bd892
Implement cursor event simulation with sway commands.
7 years ago
Drew DeVault
9c5a88a7bd
Fix cursor motion issues
...
Use only one canonical cursor x/y position and send cursor enter when
mouse is warped.
Tangentally related to #1714
7 years ago
emersion
5ebc99253a
Use wlr_surface_point_accepts_input for unmanaged surfaces
7 years ago
Drew DeVault
9114d3b84c
Implement tablet tool support
7 years ago
Drew DeVault
cca420b2f8
Fix focus_follows_mouse issues
7 years ago
emersion
641807d920
Handle unmanaged surfaces motion
7 years ago
Drew DeVault
d2d050d59c
Address review feedback
7 years ago
Drew DeVault
b7e7794912
Implement input-inhibit in sway, swaylock
7 years ago
Drew DeVault
0bf3b88019
Give layer shells under the shell layer focus
7 years ago
emersion
a4a241697a
Merge branch 'wlroots' into view-redesign
7 years ago
emersion
2f64ce86c4
Xwayland unmanaged views aren't views anymore
7 years ago
Tony Crisci
e677c5b204
rename seat functions
7 years ago
Drew DeVault
122b96abed
Merge pull request #1684 from swaywm/follow-warp
...
Implement focus_follows_mouse, mouse_warping
7 years ago
Drew DeVault
f2332dc75c
Address review feedback
7 years ago
Drew DeVault
b9d2983324
Fix interaction between warping and following
7 years ago
Drew DeVault
9b38ef950f
Implement focus_follows_mouse
...
Also contains two other small changes:
- Clicking any button will focus the container clicked (not just left)
- Remove seamless_mouse (doesn't make sense on wlroots)
7 years ago
Drew DeVault
ae6d459000
Implement mouse warping
7 years ago
emersion
98b67e2399
Fix xwayland configure in set_size
7 years ago
Drew DeVault
eb5a8e03ff
Check for null container
7 years ago
Drew DeVault
e4fd47d3a1
Merge pull request #1682 from emersion/unmanaged-no-container
...
Make it clear that unmanaged views don't have a container
7 years ago
Drew DeVault
ccdcaa478f
Fix bug with previous commit
7 years ago
emersion
a44a71c116
Make it clear that unmanaged views don't have a container
...
view->swayc is NULL anyway.
7 years ago
Drew DeVault
8aa195e311
Fix #1104
7 years ago
Drew DeVault
212b503992
Use wlr_surface_point_accepts_input
7 years ago
Drew DeVault
f5470f3338
Pass pointer events to surface layers
7 years ago
emersion
9665642765
Merge branch 'wlroots' into client-cursors
7 years ago
emersion
eb716c6c43
Fix segfaults when focusing a workspace
7 years ago
emersion
03255fd202
Fix pointer events for hidden workspaces
7 years ago
emersion
6c9d67b105
Handle set_cursor requests from clients
...
Allow clients to set a custom cursor if they have the seat's
pointer focus.
7 years ago
Tony Crisci
dc8c9fbeb6
Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"
...
This reverts commit 472e81f35d
, reversing
changes made to 6b7841b11f
.
7 years ago
Drew DeVault
d0c7f66e95
Revert "Refactor tree"
7 years ago
Tony Crisci
4c394a0e9e
address feedback
7 years ago
Tony Crisci
b90099b4b7
rename container functions
7 years ago
Tony Crisci
874f009866
move tree includes to their own directory
7 years ago
Drew DeVault
1e604f3e35
Update input events per swaywm/wlroots#765
7 years ago
Dominique Martinet
5766f426aa
config reload: destroy old seat when removed from config
...
This adds new sway_seat_destroy and sway_cursor_destroy helpers
and compare new and old config on free
7 years ago
Tony Crisci
83ddd2d9db
render override redirect
7 years ago
Dominique Martinet
67985e9031
sway: change all sway_log to wlr_log
7 years ago
Tony Crisci
39e7871a85
dont set cursor image on motion
7 years ago
Tony Crisci
9fa70ce426
Merge branch 'wlroots' into feature/input
7 years ago
Tony Crisci
92fef27eaa
basic configuration
7 years ago
Tony Crisci
21626e8153
seat focus on button press
7 years ago
Tony Crisci
5f644d78fc
button and axis events
7 years ago
Tony Crisci
e69b052a6d
working pointer motion
7 years ago
Tony Crisci
9333a7eb53
working xcursor
7 years ago
Tony Crisci
d76e745b73
input include directory
7 years ago
Tony Crisci
ec7fc42a00
sway cursor
7 years ago