mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-13 13:29:47 -05:00
Move grab state to struct wl_input_device
This commit is contained in:
parent
dfce71d116
commit
9c3e8d734e
7 changed files with 140 additions and 135 deletions
|
|
@ -327,12 +327,17 @@ lose_keyboard_focus(struct wl_listener *listener,
|
|||
}
|
||||
|
||||
WL_EXPORT void
|
||||
wl_input_device_init(struct wl_input_device *device)
|
||||
wl_input_device_init(struct wl_input_device *device,
|
||||
struct wl_compositor *compositor)
|
||||
{
|
||||
wl_list_init(&device->pointer_focus_listener.link);
|
||||
device->pointer_focus_listener.func = lose_pointer_focus;
|
||||
wl_list_init(&device->keyboard_focus_listener.link);
|
||||
device->keyboard_focus_listener.func = lose_keyboard_focus;
|
||||
|
||||
device->x = 100;
|
||||
device->y = 100;
|
||||
device->compositor = compositor;
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
|
|
|
|||
|
|
@ -129,17 +129,6 @@ struct wl_shell {
|
|||
struct wl_object object;
|
||||
};
|
||||
|
||||
struct wl_input_device {
|
||||
struct wl_object object;
|
||||
struct wl_surface *pointer_focus;
|
||||
struct wl_surface *keyboard_focus;
|
||||
struct wl_array keys;
|
||||
uint32_t pointer_focus_time;
|
||||
uint32_t keyboard_focus_time;
|
||||
struct wl_listener pointer_focus_listener;
|
||||
struct wl_listener keyboard_focus_listener;
|
||||
};
|
||||
|
||||
struct wl_visual {
|
||||
struct wl_object object;
|
||||
};
|
||||
|
|
@ -156,6 +145,25 @@ struct wl_grab {
|
|||
struct wl_input_device *input_device;
|
||||
};
|
||||
|
||||
struct wl_input_device {
|
||||
struct wl_object object;
|
||||
struct wl_compositor *compositor;
|
||||
struct wl_surface *pointer_focus;
|
||||
struct wl_surface *keyboard_focus;
|
||||
struct wl_array keys;
|
||||
uint32_t pointer_focus_time;
|
||||
uint32_t keyboard_focus_time;
|
||||
struct wl_listener pointer_focus_listener;
|
||||
struct wl_listener keyboard_focus_listener;
|
||||
|
||||
int32_t x, y;
|
||||
struct wl_grab *grab;
|
||||
struct wl_grab motion_grab;
|
||||
uint32_t grab_time;
|
||||
int32_t grab_x, grab_y;
|
||||
uint32_t grab_button;
|
||||
struct wl_listener grab_listener;
|
||||
};
|
||||
|
||||
struct wl_drag_offer {
|
||||
struct wl_object object;
|
||||
|
|
@ -199,7 +207,8 @@ void
|
|||
wl_resource_destroy(struct wl_resource *resource, struct wl_client *client);
|
||||
|
||||
void
|
||||
wl_input_device_init(struct wl_input_device *device);
|
||||
wl_input_device_init(struct wl_input_device *device,
|
||||
struct wl_compositor *compositor);
|
||||
|
||||
void
|
||||
wl_input_device_set_pointer_focus(struct wl_input_device *device,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue