1
1
Fork 0
mirror of https://github.com/swaywm/sway synced 2024-05-19 13:26:14 +02:00
Commit Graph

843 Commits

Author SHA1 Message Date
Manuel Stoeckl dcdb72757a desktop/layer_shell: provide fractional scale on creation
Also, send a matching wl_surface.preferred_buffer_scale event.
2024-05-07 16:18:43 +02:00
Kenny Levinsen 4c28916d68 config/output: Search for output config fallbacks
The original sway output config implementation enabled one output at a
time, testing modes, render formats and VRR support as it went along.
While this sort of fallback is easy to do, it has the downside of not
considering the effect of neighbor outputs on the configuration
viability.

With backend-wide commits, we can now better consider the effect of
neighbor outputs, but to handle the fact that we commit all outputs at
once we need to perform a more elaborate search of viable
configurations.

Implement a recursive configuration search for when the primary
configuration failed to apply.
2024-05-02 16:16:42 +02:00
Kenny Levinsen 646019cad9 desktop/output: Fix check if config should be stored
We want to check if a config_head existed for the current
matched_output_config, so we should check cfg->output. sway_output is a
temporary variable from a previous wl_list_for_each, and does not
contain anything useful to us.

Fixes: https://github.com/swaywm/sway/issues/8128
2024-04-23 13:31:30 +02:00
Kenny Levinsen 3b419020a3 desktop/output: Use apply_output_configs for output mgmt 2024-03-28 10:45:20 +01:00
Kenny Levinsen 98be797356 Use apply_all_output_configs to light up outputs
This allows us to test and if necessary degrade the entire backend
configuration to light everything up.
2024-03-28 10:45:20 +01:00
Alexander Orzechowski 2e951163c5 Force bilinear scaling when scaling down 2024-03-09 11:47:42 +01:00
Simon Ser 3ef5abd405 xdg-shell: send WM capabilities 2024-03-08 09:52:14 +03:00
Simon Ser 4e6d7612ff xdg-shell: implement popup repositioning 2024-03-08 09:52:14 +03:00
Simon Ser fc640d5f6c Define _POSIX_C_SOURCE globally
See discussion in https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4555
2024-02-23 17:43:19 +03:00
Access 7c11c463a3
text_input: Implement input-method popups
Co-authored-by: tadeokondrak <me@tadeo.ca>
2024-02-20 10:53:20 +01:00
Aleksei Bavshin d19810eba8 xdg-activation: distinguish activation and urgency requests
Check if the app that requested a token has provided a valid input
serial and a focused surface. Downgrade activation request to urgency
otherwise.

This is mostly in line with what other Wayland compositors decided to
do, and offers a better security than the original logic.
2024-02-17 00:54:30 -07:00
Ronan Pigott f6d22f8e68 launcher: track the seat in the launcher ctx
This is a more suitable place to track the requesting seat, since we are
able to respond appropriately to destroy notifications.
2024-02-17 00:54:30 -07:00
Simon Ser 541e6e260c Drop unnecessary includes from sway/server.h 2024-02-15 15:56:36 +01:00
Alexander Orzechowski 09c360d503 layer_shell: Handle popups through popup descriptor
We tried to synchronize layer shell popups with the parent layer shell
on commits, but this is subtly wrong because we would only update
the position for one layer shell that was committed, but not any other
layer that might be affected. By moving handling to the scene descriptor
we can iterate all popups and ensure they are synchronized.
2024-02-12 19:19:22 +03:00
Alexander Orzechowski 1846944f04 xdg_shell: Extract struct for popup descriptor 2024-02-12 19:19:22 +03:00
Alexander Orzechowski 1dc661af17 layer_shell: Arrange popups even if exclusive zone doesn't change 2024-02-12 19:19:22 +03:00
Merlin Lex 1b5515400d ext-foreign-toplevel-list: Implement protocol
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4543
2024-02-12 15:36:44 +01:00
Alexander Orzechowski e8c421e917 layer_shell: Fix typo of return instead of continue
Otherwise we would skip arranging the rest of the surfaces if one of them
isn't initialized.
2024-01-21 22:01:35 +01:00
Daniel De Graaf 2c2625acd3 Fix SIGSEGV on output destroy
```
Program terminated with signal SIGSEGV, Segmentation fault.
144                             struct wlr_layer_surface_v1 *layer_surface = surface->layer_surface;
[Current thread is 1 (Thread 0x7f1f7c5b3ac0 (LWP 2473))]
(gdb) bt
```

Add a NULL check in `find_mapped_layer_by_client` like the one in `arrange_surface`.
2024-01-21 17:32:00 +03:00
Alexander Orzechowski 5fc85c5066 scene_graph: port wlr_forgein_toplevel_management output enter/leave events 2024-01-18 18:36:54 +03:00
Alexander Orzechowski 9da295c11f scene_graph: Implement toplevel clipping 2024-01-18 18:36:54 +03:00
Alexander Orzechowski 09e11dabb2 scene_graph: Port opacity and filter modes 2024-01-18 18:36:54 +03:00
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 188811f808 scene_graph: Port layer_shell 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 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 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
Bill Li 64d644f0da Chase wlroots!4482 2023-12-27 20:57:35 +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 dbd70faf2e input/seat: drop exclusive_client
This was a input-inhibit concept.
2023-12-13 10:11:35 +01: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
Kirill Primak 47e6a1164c xdg-shell: chase events update 2023-11-23 19:41:57 +01:00
Simon Ser fd6d6f1d97 Add wlr/util/transform.h includes
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4097
Closes: https://github.com/swaywm/sway/issues/7830
2023-11-23 16:13:19 +03:00
Simon Ser 9d666a08e1 Fix reference to wlr_output_event_commit.committed
This has been dropped from wlroots. Previous commit missed that.
2023-11-21 16:52:19 +01:00
Simon Ser 5bdd608514 Apply gamma LUT when an output re-enabled
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3679
2023-11-21 15:05:58 +01:00