aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-02examples/input-method: Don't crash on NULL surrounding textGuido Günther
E.g. With e.g. gnome-terminal we never end up in handle_surrouding so it will be NULL.
2022-03-02Xwayland: use -displayfd instead of USR1Dominique Martinet
Using Xwayland -displayfd means we don't need to worry about handling SIGUSR1 to second guess when Xwayland is ready and write to the pipe: just let it do that write when it would be sending SIGUSR1 otherwise. Closes: #3356
2022-03-02Xwayland: rename notify pipe 'p' to notify_fdDominique Martinet
2022-02-28types/wlr_virtual_pointer_v1: fix wlr_pointer destroy sequenceSimon Zeni
2022-02-28types/wlr_virtual_keyboard_v1: fix wlr_keyboard destroy sequenceSimon Zeni
2022-02-28render: allow texture creation while renderingRoman Gilg
This removes an artificial limitation in form of an assert that disallowed the creation of textures while the renderer is rendering. A consumer might run its own rendering pipeline and after start of the renderer still want to create textures for internal usage.
2022-02-22interfaces: remove wlr_input_device_implSimon Zeni
2022-02-21backend/libinput: remove wlr_input_device_implSimon Zeni
2022-02-21backend/wayland: remove wlr_input_device_implSimon Zeni
2022-02-21backend/x11: remove wlr_input_device_implSimon Zeni
2022-02-21types/wlr_switch: constify implSimon Zeni
2022-02-21types/wlr_tablet_pad: constify implSimon Zeni
2022-02-21xdg-positioner: rewrite unconstraining, untie from xdg-popupKirill Primak
2022-02-21xdg-positioner: rename structsKirill Primak
To be consistent with other wlr_xdg_* structs, wlr_xdg_positioner_resource is renamed to wlr_xdg_positioner and made public, and wlr_xdg_positioner is renamed to wlr_xdg_positioner_rules. Functions which operated on wlr_xdg_positioner were renamed and updated accordingly.
2022-02-21xdg-{toplevel,popup}: extract destructorsKirill Primak
2022-02-21types/wlr_touch: add base wlr_input_deviceSimon Zeni
wlr_touch now owns its wlr_input_device. It will be initialized when the tablet tool is initialized, and finished when the touch is destroyed.
2022-02-21types/wlr_tablet_tool: add base wlr_input_deviceSimon Zeni
wlr_tablet_tool owns its wlr_input_device. It will be initialized when the tablet tool is initialized, and finished when the tablet tool is destroyed.
2022-02-21types/wlr_tablet_pad: add base wlr_input_deviceSimon Zeni
wlr_tablet_pad owns its wlr_input_device. It will be initialized when the tablet pad is initialized, and finished when the tablet pad is destroyed.
2022-02-21types/wlr_switch: add base wlr_input_deviceSimon Zeni
wlr_switch owns its wlr_input_device. It will be initialized when the switch is initialized, and finished when the switch is destroyed.
2022-02-21types/wlr_pointer: add base wlr_input_deviceSimon Zeni
wlr_pointer owns its wlr_input_device. It will be initialized when the pointer is initialized, and finished when the pointer is destroyed.
2022-02-21types/wlr_keyboard: add base wlr_input_deviceSimon Zeni
wlr_keyboard owns its base wlr_input_device. It will be initialized when the keyboard is initialized, and finished when the keyboard is destroyed.
2022-02-21types/wlr_input_device: call the specialized input device destroy function ↵Simon Zeni
on destroy In case the `wlr_input_device` is not owned by a specialized input device, the function will finish the wlr_input_device and call it's implementation destroy function if an implementation has been supplied, or simply free it.
2022-02-21interfaces/wlr_input_device: introduce wlr_input_device_finishSimon Zeni
This function releases the wlr_input_device allocated memory (it's name and it's output name), and signals its destroy event.
2022-02-21types/wlr_input_device: default vendor and product id to 0Simon Zeni
vendor and product id are set when needed by the libinput backend
2022-02-21backend/headless: remove unused wlr_headless_input_deviceSimon Zeni
2022-02-21output: clear buffer created for testRoman Gilg
When calling wlr_output_test an empty buffer might be created. This implicitly changes the pending state of the output. Ensure that such a change is only temporarily and clear such an empty buffer before returning the test result.
2022-02-21CONTRIBUTING.md: update construction/destruction functions' descriptionKirill Primak
wlroots doesn't really follow the rule of keeping `create`/`destroy` and `init`/`finish` functions in pairs, so the relevant doc section is updated accordingly.
2022-02-21Fixed compiling with FFmpeg 5.0Keith Bowes
2022-02-05wlr_cursor: constify map to region box argumentsIsaac Freund
2022-02-02xdg-popup: send invalid_positioner to the right resourceKirill Primak
2022-02-02xdg-surface: avoid emitting signals with their owner objectKirill Primak
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1008#note_1139647
2022-02-02xdg-toplevel: fix `requested` docKirill Primak
`requested` is also checked on state change requests.
2022-02-02xdg-shell: drop wlr_xdg_toplevel_set_fullscreen_eventKirill Primak
Instead, compositors can read relevant values from wlr_xdg_toplevel.requested.
2022-02-02xdg-surface: minor consistency renamingKirill Primak
2022-02-02xdg-popup: destroy popup-less grabKirill Primak
This also fixes a seat destruction segfaulting if xdg-shell was destroyed first.
2022-02-02xdg-shell: fix potential use-after-freeKirill Primak
2022-02-02xdg-shell: extract role-specific unmap logicKirill Primak
2022-02-02xdg-toplevel: change object type in event structsKirill Primak
This commit replaces wlr_xdg_toplevel_*_event::surface with a toplevel field.
2022-02-02xdg-toplevel: change parent type to xdg-toplevelKirill Primak
This commit changes wlr_xdg_toplevel::parent type from wlr_xdg_surface to wlr_xdg_toplevel.
2022-02-02xdg-shell: unify function arguments' namesKirill Primak
`wlr_xdg_surface`s are now named "surface" everywhere, and `wlr_surface`s are called "wlr_surface".
2022-02-02xdg-shell: remove "xdg" from docsKirill Primak
2022-02-02xdg-popup: fix functions' main argument typeKirill Primak
With this commit, `wlr_xdg_popup_*()` functions now expect a `wlr_xdg_popup` instead of a `wlr_xdg_surface`.
2022-02-02xdg-toplevel: fix functions' main argument typeKirill Primak
With this commit, `wlr_xdg_toplevel_*()` functions now expect a `wlr_xdg_toplevel` instead of a `wlr_xdg_surface`.
2022-02-02xdg-shell: fix create_xdg_popup() param typeKirill Primak
2022-02-02xdg-shell: rename surface role handlersKirill Primak
2022-02-02xdg-foreign: Fix crash on destroy of degenerate surfaceAlexander Orzechowski
I am running a custom compiled version of chromium with a patch to get it up and running on sway git at the moment, and in that development build I compiled there is a bug where the browser will crash if you try to open a file select dialog. When this crash happens, chromium will not close, but instead will remain open and impossible to close unless you send a SIGKILL signal to the process. However, sway will crash to tty when you send the SIGKILL. I have a hunch that when chromium is opening the file select dialog it is creating some sort of a xdg toplevel surface. But it freezes before it fully initializes the surface. When the SIGKILL signal is given, sway/wlroots will try to free the xdg_toplevel surface but because it hasn't fully initialized due to the frozen window, it segfaults. Don't be fooled by the assert, the assert is not firing, the surface pointer is indeed NULL here. * thread #1, name = 'sway', stop reason = signal SIGSEGV: invalid address (fault address: 0x28) frame #0: 0x00007ffff78b9041 libwlroots.so.11`wlr_xdg_toplevel_set_parent(surface=0x0000000000000000, parent=0x0000000000000000) at wlr_xdg_toplevel.c:159:37 156 157 void wlr_xdg_toplevel_set_parent(struct wlr_xdg_surface *surface, 158 struct wlr_xdg_surface *parent) { -> 159 assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL); 160 assert(!parent || parent->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL); 161 162 if (surface->toplevel->parent) { (lldb) up error: sway {0x0003442a}: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x67) attribute, but range extraction failed (invalid range list offset 0x67), please file a bug and attach the file at the start of this error message error: sway {0x0003442a}: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x67) attribute, but range extraction failed (invalid range list offset 0x67), please file a bug and attach the file at the start of this error message frame #1: 0x00007ffff78e176e libwlroots.so.11`destroy_imported(imported=0x000055555626d570) at wlr_xdg_foreign_v1.c:154:3 151 wl_list_for_each_safe(child, child_tmp, &imported->children, link) { 152 struct wlr_xdg_surface *xdg_child = 153 wlr_xdg_surface_from_wlr_surface(child->surface); -> 154 wlr_xdg_toplevel_set_parent(xdg_child, NULL); 155 } 156 157 wl_list_remove(&imported->exported_destroyed.link); (lldb) up frame #2: 0x00007ffff78e1b9d libwlroots.so.11`xdg_imported_handle_resource_destroy(resource=0x00005555562555a0) at wlr_xdg_foreign_v1.c:280:2 277 struct wl_resource *resource) { 278 struct wlr_xdg_imported_v1 *imported = xdg_imported_from_resource(resource); 279 if (!imported) { -> 280 return; 281 } 282 283 destroy_imported(imported); (lldb) up frame #3: 0x00007ffff794989a libwayland-server.so.0`___lldb_unnamed_symbol211 + 154 libwayland-server.so.0`___lldb_unnamed_symbol211: -> 0x7ffff794989a <+154>: andl $0x1, %r13d 0x7ffff794989e <+158>: je 0x7ffff79498b0 ; <+176> 0x7ffff79498a0 <+160>: addq $0x8, %rsp 0x7ffff79498a4 <+164>: movl $0x1, %eax (lldb) up frame #4: 0x00007ffff794fec0 libwayland-server.so.0`___lldb_unnamed_symbol290 + 64 libwayland-server.so.0`___lldb_unnamed_symbol290: -> 0x7ffff794fec0 <+64>: cmpl $0x1, %eax 0x7ffff794fec3 <+67>: jne 0x7ffff794fed3 ; <+83> 0x7ffff794fec5 <+69>: addq $0x8, %rbx 0x7ffff794fec9 <+73>: cmpq %rbx, %r13 (lldb) up frame #5: 0x00007ffff79503e0 libwayland-server.so.0`___lldb_unnamed_symbol300 + 32 libwayland-server.so.0`___lldb_unnamed_symbol300: -> 0x7ffff79503e0 <+32>: cmpl $0x1, %eax 0x7ffff79503e3 <+35>: je 0x7ffff79503f0 ; <+48> 0x7ffff79503e5 <+37>: popq %rbx 0x7ffff79503e6 <+38>: popq %r12 (lldb) up frame #6: 0x00007ffff794a30e libwayland-server.so.0`wl_client_destroy + 126 libwayland-server.so.0`wl_client_destroy: -> 0x7ffff794a30e <+126>: movq %r12, %rdi 0x7ffff794a311 <+129>: callq 0x7ffff7950150 ; ___lldb_unnamed_symbol293 0x7ffff794a317 <+135>: movq 0x8(%rbp), %rdi 0x7ffff794a31b <+139>: callq *0xdc77(%rip) (lldb) up frame #7: 0x00007ffff794a3f7 libwayland-server.so.0`___lldb_unnamed_symbol214 + 119 libwayland-server.so.0`___lldb_unnamed_symbol214: -> 0x7ffff794a3f7 <+119>: movq 0x28(%rsp), %rax 0x7ffff794a3fc <+124>: subq %fs:0x28, %rax 0x7ffff794a405 <+133>: jne 0x7ffff794a727 ; <+935> 0x7ffff794a40b <+139>: addq $0x38, %rsp (lldb) up frame #8: 0x00007ffff794d1ca libwayland-server.so.0`wl_event_loop_dispatch + 202 libwayland-server.so.0`wl_event_loop_dispatch: -> 0x7ffff794d1ca <+202>: addq $0xc, %r15 0x7ffff794d1ce <+206>: cmpq %r15, %rbp 0x7ffff794d1d1 <+209>: jne 0x7ffff794d1b8 ; <+184> 0x7ffff794d1d3 <+211>: movq 0x8(%rsp), %rcx (lldb) up frame #9: 0x00007ffff794ad37 libwayland-server.so.0`wl_display_run + 39 libwayland-server.so.0`wl_display_run: -> 0x7ffff794ad37 <+39>: movl 0x8(%rbx), %eax 0x7ffff794ad3a <+42>: testl %eax, %eax 0x7ffff794ad3c <+44>: jne 0x7ffff794ad20 ; <+16> 0x7ffff794ad3e <+46>: popq %rbx (lldb) up frame #10: 0x000055555557689a sway`server_run(server=0x00005555555f26c0) at server.c:307:2 304 wlr_backend_destroy(server->backend); 305 return false; 306 } -> 307 308 return true; 309 } 310 (lldb) up frame #11: 0x0000555555575a93 sway`main(argc=3, argv=0x00007fffffffe978) at main.c:431:2 428 swaynag_show(&config->swaynag_config_errors); 429 } 430 -> 431 server_run(&server); 432 433 shutdown: 434 sway_log(SWAY_INFO, "Shutting down sway");
2022-02-02ext-session-lock-v1: new protocol implementationIsaac Freund
This implements the new ext-session-lock-v1 protocol [1]. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/131
2022-02-01scene: Add layer_shell_v1 helperKenny Levinsen
This helper behaves similar to the xdg_shell helper, and additionally provides a little assistance for positioning and exclusive_zone management.
2022-02-01scene: try to import buffers as textures before renderingSimon Ser
The wlroots APIs currently don't allow importing/uploading a buffer during rendering operations. Scene-graph buffer nodes need to turn their wlr_buffer into a wlr_texture at some point. It's not always possible to do so at wlr_scene_buffer creation time because the scene-graph may have zero outputs at this point, thus no way to grab a wlr_renderer. Instead, add scene-graph buffers to a pending list and try to import them in wlr_scene_output_commit. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3354
2022-01-31cursor: ensure mapping box is always initializedKirill Primak
Commit 498f30aad100ca616640c7bcbf11ab8ef7d48c45 changed the logic of get_mapping() in types/wlr_cursor.c to use updated version of wlr_output_layout_get_box(). However, the case where c_device isn't NULL but doesn't have output or geometry mappings wasn't handled properly, resulting in leaving the output value uninitialized. This commit fixes `c_device != NULL` branch by returning from the function only when a mapping is found. Fixes https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3369