mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
chase wlroots: ime: don't use data in kb grab destroy handler (MR 5170)
Ref: 06275103f249cd2954630e59383342e102a6c1a3 (input-method-v2: Destroy keyboard grab before input method) Background: My MR in wlroots (!5107) stopped emitting `wlr_input_method_v2` on its `commit`/`destroy` events, but didn't stop emitting `wlr_input_method_keyboard_grab_v2` on its `destroy` event. That was because `handle_keyboard_grab_destroy()` was called *after* `handle_input_method_destroy()` for some reason, which caused segfault when dereferencing `relay->input_method.keyboard_grab` in `handle_keyboard_grab_destroy()`. MR 5170 reversed this weired order of destroy handler calls, and finally stopped emitting `wlr_input_method_keyboard_grab_v2` on its `destroy` event.
This commit is contained in:
parent
a71723f1ba
commit
e764fc4964
2 changed files with 3 additions and 2 deletions
|
|
@ -309,7 +309,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 = data;
|
||||
struct wlr_input_method_keyboard_grab_v2 *keyboard_grab =
|
||||
relay->input_method->keyboard_grab;
|
||||
assert(keyboard_grab);
|
||||
|
||||
wl_list_remove(&relay->keyboard_grab_destroy.link);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[wrap-git]
|
||||
url = https://gitlab.freedesktop.org/wlroots/wlroots.git
|
||||
revision = 06aacb2a6fd237a5e1062d611909432bbcf5b566
|
||||
revision = 06275103f249cd2954630e59383342e102a6c1a3
|
||||
|
||||
[provide]
|
||||
dependency_names = wlroots-0.20
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue