Commit Graph

136 Commits

Author SHA1 Message Date
Marten Ringwelski
fc549d6249 code: Refactor Root.addOutput 2020-12-07 11:47:55 +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
Marten Ringwelski
d23b8a7f27 code: Move wlr_output_layout_add from Output.init to Root.addOutput 2020-11-02 14:08:00 +01:00
Marten Ringwelski
1bd6f6bed1 code: Remove most of the hack around @cImport and flexible arrays 2020-10-30 15:23:52 +01:00
Leon Henrik Plickat
b67ea748a3 Implement configurable view opacity with fade effect 2020-10-05 23:03:57 +02:00
Isaac Freund
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
Isaac Freund
f597e7da63
seat: implement drag and drop 2020-09-14 20:11:25 +02:00
Isaac Freund
dd425a3e66
root: clean up initialization 2020-08-21 21:06:59 +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
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
Isaac Freund
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
Isaac Freund
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
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
56df9176b3
server: handle SIGINT/SIGTERM with wl_event_loop
This is cleaner than having a separate signal handler and should be more
consistent/reliable.
2020-08-01 17:27:49 +02:00
Isaac Freund
014963612c
river-status: fix bug sending old output tag state 2020-07-06 11:09:23 +02:00
Isaac Freund
341fe1e977
code: handle out of memory as well as possible 2020-07-05 22:49:17 +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
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
79bb0accac
code: improve error handling consistency 2020-06-26 00:59:31 +02:00
Isaac Freund
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
Isaac Freund
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
Isaac Freund
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
Isaac Freund
fb8d855ec9
code: create voidCast() util function 2020-06-16 20:54:05 +02:00
Isaac Freund
48ea771310
transactions: save and render subsurface buffers 2020-06-09 23:13:14 +02:00
Isaac Freund
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
Isaac Freund
24b1a566de
transactions: revert c0d7e71 2020-06-09 17:04:38 +02:00
Isaac Freund
7c094420ed
transactions: propogate x/y of new box if needed 2020-06-08 14:11:52 +02:00
Isaac Freund
5f2aa02132
transactions: set timeout back to 200ms
The change to 1000ms was an accident
2020-06-08 01:16:15 +02:00
Isaac Freund
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
Isaac Freund
7b1e07d3d5
code: remove dead code 2020-06-07 19:40:19 +02:00
Isaac Freund
a63fb461ba
river-status: send view_tags on view map/unmap 2020-06-05 00:24:46 +02:00
Isaac Freund
5aa7fe8af8
river-status: implement protocol 2020-06-04 16:56:58 +02:00
Isaac Freund
03fc51d8d6
Eliminate some magic numbers 2020-06-02 17:02:03 +02:00
Isaac Freund
9856bc92ec
Clean up some memory leaks 2020-06-02 13:45:56 +02:00
Isaac Freund
eaf13f3bcf
Don't recreate transaction timer unnecessarily 2020-06-02 00:18:28 +02:00
Isaac Freund
939beef168
Split river and riverctl directories 2020-06-01 15:56:50 +02:00