Commit Graph

164 Commits

Author SHA1 Message Date
dd542b5284 Output: reinitialize output_status, cleanup
If a output is removed and added back without being destroyed this must
be reinitialized.

This commit also cleans up the Root.applyPending() calls related to
output hotplug and adds some more logging.
2023-03-14 11:39:10 +01:00
05eac54b07 xdg-decoration: clean up implementation
We now send some protocol errors that wlroots 0.16 is missing [1].
This also allows us to access the xdg decoration from a view, which will
be necessary for some future changes.

[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4051
2023-03-10 18:49:30 +01:00
b7b371cb4f pointer-constraints: implement protocol
Now with 50% less pointer warping!

The new implementation requires the user to move the cursor into the
constraint region before the constraint is activated in order to keep
behavior more predictable.
2023-03-05 23:11:54 +01:00
cc2b38af92 presentation-time: support protocol 2023-03-04 23:06:41 +01:00
44004e2d28 SceneNodeData: allow access from wlr_surfaces
This replaces the old View.fromWlrSurface function and is more general.

This commit also moves the xdg activation request_activate listener to
Server as it has no reason to be in View.
2023-03-04 22:41:35 +01:00
ea4e589fdc river: clean up some uneeded TODOs 2023-03-04 20:58:02 +01:00
b4ae62cd40 View: rework configure abstraction
- Move the decision whether a configure should be tracked or not into
the xdg toplevel/xwayland code.

- Only track configures for xdg toplevels with the transaction system
if the dimensions of the view are affected.
2023-03-04 16:03:16 +01:00
0be43ad45f Root: keep all fullscreen views the correct size
Currently we may resize fullscreen views when they become visible/not
visible when switching tags even if their fullscreen state remains
constant. This is suboptimal, and as it turns out also much more complex
to implement.
2023-03-03 13:40:44 +01:00
9bfa0ece23 View: handle destroy during inflight layout demand 2023-03-02 16:42:16 +01:00
686ef11fc8 river: render floating views above the layout 2023-03-02 15:10:10 +01:00
83fe764fcd View: only send configures through transactions
This reduces the number of separate configure events sent to clients
through better batching and is also more correct.
2023-03-01 20:44:13 +01:00
ed0aa73670 Output: fix background of transformed outputs 2023-03-01 19:40:37 +01:00
b1540e2d94 Root: fix use of view.current before update
In commitTransaction() we currently the current view state to determine
whether or not to enable the view's scene tree. However we don't update
the view's current state until after that check.
2023-03-01 19:03:16 +01:00
bf759c7c57 View: clamp to output on exiting float/fullscreen 2023-03-01 17:13:14 +01:00
c1c72e23a3 Root: fix more fullscreen bugs
Moving fullscreen views between outputs now works properly.
A case in which we did not inform the client that it is no longer
fullscreen has been fixed as well.
2023-03-01 12:16:53 +01:00
6411c71151 Root: centralize focus(null) calls in applyPending() 2023-03-01 10:49:44 +01:00
8cb5ca9041 river: fix various fullscreen related bugs 2023-02-28 22:56:12 +01:00
e11d4dc0de LayerSurface: fix use-after-free on destroy
The scene_layer_surface may be destroyed before handleDestroy is called,
which means we can't rely on it to access the wlr_layer_surface in
destroyPopups().
2023-02-28 18:28:17 +01:00
005bde367c OutputStatus: rework implementation
This was motivated by the view tags not being proplerly updated by
Root.commitTransaction() when there were no views on an output.
2023-02-28 18:28:17 +01:00
be4330288d river: rework core data structures & transactions 2023-02-28 18:28:17 +01:00
f5dc67cfc1 View: use saved surface trees for transactions 2023-02-28 14:55:59 +01:00
ce7fda4ed9 Xwayland: render using the scene graph 2023-02-28 14:55:59 +01:00
0b2272ec57 DragIcon: render using the scene graph 2023-02-28 14:55:58 +01:00
dbcb75dddb LayerSurface: render using the scene graph
This also brings a lot of code cleanup and proper support for
version 4 of the protocol.
2023-02-28 14:55:58 +01:00
a545a06c5b View: implement borders with scene graph 2023-02-28 14:55:58 +01:00
f4a8d6dcc9 Output: use separate scene trees for layers 2023-02-28 14:55:58 +01:00
b38676f078 session-lock: use the scene graph 2023-02-28 14:55:58 +01:00
683ed0f04e Cursor: remove surfaceAt()
We now use the wlr_scene API to find out what is at the cursor location.
2023-02-28 14:55:58 +01:00
4f0ce8fceb render: use wlr_scene to render views 2023-02-28 14:55:58 +01:00
168756cbe8 render: remove damage tracking
This will be handled by wlr_scene shortly.
2023-02-28 14:55:58 +01:00
5274383c72 wlr-output-management: fix bug due to zig miscompilation
It looks like having the empty error capture |_| on the else branch of
the if statement causes the else branch to be ignored by the compiler.

This should be a compile error, as the condition of the if statement is
a bool, not an error union.
2023-01-30 23:48:24 +01:00
946173005d wlr-output-management: leverage new wlroots APIs
These new functions allow testing commits without messing up the
pending state of the output and needing to rollback. The new apply()
function also makes the code considerably more concise.
2023-01-24 13:55:40 +01:00
4c6f47669b wlr-output-management: apply adaptive sync state 2023-01-24 11:18:27 +01:00
09f3f141ae deps: update to Zig 0.10 2023-01-08 16:21:42 +01:00
a7f00a77ca touch: support drag and drop 2022-12-30 23:20:18 +01:00
49efbfe046 session-lock: handle output unplugging better 2022-11-13 16:45:18 +01:00
489a49735a river: update to wlroots 0.16 2022-11-13 16:16:07 +01:00
7d9d889226 deps: update to latest zig-wlroots
This fixes a nasty ABI bug that could cause river to crash when
hotplugging down to 0 outputs.
2022-06-23 18:50:00 +02:00
03e8da669c Xwayland: Rename XwaylandUnmanaged to XwaylandOverrideRedirect 2022-05-30 01:08:09 +02:00
d5c915e3cb idle-inhibit: implement protocol 2022-05-11 14:14:01 +02:00
81ba188df0 view: stop enforcing custom minimum size
I have encountered a crash (failing assert) if a view specified a fixed
size less than this minimum, and according to ifreund this behavior was
planned to be removed, anyway.
2022-03-02 20:14:27 +00:00
da59632cea code: Cleanup use of std library for consistancy 2022-02-08 12:02:05 +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
1e3ea826c0 wlr-output-management: simplify implementation
Notably, we no longer call both wlr_output_test and wlr_output_commit
when applying an output config, which seems to fix or workaround an
occasional crash since updating to wlroots 0.15.0.
2022-01-28 23:28:00 +01:00
c1d985ac29 build: update to zig version 0.9.0 2021-12-24 05:28:14 +00:00
6a093fecee river: remove wlroots 0.14 workarounds
Since updating to wlroots 0.15 we can remove several workarounds we had
in place due to wlroots improvements.
2021-12-22 20:15:57 +00:00
4d19621f1e river: update to wlroots 0.15.0 2021-12-21 03:18:30 +00:00
9270a2df08 View: fix unmap/destroy control flow
Currently the view destruction sequence is started as soon as a view
is unmapped. However, this is incorrect as a client may map the view
again instead of destroying it.

Instead, only start the view destruction sequence when the underlying
xdg toplevel or xwayland surface is destroyed.
2021-10-02 14:48:22 +02:00
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
6e51a8fcdd river-status: fix output status destruction
There was a use-after-free if the Output was destroyed first, and the
memory of the output status was leaked.
2021-08-12 22:38:08 +02:00