mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
opt: wrong position of fcitx5 popup in wayland mode electron app when first input
This commit is contained in:
parent
cf8a7516b9
commit
722b2ebefc
2 changed files with 6 additions and 2 deletions
|
|
@ -490,6 +490,7 @@ static void handle_text_input_enable(struct wl_listener *listener, void *data) {
|
||||||
update_popups_position(relay);
|
update_popups_position(relay);
|
||||||
send_state_to_input_method(relay);
|
send_state_to_input_method(relay);
|
||||||
}
|
}
|
||||||
|
wlr_text_input_v3_send_done(text_input->input);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_text_input_disable(struct wl_listener *listener,
|
static void handle_text_input_disable(struct wl_listener *listener,
|
||||||
|
|
|
||||||
|
|
@ -3125,11 +3125,14 @@ void focusclient(Client *c, int lift) {
|
||||||
/* Change cursor surface */
|
/* Change cursor surface */
|
||||||
motionnotify(0, NULL, 0, 0, 0, 0);
|
motionnotify(0, NULL, 0, 0, 0, 0);
|
||||||
|
|
||||||
|
// set text input focus
|
||||||
|
// must before client_notify_enter,
|
||||||
|
// otherwise the position of text_input will be wrong.
|
||||||
|
dwl_im_relay_set_focus(dwl_input_method_relay, client_surface(c));
|
||||||
|
|
||||||
/* Have a client, so focus its top-level wlr_surface */
|
/* Have a client, so focus its top-level wlr_surface */
|
||||||
client_notify_enter(client_surface(c), wlr_seat_get_keyboard(seat));
|
client_notify_enter(client_surface(c), wlr_seat_get_keyboard(seat));
|
||||||
|
|
||||||
// set text input focus
|
|
||||||
dwl_im_relay_set_focus(dwl_input_method_relay, client_surface(c));
|
|
||||||
/* Activate the new client */
|
/* Activate the new client */
|
||||||
client_activate_surface(client_surface(c), 1);
|
client_activate_surface(client_surface(c), 1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue