mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-17 19:18:08 +02:00
libweston-desktop: Set grab client before calling grab functions
This prevents a spurious pointer focus clear at the start of a grab. This would, for example, cause an extra pointer leave when bringing up a right-click pop-up in a ttk app like weston-terminal. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
142ec0f477
commit
58de1aac5c
1 changed files with 4 additions and 4 deletions
|
|
@ -299,6 +299,10 @@ weston_desktop_seat_popup_grab_start(struct weston_desktop_seat *seat,
|
|||
return false;
|
||||
}
|
||||
|
||||
seat->popup_grab.initial_up =
|
||||
(pointer == NULL || pointer->button_count == 0);
|
||||
seat->popup_grab.client = client;
|
||||
|
||||
if (keyboard != NULL &&
|
||||
keyboard->grab->interface != &weston_desktop_seat_keyboard_popup_grab_interface)
|
||||
weston_keyboard_start_grab(keyboard, &seat->popup_grab.keyboard);
|
||||
|
|
@ -311,10 +315,6 @@ weston_desktop_seat_popup_grab_start(struct weston_desktop_seat *seat,
|
|||
touch->grab->interface != &weston_desktop_seat_touch_popup_grab_interface)
|
||||
weston_touch_start_grab(touch, &seat->popup_grab.touch);
|
||||
|
||||
seat->popup_grab.initial_up =
|
||||
(pointer == NULL || pointer->button_count == 0);
|
||||
seat->popup_grab.client = client;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue