mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-08 13:29:47 -05:00
Use a grab object for drag and drop
This commit is contained in:
parent
6d65d5f4d4
commit
287343a0d3
3 changed files with 63 additions and 50 deletions
|
|
@ -81,18 +81,6 @@ enum wlsc_pointer_type {
|
|||
WLSC_POINTER_IBEAM,
|
||||
};
|
||||
|
||||
struct wl_grab;
|
||||
struct wl_grab_interface {
|
||||
void (*motion)(struct wl_grab *grab,
|
||||
uint32_t time, int32_t x, int32_t y);
|
||||
void (*end)(struct wl_grab *grab);
|
||||
};
|
||||
|
||||
struct wl_grab {
|
||||
const struct wl_grab_interface *interface;
|
||||
struct wl_input_device *input_device;
|
||||
};
|
||||
|
||||
struct wlsc_input_device {
|
||||
struct wl_input_device input_device;
|
||||
int32_t x, y;
|
||||
|
|
@ -110,7 +98,6 @@ struct wlsc_input_device {
|
|||
int32_t grab_width, grab_height;
|
||||
int32_t grab_dx, grab_dy;
|
||||
uint32_t grab_button;
|
||||
struct wl_drag *drag;
|
||||
struct wl_listener grab_listener;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue