Commit Graph

36 Commits

Author SHA1 Message Date
89e0d4c083 river: remove Root.server
The server is now global so this is no longer needed.
2021-05-13 14:26:27 +02:00
5e09b853f7 xwayland: allow setting size if unmapped/floating
This effectively allows unmapped and floating xwayland views to set
their own dimensions, which seems to make some popups less broken.
2021-01-31 18:24:21 +01:00
7249f5c9c3 xwayland: use layout coords for configures 2021-01-07 22:15:42 +01:00
b73cb7bb69 render: draw popups over borders 2021-01-05 20:05:35 +01:00
a2ef687e51 view: fix handling of title/app_id change 2021-01-01 13:29:57 +01:00
cc08be2dee code: clean up listener initialization 2020-12-31 15:35:35 +01:00
a098bbe03a root: stop tracking xwayland views in transactions
Frame perfection for xwayland views would require too much complexity
to support and would bleed all over the codebase.
2020-12-29 20:38:30 +01:00
760c88b094 foreign-toplevel-management: basic implementation
We do no yet set the parent of toplevels. We also only honor activate
requests if the target view is already visible on the focused output.
2020-12-24 13:07:59 +01:00
518fb96604 xwayland: handle hinted dimension < View.min_size
This avoids an assertion failure in std.math.clamp() when applying the
constraints.
2020-12-18 18:59:13 +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
ac1762567c Send zriver_seat_status_v1.focused_view when title of focused view changes 2020-10-25 17:28:13 +01:00
e4a3698d86 view: update comments
These should have been moved in the previous commit
2020-10-22 19:24:01 +02:00
79dc9cc49a xwayland: make behavior more like xdg toplevels
- float fixed size xwayland windows by default
- align configure handling with that of xdg toplevel views
2020-10-22 19:22:54 +02:00
5cea3f68e3 xwayland: clean up initialization 2020-08-21 16:48:17 +02:00
fa08d85c58 view: implement frame-perfect destroy
river's View objects may now outlive their wlroots counterparts so that
we can continue to render a destroyed view until the transaction is
completed.
2020-08-21 16:31:39 +02:00
340bfbd7f1 xwayland: fix signed to unsigned int casting error 2020-08-13 13:47:14 +02:00
bd99428766 view: handle setting fullscreen in configure() 2020-08-13 11:17:15 +02:00
946e4f21ba Enforce minimum window size also for views with constraints 2020-08-10 22:15:09 +02:00
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
d6823fe3a0 cursor: handle xwayland views for move/resize 2020-07-31 17:06:26 +02:00
9f3ee76e51 cursor: implement resize 2020-07-31 17:06:26 +02:00
dfe61fe77d xwayland: don't crash on null title 2020-07-06 16:10:59 +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
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
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
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
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
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
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
052c8e1dcb transactions: handle preemption take 2
This implementation is far simpler than c0d7e71 as it takes advantage of
wlroots's tracking of pending state.

Additionally, we now send frame done events if a view that we are
configuring commits with the wrong dimensions. This is necessary in
order to trigger a redraw for some clients as well as being a more
correct implementation of the protocol.
2020-06-09 20:06:30 +02:00
24b1a566de transactions: revert c0d7e71 2020-06-09 17:04:38 +02:00
c0d7e71ec4 transactions: handle preemption properly
when a transaction interrupts an ongoing transaction, we must be careful
to handle the configures properly. This commit adds a new member to view
so that we can store the dimensions sent with the last configure in
order to determine if the preempting transaction should override the
ongoing configure or not.

Additionally, some views do not ack a configure if they already have the
requested dimensions. This can happen if a pending configure setting
alternative dimensions is overridden, so in this case we do not wait for
an ack before committing the transaction.
2020-06-08 00:10:30 +02:00
5aa7fe8af8 river-status: implement protocol 2020-06-04 16:56:58 +02:00
939beef168 Split river and riverctl directories 2020-06-01 15:56:50 +02:00