Alexander Orzechowski
2e53de80bb
scene_graph: Arrange scene graph on transaction apply
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
5f0801b6f2
container: Don't track outputs
...
The scene graph abstraction does this for us
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
1e018e72b4
Delete old damage tracking code
...
The new scene graph abstraction handles this for us.
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
06ad734e70
scene_graph: Port view saved buffers
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
ed2724bd6c
xwayland: Cleanup geometry handling on commit
...
Instead of doing this roundabout thing where we get the surface from the
view, let's instead get it from the `wlr_surface_state` that we already
track in `handle_commit`. This makes the NULL state impossible which is
what the old `get_geometry` is checking for and generally cleans
things up a little bit.
Also don't check if the geometry x/y changed, those will always
be 0 for xwayland.
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
6e5fc4c2aa
scene_graph: Port xwayland
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
b38ed8b479
scene_graph: Port xdg_shell
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
08c484f46f
transaction: ready signals will return success bools
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
6d7b1321db
scene_graph: Port container server side decorations
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
188811f808
scene_graph: Port layer_shell
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
5b8b505af5
input: Query scene graph for relevant surface/node intersections
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
946fc80945
Introduce sway_text_node
...
This is a helper on top of a wlr_scene_buffer that will handle text
rendering for us.
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
869baff252
renderer: Remove in favor of scene_graph
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
bac3ab5526
seat: Remove dead seatop_render function
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
9a57966606
scene_graph: Port ext_session_v1
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
0639bde9fb
scene_graph: Port seatop_move_tiling indicators
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
c640c3015f
scene_graph: Port seat drag icons
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
9c17cba0b2
renderer: Render scene_graph
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
0e1a02bf0a
scene_graph: Introduce sway_scene_descriptor
...
Across a wayland compositor, there are multiple shells: It can be
a toplevel, or a layer_shell, or even something more meta like a drag
icon or highlight indicators when dragging windows around.
This object lets us store values that represent these modes of operation
and keep track of what object is being represented.
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
1b09238645
scene_graph: Use built-in linux dmabuf feedback handling
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
1eb16d1367
scene_graph: Maintain wlr_scene_node
s for the sway tree.
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
dbd2fbf430
view: init function should return a success bool
2024-01-18 18:36:54 +03:00
Alexander Orzechowski
b4d7e84d38
desktop: Rename layers to shell_layers
...
This code will be deleted later, but for the time being rename
it so it doesn't conflict with future properties.
2024-01-18 18:36:54 +03:00
Kirill Primak
2c69e19fd3
layer-shell: don't configure uninitialized surfaces
2024-01-17 16:54:37 +01:00
Kirill Primak
8d1b0cecd9
layer-shell: wait for an initial commit before configuring
2024-01-17 16:54:37 +01:00
Kirill Primak
904d256581
layer-shell: don't try to unmap on destroy
...
A surface is guaranteed to be unmapped on destruction.
2024-01-17 16:54:37 +01:00
Simon Ser
c5fd8c050f
Mark DRM lease protocol privileged
...
Allowing sandboxed clients to request DRM leases has security
implications.
2024-01-08 11:17:26 -05:00
Simon Ser
7e69a7076f
Drop wl_drm
...
See https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4397
2024-01-04 08:21:33 +01:00
Simon Ser
fa294a9094
readme: add swaybg as optional dep
2024-01-02 14:08:18 +01:00
Simon Ser
95265fba59
input: reconfigure send_events on output hotplug
...
Closes: https://github.com/swaywm/sway/issues/7890
2024-01-02 14:07:35 +01:00
Billli11
0aceff7469
Remove wlr_presentation in sway_server struct
...
It is no longer in use.
2023-12-28 11:28:28 +01:00
Bill Li
64d644f0da
Chase wlroots!4482
2023-12-27 20:57:35 +01:00
Simon Ser
22d0dd8bde
Check wlr_pointer_constraint_v1_state.cursor_hint.enabled
...
Update for a wlroots breaking change which resets the committed
mask.
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4478
2023-12-25 11:57:30 +01:00
Alexander Orzechowski
bbabb9aae8
output: Destroy when output layout is destroyed
...
Since output layout is destroyed when the wayland display is destroyed
we run into a destroy listener order problem: Either the display starts
destroying the outputs first, in which case we're good: The existing
handling will clean up. However, things go wrong if the display decides
to destroy the output layout first. In this case, sway will hold
invalid references to the output layout as part of each output so that
when it finally goes to destroy them, sway will dereference destroyed
output layout bits.
Ref: https://github.com/swaywm/sway/pull/6844#issuecomment-1843599513
2023-12-13 18:10:03 +01:00
Simon Ser
c6edbb7e5a
input/seat: simplify seat_is_input_allowed()
...
Use an early return to make the code more readable.
2023-12-13 10:11:35 +01:00
Simon Ser
e8a0205607
input/seat: rename seat_set_exclusive_client()
2023-12-13 10:11:35 +01:00
Simon Ser
607b8aed0c
input/seat: inline seat_set_exclusive_client() with NULL client
2023-12-13 10:11:35 +01:00
Simon Ser
7ad8c80bfe
input/{keyboard,switch}: rename input_inhibited variable to locked
...
This is more descriptive now.
2023-12-13 10:11:35 +01:00
Simon Ser
dbd70faf2e
input/seat: drop exclusive_client
...
This was a input-inhibit concept.
2023-12-13 10:11:35 +01:00
Simon Ser
a6ef12d968
Detect proprietary DisplayLink drivers
...
evdi is open-source, but is just some condom for their proprietary
user-space driver.
2023-12-12 10:04:14 -05:00
Simon Ser
ff07eab85b
Detect Nvidia proprietary driver via drmGetVersion()
...
This is less punishing for users with the Nvidia driver loaded but
not used by Sway (e.g. for CUDA).
2023-12-12 10:04:14 -05:00
Simon Ser
b81c4da494
Drop fglrx detection
...
This ancient driver doesn't do KMS. So we were never able to run
with it anyways.
2023-12-12 10:04:14 -05:00
Tamino Bauknecht
255ff665c5
sway: raise error on non-accessible background file
2023-12-12 09:39:46 -05:00
Simon Ser
bf2b79b284
desktop/xwayland: correctly handle association on o-r change
...
When override-redirect changes, we need to setup/teardown listeners,
just like we do for map.
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3773
2023-12-06 23:24:44 +03:00
mrusme
ae3acf26f8
Update sway.5.scd
...
Make it extra extra extra clear, because I had to stumbled upon https://github.com/swaywm/sway/issues/3292 to understand this.
2023-12-04 16:30:20 +01:00
Alexander Orzechowski
f12023b1a2
Don't destroy output layout on exit
...
wlroots will destroy this object itself.
2023-12-01 09:11:20 +01:00
Sergei Trofimovich
2cd73a33c2
sway/config.c: use memcpy()
for known buffer size
...
`gcc-14` added a new warning around dangerous use of `strncpy()` withi
known overflow:
../sway/config.c: In function 'do_var_replacement':
../sway/config.c:983:33: error: '__builtin___strncpy_chk' specified bound depends on the length of the source argument [-Werror=stringop-truncation]
983 | strncpy(newptr, var->value, vvlen);
| ^
../sway/config.c:971:45: note: length computed here
971 | int vvlen = strlen(var->value);
| ^~~~~~~~~~~~~~~~~~
It's a bit fishy to rely on truncating behaviour of `strncpy()`. The
change uses `memcpy()` as more explicit way to express copy of `vvlen`
bytes.
2023-11-29 10:30:17 +01:00
apreiml
bc7d15d64d
Update README.de.md to match the EN one
2023-11-24 12:10:47 +01:00
Manuel Stoeckl
e633fe0b40
common: move load_image to swaybar
...
swaynag, swaymsg, and sway do not use this function and are
unlikely to in the future.
2023-11-23 20:42:04 +01:00
Manuel Stoeckl
439122e887
common: rename load_background_image to load_image
2023-11-23 20:42:04 +01:00