Commit Graph
48 Commits
Author SHA1 Message Date
Isaac Freund 4d19621f1e river: update to wlroots 0.15.0 2021-12-21 03:18:30 +00:00
Isaac Freund 98aed8d47e river: fix viewporter protocol implementation
It turns out that wlroots requires us to do a bit more than just create
the wlr_viewporter. Docs are being added to the wlroots header in
https://github.com/swaywm/wlroots/pull/3171
2021-09-06 19:03:17 +02:00
novakaneandIsaac Freund e59c2a73d7 river: implement xdg-activation-v1
- add a new "urgent" border color
- add a new event to river-status-unstable-v1

Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
2021-08-19 12:58:52 +00:00
Keith HubbardandIsaac Freund 556d790694 render: draw borders before rendering views
Menus, tooltips, etc. can extend beyond a view's borders.  Render views
after their borders so floating content appears on top.

Unfocused floating content can still be obscured by views higher in the
stack and the focused view.
2021-08-07 10:18:52 +00:00
Isaac Freund f62eedb048 render: sync with Cursor.surfaceAt(), draw all view popups
This was slightly out of sync with Cursor.surfaceAt() which did not
fullscreen or xwayland unmanaged views properly. Also simplify things
and improve correctness by always rendering all xdg popups. A view
losing focus does not always mean that all popups will be destroyed.
2021-07-23 15:42:47 +02:00
Isaac Freund 96e1082156 river: remove opacity command
This code is complex and increases maintenance burden but doesn't
add any functionality, only eye-candy.

Futhermore, neither I nor any of the core contributors use it.

There may be a place in river for such eye-candy down the line, in which
case this code could be revived. Currently river is early enough in its
development that our focus should be on core functionality instead.
2021-07-20 08:47:02 +00:00
Isaac Freund 39578db134 render: @panic() if CLOCK_MONOTONIC is not supported
Making this unreachable and invoking illegal behavior is incorrect.
2021-06-27 13:20:36 +02:00
Isaac Freund c0a2286847 code: update to zig 0.8.0 2021-06-05 17:29:58 +00:00
Isaac Freund 13f01bcb4b render: do basic yes/no damage tracking 2021-05-24 16:43:21 +02:00
Isaac Freund ac27db236a river: remove Output.root
The server is now global so this is no longer needed.
2021-05-13 14:35:36 +02:00
Isaac Freund 89e0d4c083 river: remove Root.server
The server is now global so this is no longer needed.
2021-05-13 14:26:27 +02:00
Isaac Freund 7ccb4794c9 river: always render floating views above layout views 2021-05-05 15:54:52 +02:00
Isaac Freund 9e3e92050e river: update for wlroots 0.13.0 2021-04-08 00:21:17 +02:00
Isaac Freund 3c1f1df0c0 render: don't schedule new frame on output commit failure
This reverts commit c457b12cf3.

This attempted workaround seems to work fine if the output commit only
fails with EBUSY, but enters an infinite loop otherwise.
2021-03-28 13:55:22 +02:00
QiuandGitHub c457b12cf3 render: schedule new frame on output commit failure
This seems to fix issues with rendering freezing described in
https://github.com/ifreund/river/issues/153.
2021-03-27 16:17:24 +01:00
foxfromabyssandIsaac Freund 98d51f6d24 Use std.log instead of log.zig 2021-02-08 18:35:11 +01:00
Isaac Freund a672738603 render: iterate subsurfaces of popups manually
wlr_xdg_surface_for_each_popup() fails to do this and
wlr_xdg_surface_for_each_popup_surface() is not yet merged, so implement
a workaround for now.
2021-01-07 16:11:48 +01:00
Isaac Freund 751b63f6fa render: pass Output by constant pointer
This is semantically what we want as we store a pointer to the output in
the SurfaceRenderData struct.
2021-01-06 17:53:04 +01:00
Isaac Freund b73cb7bb69 render: draw popups over borders 2021-01-05 20:05:35 +01:00
Isaac Freund 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
Marten RingwelskiandIsaac Freund b2b1a1f5e1 render: remove unnecessary call to wlr_output_effective_resolution 2020-12-12 16:35:33 +01:00
Marten RingwelskiandIsaac Freund 4b7246685f code: Fix render call width and height 2020-12-07 11:47:55 +01:00
Isaac Freund dae6c06e0c screencopy: add workaround for wlroots bug
Currently screencopy's copy_with_damage request is broken for
compositors not submitting damage. As a workaround simply damage
the whole output each frame.
2020-12-05 01:10:06 +01:00
Isaac Freund 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
Isaac Freund 77d3eb1bf0 layer-shell: render all popups over top layer
This means the popups belonging to e.g. a surface in the background
layer will be rendered over views.
2020-11-10 12:12:56 +01:00
Marten RingwelskiandIsaac Freund 30b1675fe8 render: Print a log message when wlr_output_commit fails 2020-10-31 19:11:22 +01:00
Leon Henrik PlickatandIsaac Freund b67ea748a3 Implement configurable view opacity with fade effect 2020-10-05 23:03:57 +02:00
Isaac Freund f597e7da63 seat: implement drag and drop 2020-09-14 20:11:25 +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 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 0ebb5ccc17 code: update to wlroots 0.11.0 2020-07-16 21:20:43 +02:00
Leon Henrik PlickatandIsaac Freund be29b0ef95 Implement csd_filter list 2020-07-16 17:08:19 +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 7b6e05005d render: draw fullscreen views properly
- use a solid black background
- only draw the overlay layer
2020-06-29 01:46:24 +02:00
Isaac Freund 82a444a7c0 view: use saved geometry for borders if needed
This fixes the issues caused by 60f06a1 and greatly simplifies the code.
Turns out we were already tracking the dimensions needed.
2020-06-28 20:45:17 +02:00
Isaac Freund 60f06a1a40 view: draw borders around actual dimensions
Previously if the view did not take the size requested, we would draw
the borders around the size we asked the view to take rather than its
actual size.
2020-06-28 01:46:53 +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 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
Isaac Freund fb8d855ec9 code: create voidCast() util function 2020-06-16 20:54:05 +02:00
Isaac Freund e1a1459177 xdg-shell: improve child handling
- wait until map to send tiled state
- only set toplevels with no parent to tiled (toplevels with a parent
are generally popup-like things such as a file chooser or yes/no prompt)
- track dimesions and offset of the surface and take offset into account
for rendering.
2020-06-13 23:38:00 +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-dolphinandIsaac Freund efe2c2ce4b command: add border_focused_color and border_unfocused_color options 2020-06-13 11:53:39 +02:00
Isaac Freund 0ab2b3134e code: simplify view rendering 2020-06-11 01:19:59 +02:00
Isaac Freund ff219c7d8d render: floating as normal, focused views on top
This means that floating views can be (partially) obscured by normal
views if they are low in the stack, and that the "full" layout will
work a little nicer as the focused view is always the top rendered.
2020-06-11 00:09:42 +02:00
Isaac Freund ddc7da0f16 transactions: save transform, refactor rendering 2020-06-10 00:06:26 +02:00
Isaac Freund 48ea771310 transactions: save and render subsurface buffers 2020-06-09 23:13:14 +02:00
Isaac Freund 939beef168 Split river and riverctl directories 2020-06-01 15:56:50 +02:00