mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
Move pointer drawing into compositor.
This commit is contained in:
parent
e9d550bdd4
commit
4c9f2c9b1a
4 changed files with 156 additions and 35 deletions
10
wayland.c
10
wayland.c
|
|
@ -588,11 +588,16 @@ void
|
|||
wl_display_post_relative_event(struct wl_display *display,
|
||||
struct wl_object *source, int dx, int dy)
|
||||
{
|
||||
const struct wl_compositor_interface *interface;
|
||||
uint32_t p[4];
|
||||
|
||||
display->pointer_x += dx;
|
||||
display->pointer_y += dy;
|
||||
|
||||
interface = display->compositor->interface;
|
||||
interface->notify_pointer_motion(display->compositor, source,
|
||||
display->pointer_x, display->pointer_y);
|
||||
|
||||
p[0] = source->id;
|
||||
p[1] = (sizeof p << 16) | WL_POINTER_MOTION;
|
||||
p[2] = display->pointer_x;
|
||||
|
|
@ -605,11 +610,16 @@ void
|
|||
wl_display_post_absolute_event(struct wl_display *display,
|
||||
struct wl_object *source, int x, int y)
|
||||
{
|
||||
const struct wl_compositor_interface *interface;
|
||||
uint32_t p[4];
|
||||
|
||||
display->pointer_x = x;
|
||||
display->pointer_y = y;
|
||||
|
||||
interface = display->compositor->interface;
|
||||
interface->notify_pointer_motion(display->compositor, source,
|
||||
display->pointer_x, display->pointer_y);
|
||||
|
||||
p[0] = source->id;
|
||||
p[1] = (sizeof p << 16) | WL_POINTER_MOTION;
|
||||
p[2] = display->pointer_x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue