Commit Graph

38 Commits

Author SHA1 Message Date
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
ef4efbcadf
view: fix xdg_toplevel fullscreen request handling 2020-08-01 19:56:34 +02:00
Isaac Freund
d2ebd5e4e2
view: remember floating dimesions
When a floating view is returned to the layout or made fullscreen, it
now saves the dimesions it had while floating and returns to that same
position/size if made to float again.
2020-07-31 20:22:37 +02:00
Isaac Freund
7a244092e5 view: sidestep transaction for float/fullscreen
Transactions are only useful when multiple views need to atomically
change size together. Float/fullscreen views are independant of the
layout and should bypass the transaction system.
2020-07-31 17:06:26 +02:00
Isaac Freund
d87356c93a view: forbid mode change if cursor target
Making a floating view tiled during a resize breaks things badly.
2020-07-31 17:06:26 +02:00
Leon Henrik Plickat
a93c263502 Implement csd-filter-add and float-filter-add commands 2020-07-16 21:24:08 +02:00
Isaac Freund
101f47d78f
code: use a tagged union to store focus
This simplifies the code and is more robust than two separate pointers.
2020-07-15 14:15:17 +02:00
Isaac Freund
8afe7c2c87
code: simplify direction parsing 2020-07-15 13:03:28 +02:00
Isaac Freund
2b2b78dd4d
command: split set-option into "toplevel" commands
`riverctl set-option view_padding 10` becomes `riverctl view-padding 10`

Having set-option doesn't really gain us anything and is more verbose as
well as being slightly inaccurate as the changes instantly apply.
2020-07-15 12:42:20 +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
Isaac Freund
f3d4e5ac53
command/spawn: use _exit(2) instead of exit(3)
Something in exit(3) is causing the intermediate fork to segfault.
2020-07-12 12:16:05 +02:00
Isaac Freund
cbf645d468
command/spawn: clean up and disown children
- Call setsid
- Clean up the signal mask.
- Use a double fork so that processes get inherited by init.
2020-07-08 14:00:51 +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
34d42d9e8c
xdg-shell: honor fullscreen requests 2020-06-29 11:52:53 +02:00
Isaac Freund
c78d31acf4
view: save and restore floating dimensions
When a floating view is fullscreened and returned to floating, it should
remember its previous floating size/position.
2020-06-29 11:15:55 +02:00
Isaac Freund
acd08840ab
command: disable focus-view in fullscreen 2020-06-29 01:04:37 +02:00
Isaac Freund
3cbd95fadc
river: implement toggle-fullscreen
The command works, but behaves a little strangely. Also, fullscreen
views are not yet rendered on an opqaue backdrop.
2020-06-29 01:00:57 +02:00
Isaac Freund
5b96d831d3
view: replace mode with float/fullscreen bools
The enum would be awkward here since if a view is fullscreened while
floating it should still be floating when defullscreened.
2020-06-28 20:30:12 +02:00
Isaac Freund
9dfcec72a8
view: simplify default float dimension handling 2020-06-27 23:48:04 +02:00
Isaac Freund
c04112b81a
view: introduce state struct to simplify code
The state struct holds all of the state that is double-buffered and
applied through transactions. This more explicit handling simplifies
much of the code, and will allow for easier implementation of new
feature such as fullscreen.
2020-06-27 23:18:41 +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
40597f184d
command: allow output on success, refactor 2020-06-26 17:57:03 +02:00
Isaac Freund
dfb03fd0cb
command: dupe mode name memory
The hashmap doesn't take ownership of the memory pointer to by these
slices, so we need to dupe them to avoid use-after-free.
2020-06-26 12:46:18 +02:00
Isaac Freund
ebc661f4a7
command: add background_color option
This is trivial to support and allows basic customization without
running a layer-shell program such as swaybg. This is especially useful
in low memory situations.
2020-06-19 18:44:28 +02:00
Leon Henrik Plickat
5de21d0d23 Commands: rework layout command 2020-06-16 15:48:53 +02:00
Isaac Freund
c2d32a44c3
command: add view_padding option 2020-06-13 13:32:35 +02:00
Isaac Freund
4f029aa5c7
command: allow alpha in colors, simplify code 2020-06-13 13:09:43 +02:00
Isaac Freund
40c62577e1
code: simplify option handling 2020-06-13 12:14:36 +02:00
lazy-dolphin
efe2c2ce4b command: add border_focused_color and border_unfocused_color options 2020-06-13 11:53:39 +02:00
Isaac Freund
8839ae7335
command: don't zoom floating views 2020-06-11 01:15:01 +02:00
lazy-dolphin
1b7c1c7b2c command: implement set-option
Only border and padding options are currently available.
2020-06-10 18:08:21 +02:00
Isaac Freund
2b10720366
map: allow creating mappings with no modifiers 2020-06-05 10:54:39 +02:00
Isaac Freund
5aa7fe8af8
river-status: implement protocol 2020-06-04 16:56:58 +02:00
Isaac Freund
ea7f5d4064
Use tag masks for tag commands and clean up 2020-06-02 16:38:23 +02:00
Isaac Freund
0e9ecb6051
Rename focus -> focus-view 2020-06-02 14:04:23 +02:00
Isaac Freund
c63420cf45
Use + instead of | to separate modifiers
Although | makes more logical sense, it has another meaning in most
shells.
2020-06-01 20:50:22 +02:00
Isaac Freund
939beef168
Split river and riverctl directories 2020-06-01 15:56:50 +02:00