mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
Make gears track focus
This commit is contained in:
parent
8f2f773846
commit
9ae561d5bd
1 changed files with 10 additions and 0 deletions
10
gears.c
10
gears.c
|
|
@ -292,6 +292,15 @@ resize_handler(struct window *window, void *data)
|
|||
gears->resized = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
keyboard_focus_handler(struct window *window,
|
||||
struct wl_input_device *device, void *data)
|
||||
{
|
||||
struct gears *gears = data;
|
||||
|
||||
gears->resized = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
handle_acknowledge(void *data,
|
||||
struct wl_compositor *compositor,
|
||||
|
|
@ -404,6 +413,7 @@ gears_create(struct display *display)
|
|||
handle_frame(gears, gears->compositor, 0, 0);
|
||||
|
||||
window_set_resize_handler(gears->window, resize_handler, gears);
|
||||
window_set_keyboard_focus_handler(gears->window, keyboard_focus_handler, gears);
|
||||
|
||||
wl_compositor_add_listener(gears->compositor,
|
||||
&compositor_listener, gears);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue