mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
ime: fix segfault when IME is killed
Fixes upe530f43. When IME (e.g. fcitx5) is killed, relay->input_method is destroyed and then relay->input_method->keyboard_grab is destroyed, which causes null pointer dereference and crashes labwc. Possible solutions are: - Let wlroots keep emitting keyboard grab as `data` from keyboard grab's destroy handler just like before - Let wlroots destroy keyboard grab before input method - Let compositor store keyboard grab as relay->keyboard_grab But let's just revert the change ine530f43for now.
This commit is contained in:
parent
02df0a15d7
commit
418f9cb059
1 changed files with 2 additions and 2 deletions
|
|
@ -304,8 +304,8 @@ handle_keyboard_grab_destroy(struct wl_listener *listener, void *data)
|
|||
{
|
||||
struct input_method_relay *relay =
|
||||
wl_container_of(listener, relay, keyboard_grab_destroy);
|
||||
struct wlr_input_method_keyboard_grab_v2 *keyboard_grab =
|
||||
relay->input_method->keyboard_grab;
|
||||
struct wlr_input_method_keyboard_grab_v2 *keyboard_grab = data;
|
||||
assert(keyboard_grab);
|
||||
|
||||
wl_list_remove(&relay->keyboard_grab_destroy.link);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue