Commit Graph

121 Commits

Author SHA1 Message Date
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
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
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
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
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
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
0ab2b3134e code: simplify view rendering 2020-06-11 01:19:59 +02:00
ddc7da0f16 transactions: save transform, refactor rendering 2020-06-10 00:06:26 +02:00
48ea771310 transactions: save and render subsurface buffers 2020-06-09 23:13:14 +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
b8cc4cc22c river-status: send view_tags on view output change 2020-06-06 15:07:19 +02:00
a63fb461ba river-status: send view_tags on view map/unmap 2020-06-05 00:24:46 +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