aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-01commands/move: do not force focus on the moved containerRonan Pigott
My code archaeology isn't good enough to determine what this is here for, but it isn't correct. We should be able to move containers in a direction without focusing them. AFAICT i3 doesn't do this, so we shouldn't either. This fixes ipc commands like move <dir> with criteria that apply to containers which are not the current focus.
2024-03-01input: Rename WLR_INPUT_DEVICE_TABLET_TOOL to WLR_INPUT_DEVICE_TABLETLuofan Chen
wlroots has changed the naming, causing the following build errors when building: error: ‘WLR_INPUT_DEVICE_TABLET_TOOL’ undeclared
2024-02-29ipc: add `scratchpad_state` property to GET_TREEllyyr
See previous commit. This restores ipc parity with i3.
2024-02-29ipc: add `floating` property to GET_TREEllyyr
i3 has had this property for over a decade but it wasn't documented until a couple of years ago, so it was likely missed when developing sway. Add the property to get us closer to ipc parity with i3.
2024-02-28Convert to new pointer enumsSimon Ser
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4575
2024-02-28text_input: don't destroy scene_node twicellyyr
2024-02-26Add release scriptSimon Ser
2024-02-23Define _POSIX_C_SOURCE globallySimon Ser
See discussion in https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4555
2024-02-23input/text_input: fix dangling listenersSimon Ser
2024-02-20input/text_input: parent wlr_box may be uninitializedllyyr
2024-02-20text_input: Implement input-method popupsAccess
Co-authored-by: tadeokondrak <me@tadeo.ca>
2024-02-17xdg-activation: distinguish activation and urgency requestsAleksei Bavshin
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-17launcher: track the seat in the launcher ctxRonan Pigott
This is a more suitable place to track the requesting seat, since we are able to respond appropriately to destroy notifications.
2024-02-15Drop unnecessary includes from sway/server.hSimon Ser
2024-02-15Fix build with wlroots DRM backend disabledSimon Ser
The header is not installed by wlroots when the DRM backend is disabled. We don't need it here, so don't include it. Closes: https://github.com/swaywm/sway/issues/7943
2024-02-12view: drop ext_foreign_destroyKirill Primak
It's not used and causes a crash when a view is destroyed.
2024-02-12layer_shell: Handle popups through popup descriptorAlexander Orzechowski
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-12xdg_shell: Extract struct for popup descriptorAlexander Orzechowski
2024-02-12layer_shell: Arrange popups even if exclusive zone doesn't changeAlexander Orzechowski
2024-02-12ext-foreign-toplevel-list: Implement protocolMerlin Lex
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4543
2024-02-08config: use format_str() instead of hand-rolled snprintf()Simon Ser
2024-02-05commands: make primary_selection a config-only commandSimon Ser
It's not possible to switch this at runtime.
2024-02-05commands: note how xwayland/primary_selection are reset on reloadSimon Ser
2024-02-05commands/primary_selection: drop duplicate bool parsingSimon Ser
2024-02-05sway/config.c: only reset primary_selection at launchViolet Purcell
Otherwise, an error will be shown whenever reloading due to the value of primary_selection being reset to true.
2024-02-03Drop old security config remnantsSimon Ser
2024-02-02Ensure get_text_width() returns a positive valueAlexander Orzechowski
Closes: https://github.com/swaywm/sway/issues/7940
2024-01-29sway/output: Improve logging of swaybg execvp failure and more checksTamino Bauknecht
This doesn't catch the error if a background changing command is executed via swaymsg, but improves logging. The additional checks at least propagate if e.g. forking failed.
2024-01-26build: bump version to 1.10-devSimon Ser
2024-01-25Chase wlroots!4443Kirill Primak
2024-01-23Chase wlroots!4003Kirill Primak
2024-01-21layer_shell: Fix typo of return instead of continueAlexander Orzechowski
Otherwise we would skip arranging the rest of the surfaces if one of them isn't initialized.
2024-01-21Fix SIGSEGV on output destroyDaniel De Graaf
``` 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-20Add debug flag to re-enable wl_drmSimon Ser
7e69a7076fc8 ("Drop wl_drm") has dropped wl_drm, however a lot of software wasn't quite ready for this (Xwayland, libva, amdvlk). Keep wl_drm disabled by default to pressure the wl_drm phase-out, but add a -Dlegacy-wl-drm flag for users to restore the previous behavior in the meantime. References: https://github.com/swaywm/sway/issues/7897
2024-01-19Clarify gdk-pixbuf dependency purposeSimon Ser
swaybg is out-of-tree so not relevant here. swaybar's tray doesn't actually depend on gdk-pixbuf, but gdk-pixbuf enables more image formats for swaybar tray when available. Closes: https://github.com/swaywm/sway/issues/7913
2024-01-18scene_graph: port wlr_forgein_toplevel_management output enter/leave eventsAlexander Orzechowski
2024-01-18remove damage debug optionsAlexander Orzechowski
Now that we use wlr_scene, wlroots handles these. If available use the wlroots debug options instead.
2024-01-18Fix SIGSEGV on surface destroyAlexander Orzechowski
``` Program terminated with signal SIGSEGV, Segmentation fault. warning: Section `.reg-xstate/3960717' in core file too small. 0 container_get_siblings (container=0x55bcde4797f0) at ../sway/tree/container.c:1228 1228 if (list_find(container->pending.workspace->tiling, container) != -1) { [Current thread is 1 (Thread 0x7fa23b4a2940 (LWP 3960717))] (gdb) bt full= No symbol "full" in current context. (gdb) bt full 0 container_get_siblings (container=0x55bcde4797f0) at ../sway/tree/container.c:1228 1 0x000055bcdb62c704 in edge_is_external (cont=0x55bcde4797f0, edge=(WLR_EDGE_TOP | WLR_EDGE_LEFT)) at ../sway/input/seatop_default.c:54 siblings = 0x55bcde4797f0 index = 32766 layout = L_NONE __PRETTY_FUNCTION__ = "edge_is_external" 2 0x000055bcdb62c96f in find_resize_edge (cont=0x55bcde4797f0, surface=0x0, cursor=0x55bcddd5c2e0) at ../sway/input/seatop_default.c:106 edge = (WLR_EDGE_TOP | WLR_EDGE_LEFT) 3 0x000055bcdb620b3c in cursor_update_image (cursor=0x55bcddd5c2e0, node=0x55bcde4797f0) at ../sway/input/cursor.c:144 edge = WLR_EDGE_NONE 4 0x000055bcdb62eb8f in handle_rebase (seat=0x55bcddd5a740, time_msec=488992944) at ../sway/input/seatop_default.c:773 e = 0x55bcddd5c8e0 cursor = 0x55bcddd5c2e0 surface = 0x0 sx = 0 sy = 0 5 0x000055bcdb62c531 in seatop_rebase (seat=0x55bcddd5a740, time_msec=488992944) at ../sway/input/seat.c:1585 6 0x000055bcdb620a7d in cursor_rebase (cursor=0x55bcddd5c2e0) at ../sway/input/cursor.c:126 time_msec = 488992944 7 0x000055bcdb620ac4 in cursor_rebase_all () at ../sway/input/cursor.c:136 seat = 0x55bcddd5a740 8 0x000055bcdb61cc95 in transaction_apply (transaction=0x55bcde5b28c0) at ../sway/desktop/transaction.c:704 9 0x000055bcdb61ccdb in transaction_progress () at ../sway/desktop/transaction.c:716 10 0x000055bcdb61d1f9 in transaction_commit_pending () at ../sway/desktop/transaction.c:836 transaction = 0x55bcde5b28c0 11 0x000055bcdb61d596 in _transaction_commit_dirty (server_request=true) at ../sway/desktop/transaction.c:912 12 0x000055bcdb61d5ac in transaction_commit_dirty () at ../sway/desktop/transaction.c:916 13 0x000055bcdb65f579 in view_unmap (view=0x55bcde2ff180) at ../sway/tree/view.c:847 parent = 0x55bcde489010 ws = 0x55bcdde19080 seat = 0x55bcddd5a198 14 0x000055bcdb61e461 in handle_unmap (listener=0x55bcde2ff368, data=0x0) at ../sway/desktop/xdg_shell.c:394 xdg_shell_view = 0x55bcde2ff180 view = 0x55bcde2ff180 __PRETTY_FUNCTION__ = "handle_unmap" 15 0x00007fa23c4ae87f in wlr_signal_emit_safe (signal=0x55bcde46cf38, data=0x0) at ../util/signal.c:29 pos = 0x55bcde2ff368 l = 0x55bcde2ff368 cursor = {link = {prev = 0x55bcde2ff368, next = 0x7ffe240702a0}, notify = 0x7fa23c4ae7c9 <handle_noop>} end = {link = {prev = 0x7ffe24070280, next = 0x55bcde46cf38}, notify = 0x7fa23c4ae7c9 <handle_noop>} 16 0x00007fa23c47c3c7 in unmap_xdg_surface (surface=0x55bcde46ce30) at ../types/xdg_shell/wlr_xdg_surface.c:40 __PRETTY_FUNCTION__ = "unmap_xdg_surface" popup = 0x55bcde46ce60 popup_tmp = 0x55bcde46ce60 configure = 0x7ffe24070360 tmp = 0x55bcde488020 17 0x00007fa23c47cd47 in xdg_surface_role_precommit (wlr_surface=0x55bcde488020, state=0x55bcde4881a8) at ../types/xdg_shell/wlr_xdg_surface.c:330 surface = 0x55bcde46ce30 18 0x00007fa23c4813b2 in surface_commit_state (surface=0x55bcde488020, next=0x55bcde4881a8) at ../types/wlr_compositor.c:407 __PRETTY_FUNCTION__ = "surface_commit_state" invalid_buffer = false subsurface = 0xbd8e9aecae023300 --Type <RET> for more, q to quit, c to continue without paging-- 19 0x00007fa23c48192a in surface_handle_commit (client=0x55bcde488850, resource=0x55bcde2fdb80) at ../types/wlr_compositor.c:523 surface = 0x55bcde488020 20 0x00007fa23bb5ed4a in () at /usr/lib/libffi.so.8 21 0x00007fa23bb5e267 in () at /usr/lib/libffi.so.8 22 0x00007fa23c517323 in () at /usr/lib/libwayland-server.so.0 23 0x00007fa23c5125cc in () at /usr/lib/libwayland-server.so.0 24 0x00007fa23c5151ca in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0 25 0x00007fa23c512d37 in wl_display_run () at /usr/lib/libwayland-server.so.0 26 0x000055bcdb616885 in server_run (server=0x55bcdb68c5c0 <server>) at ../sway/server.c:307 27 0x000055bcdb61594e in main (argc=3, argv=0x7ffe24070af8) at ../sway/main.c:433 ``` It seems to be happening because of this set of events all happening in the span of a single transaction: 1. You kill a tiled window that is the only window in a workplace. 2. Sway will destroy the workspace but not yet the container - this makes `con->pending.workspace` NULL. 3. Cursor glyphs get recomputed causing sway to recompute if the cursor is on a container edge. 4. That computation causes an access to the NULL workspace. Crash.
2024-01-18scene_graph: Implement toplevel clippingAlexander Orzechowski
2024-01-18scene_graph: Port opacity and filter modesAlexander Orzechowski
2024-01-18scene_graph: Arrange scene graph on transaction applyAlexander Orzechowski
2024-01-18container: Don't track outputsAlexander Orzechowski
The scene graph abstraction does this for us
2024-01-18Delete old damage tracking codeAlexander Orzechowski
The new scene graph abstraction handles this for us.
2024-01-18scene_graph: Port view saved buffersAlexander Orzechowski
2024-01-18xwayland: Cleanup geometry handling on commitAlexander Orzechowski
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-18scene_graph: Port xwaylandAlexander Orzechowski
2024-01-18scene_graph: Port xdg_shellAlexander Orzechowski
2024-01-18transaction: ready signals will return success boolsAlexander Orzechowski
2024-01-18scene_graph: Port container server side decorationsAlexander Orzechowski
2024-01-18scene_graph: Port layer_shellAlexander Orzechowski