]> git.mdlowis.com Git - proto/labwc.git/commit
ime: fix segfault when IME is killed
authortokyo4j <hrak1529@gmail.com>
Thu, 7 Aug 2025 08:45:30 +0000 (17:45 +0900)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Fri, 8 Aug 2025 11:52:23 +0000 (20:52 +0900)
commit418f9cb05907be6209a36ed74d5749ce853b2e35
tree95c9ed6dfaa6d289174249aa2b96764e9be1bee6
parent02df0a15d714dc47934a0c6ba4ba57e3f841daa5
ime: fix segfault when IME is killed

Fixes up e530f43.

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 in e530f43 for now.
src/input/ime.c