opt: optimize clean input_method data to avoid crash when exit maomao
This commit is contained in:
@@ -2397,8 +2397,6 @@ void cleanup(void) {
|
|||||||
xwayland = NULL;
|
xwayland = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
input_method_relay_finish(input_method_relay);
|
|
||||||
|
|
||||||
wl_display_destroy_clients(dpy);
|
wl_display_destroy_clients(dpy);
|
||||||
if (child_pid > 0) {
|
if (child_pid > 0) {
|
||||||
kill(-child_pid, SIGTERM);
|
kill(-child_pid, SIGTERM);
|
||||||
@@ -2408,6 +2406,8 @@ void cleanup(void) {
|
|||||||
|
|
||||||
destroykeyboardgroup(&kb_group->destroy, NULL);
|
destroykeyboardgroup(&kb_group->destroy, NULL);
|
||||||
|
|
||||||
|
input_method_relay_finish(input_method_relay);
|
||||||
|
|
||||||
/* If it's not destroyed manually it will cause a use-after-free of wlr_seat.
|
/* If it's not destroyed manually it will cause a use-after-free of wlr_seat.
|
||||||
* Destroy it until it's fixed in the wlroots side */
|
* Destroy it until it's fixed in the wlroots side */
|
||||||
wlr_backend_destroy(backend);
|
wlr_backend_destroy(backend);
|
||||||
|
|||||||
Reference in New Issue
Block a user