Commit Graph

29 Commits

Author SHA1 Message Date
Isaac Freund
976a3ce73d
cursor: handle borderless views in move/resize 2020-09-08 18:54:57 +02:00
Isaac Freund
989e7aaeda
config: implement map-pointer command
This command takes a mode, modifiers, button/event name, and pointer
action as arguments. It stores these in the config data structure.

The currently available pointer actions are move-view and resize-view,
which replace the previously hard-coded functionality.

Closing the hovered view with middle click has temorarily been removed
until it is decided if we wish to make this another special pointer
action or perhaps allow running any arbitrary command (which would of
course include close).
2020-08-24 18:57:43 +02:00
Isaac Freund
71a751f1ad
seat: clean up initialization 2020-08-21 21:06:58 +02:00
Isaac Freund
7274761069 cursor: leave mode if target view is destroyed 2020-08-21 16:31:39 +02:00
Isaac Freund
db416eb119 view stack: rework iteration for flexibility
There is now a single iter() function which accepts a filter and context
allowing users of the api to filter the views in any arbitrary way. This
change allowed for a good amount of code cleanup, and this commit also
ensures that the correct properties are checked in each case, including
the new View.destroying field added in the previous commit. This fixes
at least one crash involving switching focus to a destroying view.
2020-08-21 16:31:39 +02:00
Isaac Freund
7de2edb623
seat: implement kde idle protocol 2020-08-13 12:22:32 +02:00
Isaac Freund
7a6ac8eb6e seat: set focus before starting transactions
Focus was made double-buffered in 96a91fd. However, much of the code
still behaved as if focus was separate from the transaction system.
This commit completes the work started in 96a91fd and ensures that
focus is applied consistently in a single transaction.
2020-08-13 11:17:15 +02:00
Isaac Freund
2669a615b6 root: refactor transaction initiation
- require the caller to use Root.startTransaction() directly
- introduce View.applyPending() to unify logic
- introduce View.shouldTrackConfigure() to unify more logic
- update all callsites to intelligently rearrange only what is necessary
2020-08-13 11:17:15 +02:00
Isaac Freund
e66c8b0019
code: clean up cursor resize mode
- offset_{x,y} is consistent with delta_{x,y}
- no need to name the type, it's only referenced in one place
2020-08-07 21:36:28 +02:00
Isaac Freund
0c4e3295b1
cursor: implement implicit grabs
When a button is held down and the cursor leaves a surface, events now
continue to be sent to the client. This allows e.g. dragging a scroll
bar from outside the surface.
2020-08-07 13:54:58 +02:00
Isaac Freund
91052f7477
cursor: refactor mode handling 2020-08-07 12:08:58 +02:00
Isaac Freund
96a91fd2f7 view: double buffer focus, use counter not bool
- Double buffering focus state ensures that border color is kept in sync
with the transaction state of views in the layout.
- Using a counter instead of a bool will allow for proper handling of
multiple seats. This is done in the same commit to avoid more churn in
the future.
2020-08-03 18:54:18 +02:00
Isaac Freund
d6823fe3a0 cursor: handle xwayland views for move/resize 2020-07-31 17:06:26 +02:00
Isaac Freund
ecef8c2dc4 cursor: forbid move/resize of fullscreen views 2020-07-31 17:06:26 +02:00
Isaac Freund
9f3ee76e51 cursor: implement resize 2020-07-31 17:06:26 +02:00
Isaac Freund
ac3066d8fc
code: refactor and simplify cursor move mode 2020-07-28 16:17:16 +02:00
Isaac Freund
627ab7ec8a
cursor: ensure theme loaded on output creation 2020-07-17 20:40:33 +02:00
Isaac Freund
0091445b9f
cursor: properly set XCURSOR_SIZE if default 2020-07-17 12:58:54 +02:00
Isaac Freund
0ebb5ccc17
code: update to wlroots 0.11.0 2020-07-16 21:20:43 +02:00
Isaac Freund
6bdb152808
cursor: make xcursor theme configurable
- add a new command to set the theme
- export the theme of the default seat through environment variables
2020-07-14 17:34:29 +02:00
Leon Henrik Plickat
d77ac5ac7a cursor: close view on middleclick when pointer_modifier is active 2020-07-08 12:25:52 +02:00
Leon Henrik Plickat
d292e61cfd cursor: implement moving views 2020-07-07 19:06:52 +02:00
Isaac Freund
86386e84bc
output: introduce state struct
This simplifies the handling of the current/pending tags and will be
used in the future for atomic layout updates involving layer surface
exclusive zones.
2020-07-02 21:56:26 +02:00
Isaac Freund
b6ef4c5a1a
cursor: fix viewAt() ordering
Focused views must be checked first as they are always rendered on top.
2020-06-28 00:29:44 +02:00
Isaac Freund
89d0fb012d
view: use a mode enum instead of floating bool
This is in preperation for fullscreen support which will add another
mode to this enum.

This commit also fixes a bug that allowed clicking floating views though
layout views in some cases.
2020-06-27 18:12:18 +02:00
Isaac Freund
79bb0accac
code: improve error handling consistency 2020-06-26 00:59:31 +02:00
Isaac Freund
d74323bbbf
code: improve logging functions
this implements a modified version of the logging interface proposed
here: https://github.com/ziglang/zig/pull/5348
2020-06-17 01:31:38 +02:00
Isaac Freund
fb8d855ec9
code: create voidCast() util function 2020-06-16 20:54:05 +02:00
Isaac Freund
939beef168
Split river and riverctl directories 2020-06-01 15:56:50 +02:00