Commit Graph

49 Commits

Author SHA1 Message Date
be4330288d river: rework core data structures & transactions 2023-02-28 18:28:17 +01:00
b7ac5becfb pointer-constraints: remove protocol
This implementation as it stands is incomplete/buggy and will make
updating to wlr_scene more complex.

It will be reimplemented after updating to wlr_scene is complete.
2023-02-28 14:55:58 +01:00
0ccf0e65d5 deps: update to latest zig-wayland/zig-wlroots 2023-02-27 13:35:55 +01:00
6ac3928556 idle: support ext-idle-notify-v1, drop KDE protocol
This commit is a breaking change as it drops support for the now
obsolete org_kde_kwin_idle protocol.
2022-12-24 18:18:09 +01:00
78a46c316a input-inhibit: remove support for protocol
The only valid use-case for this as far as I'm concerned is lockscreens,
which will now be supported through ext-session-lock-v1.
2022-11-13 16:45:18 +01:00
489a49735a river: update to wlroots 0.16 2022-11-13 16:16:07 +01:00
5cce49095a Seat: refactor InputDevice handling
- The lifetimes of the Keyboard and Switch structs are now directly
tied to the corresponding InputDevice, which has become a field of
those structs.

- Seat capabilities are now properly updated on removing a keyboard.

These changes align with input device refactoring in upstream wlroots
which will make updating to easier 0.16.0.
2022-06-21 16:25:37 +02:00
c40dc5ee75 InputDevice: move to separate file 2022-06-20 16:29:35 +02:00
d657dc791b river-status: add mode event to seat status
This allows clients such as a status bar to display the currently active
mode.
2022-06-01 00:15:09 +02:00
da59632cea code: Cleanup use of std library for consistancy 2022-02-08 12:02:05 +01:00
422cd3e01f input: Improve input device name format
The name now includes the type, for the case of a physical device
advertising more than one logical device.
2022-02-05 18:52:46 +01:00
53f84b76f3 input: keep applying input configs after first match
Device identifiers aren't so unique after all
2022-02-05 18:52:16 +01:00
79d7775a3d code: relicense to GPL-3.0-only
I don't need anyone's permission to make this change since
GPL-3.0-or-later is one-way compatible with GPL-3.0-only.
2022-01-31 19:33:22 +01:00
c1d985ac29 build: update to zig version 0.9.0 2021-12-24 05:28:14 +00:00
4d19621f1e river: update to wlroots 0.15.0 2021-12-21 03:18:30 +00:00
1baf3bf462 seat: always add view to focus stack on map
Currently if a view is mapped while some other view is fullscreen, it
will not be added to the focus stack, which means that if the fullscreen
view is then closed the view which was not added to the focus stack will
not be focused.

To fix this, always add views to the focus stack on map.
2021-08-10 21:54:36 +02:00
53dd3875b3 cursor: avoid sending unnecessary pointer motion events
If the current Cursor.maybeResetState() function is called while in
passthrough mode, it will send a pointer motion event. This is
unnecessary as we have already sent the same pointer motion event at
least once.

Also refactor the code slightly and improve naming.
2021-07-23 19:18:49 +02:00
36ce81bb67 cursor: add missing maybeResetState() callsite
This function needs to be called whenever pending state is made current,
which includes when views not tracked by the transaction system commit.
2021-07-23 18:37:24 +02:00
f86291169e cursor: allow commands to override cursor operations
Now that we properly handle state changes during cursor operations,
blocking these commands if the target view is the target of a cursor
operation is unnecessary complexity. It is also inconsistent as we
don't block changing the tags of the view.
2021-07-23 17:11:43 +02:00
3efcfedcf4 layer-shell: handle commits before map
A client is free to change its mind and request a different
size/anchor/etc after recieving the initial configure but before
attaching and committing the first buffer. This means that we should
respond to such a situation with a new configure.

mako has been observed doing this in the wild for example.
2021-06-22 14:07:14 +02:00
833248e805 Add basic input configuration 2021-06-13 10:37:36 -07:00
021fd8f376 code: remove now unnecessary zig fmt directives
zig fmt does what we want since zig 0.8.0
2021-06-08 03:20:56 +00:00
c8b1017923 river: remove Seat.input_manager
This is no longer needed as server is global.
2021-05-13 15:13:17 +02:00
ece465b7ed river: remove InputManager.server
The server is now global so this is no longer needed.
2021-05-13 14:53:08 +02:00
26b0acddb7 river: pointer-constraints and relative-pointer 2021-02-22 14:47:31 +01:00
98d51f6d24 Use std.log instead of log.zig 2021-02-08 18:35:11 +01:00
cc08be2dee code: clean up listener initialization 2020-12-31 15:35:35 +01:00
20d804cdb5 code: switch to custom wlroots/libwayland bindings
This is a big step up over @cImport() for ergonomics and type safety.
Nearly all void pointer casts have been eliminated!
2020-12-13 22:53:33 +01:00
f80992e329 meta: make copyright headers more maintainable
- list all files as copyright "The River Developers"
- add an AUTHORS file to acknowledge contributors
2020-11-11 20:33:43 +01:00
773c5ff687 Implement virtual_keyboard_unstable_v1 protocol 2020-10-31 17:02:08 +01:00
76217970f5 Implement wlr_virtual_pointer_unstable_v1 protocol 2020-10-31 09:47:57 +01:00
03a2da9690 Introduce mode "locked"
This mode is automatically entered when the screen is locked.
2020-10-19 16:00:17 +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
d783347476 layer-shell: default to focused output
Layer shell clients may leave the output on which to display a layer
surface up to the compositor. Instead of always putting such surfaces
on the first output use the focused output of the default seat.
2020-09-29 17:27:33 +02:00
71a751f1ad seat: clean up initialization 2020-08-21 21:06:58 +02:00
7274761069 cursor: leave mode if target view is destroyed 2020-08-21 16:31:39 +02:00
7de2edb623 seat: implement kde idle protocol 2020-08-13 12:22:32 +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
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
91052f7477 cursor: refactor mode handling 2020-08-07 12:08:58 +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
8120829e5c xwayland: set seat
This makes e.g. the clipboard work.
2020-07-09 22:31:01 +02:00
341fe1e977 code: handle out of memory as well as possible 2020-07-05 22:49:17 +02:00
79bb0accac code: improve error handling consistency 2020-06-26 00:59:31 +02:00
12d34d4ded bikeshed: rename util.allocator to util.gpa
This is less typing and more clear. A definite win.
2020-06-19 14:32:30 +02:00
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
c5de1641dc code: create util.allocator and use globally
river is not a library and passing a general purpose allocators around
everywhere does not make sense and leads to ugly code. This does not
prevent us from using local arenas if they are fitting.
2020-06-16 22:48:08 +02:00
fb8d855ec9 code: create voidCast() util function 2020-06-16 20:54:05 +02:00
939beef168 Split river and riverctl directories 2020-06-01 15:56:50 +02:00