mirror of
https://github.com/labwc/labwc.git
synced 2026-03-02 01:40:24 -05:00
Give keyboard focus to xdg-popups of unfocused layer-shell clients
...in support of enabling panel menus to be opened by keyboard shortcuts and get keyboard focus so that they can be operated with the keyboard. An example use-case is the xfce4-panel applications-menu being opened by the command xfce4-popup-applicationmenu.
This commit is contained in:
parent
89325fbff8
commit
180293e0bb
4 changed files with 70 additions and 0 deletions
11
src/seat.c
11
src/seat.c
|
|
@ -759,6 +759,17 @@ seat_reconfigure(struct server *server)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
seat_force_focus_surface(struct seat *seat, struct wlr_surface *surface)
|
||||
{
|
||||
uint32_t *pressed_sent_keycodes = key_state_pressed_sent_keycodes();
|
||||
int nr_pressed_sent_keycodes = key_state_nr_pressed_sent_keycodes();
|
||||
struct wlr_keyboard *kb = &seat->keyboard_group->keyboard;
|
||||
|
||||
wlr_seat_keyboard_enter(seat->seat, surface,
|
||||
pressed_sent_keycodes, nr_pressed_sent_keycodes, &kb->modifiers);
|
||||
}
|
||||
|
||||
static void
|
||||
seat_focus(struct seat *seat, struct wlr_surface *surface,
|
||||
bool replace_exclusive_layer, bool is_lock_surface)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue