Commit Graph

148 Commits

Author SHA1 Message Date
b67ea748a3 Implement configurable view opacity with fade effect 2020-10-05 23:03:57 +02:00
27b666dbba code: update to zig master in prep for 0.7.0
This commit makes the minimal necessary changes to get things working,
there are further changes which can be made to take advantage of new
features.
2020-10-02 20:34:24 +02:00
2b77be8c87 seat: start transaction on focus-output
This fixes a delay due to the missing startTransaction() call causing
unapplied pending state.
2020-09-30 11:16:27 +02:00
3e955935eb docs: use foot in the example config.sh 2020-09-28 22:57:22 +02:00
52cd871151 Implement map -release 2020-09-15 15:58:54 +02:00
7e02fb679c Implement focus-follows-cursor 2020-09-15 15:15:55 +02:00
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
fd8c5e6410 style: attach_mode() -> attachMode() 2020-08-24 11:50:38 +02:00
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
59d6432332 Implement "attach-mode" 2020-08-18 11:00:51 +02:00
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
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
ef4efbcadf view: fix xdg_toplevel fullscreen request handling 2020-08-01 19:56:34 +02:00
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
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
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
a93c263502 Implement csd-filter-add and float-filter-add commands 2020-07-16 21:24:08 +02:00
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
8afe7c2c87 code: simplify direction parsing 2020-07-15 13:03:28 +02:00
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
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
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
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
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
34d42d9e8c xdg-shell: honor fullscreen requests 2020-06-29 11:52:53 +02:00
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
acd08840ab command: disable focus-view in fullscreen 2020-06-29 01:04:37 +02:00
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
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
9dfcec72a8 view: simplify default float dimension handling 2020-06-27 23:48:04 +02:00
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
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
40597f184d command: allow output on success, refactor 2020-06-26 17:57:03 +02:00
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
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
5de21d0d23 Commands: rework layout command 2020-06-16 15:48:53 +02:00
c2d32a44c3 command: add view_padding option 2020-06-13 13:32:35 +02:00
4f029aa5c7 command: allow alpha in colors, simplify code 2020-06-13 13:09:43 +02:00
40c62577e1 code: simplify option handling 2020-06-13 12:14:36 +02:00
efe2c2ce4b command: add border_focused_color and border_unfocused_color options 2020-06-13 11:53:39 +02:00
8839ae7335 command: don't zoom floating views 2020-06-11 01:15:01 +02:00
1b7c1c7b2c command: implement set-option
Only border and padding options are currently available.
2020-06-10 18:08:21 +02:00
2b10720366 map: allow creating mappings with no modifiers 2020-06-05 10:54:39 +02:00
5aa7fe8af8 river-status: implement protocol 2020-06-04 16:56:58 +02:00
ea7f5d4064 Use tag masks for tag commands and clean up 2020-06-02 16:38:23 +02:00
0e9ecb6051 Rename focus -> focus-view 2020-06-02 14:04:23 +02:00
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
939beef168 Split river and riverctl directories 2020-06-01 15:56:50 +02:00