mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
Merge branch 'handle-tool-scale-fix' into 'master'
gdkdevice-wayland: Update pointer scale on tablet tool proximity events See merge request GNOME/gtk!582
This commit is contained in:
commit
e8f898508a
@ -284,6 +284,7 @@ struct _GdkWaylandDevicePadClass
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void gdk_wayland_device_pad_iface_init (GdkDevicePadInterface *iface);
|
static void gdk_wayland_device_pad_iface_init (GdkDevicePadInterface *iface);
|
||||||
|
static void pointer_surface_update_scale (GdkDevice *device);
|
||||||
|
|
||||||
#define GDK_TYPE_WAYLAND_DEVICE_PAD (gdk_wayland_device_pad_get_type ())
|
#define GDK_TYPE_WAYLAND_DEVICE_PAD (gdk_wayland_device_pad_get_type ())
|
||||||
GType gdk_wayland_device_pad_get_type (void);
|
GType gdk_wayland_device_pad_get_type (void);
|
||||||
@ -3488,6 +3489,11 @@ tablet_tool_handle_proximity_in (void *data,
|
|||||||
gdk_event_set_source_device (event, tablet->current_device);
|
gdk_event_set_source_device (event, tablet->current_device);
|
||||||
gdk_event_set_device_tool (event, tool->tool);
|
gdk_event_set_device_tool (event, tool->tool);
|
||||||
|
|
||||||
|
tablet->pointer_info.pointer_surface_outputs =
|
||||||
|
g_slist_append (tablet->pointer_info.pointer_surface_outputs,
|
||||||
|
gdk_wayland_surface_get_wl_output (surface));
|
||||||
|
pointer_surface_update_scale (tablet->master);
|
||||||
|
|
||||||
GDK_DISPLAY_NOTE (seat->display, EVENTS,
|
GDK_DISPLAY_NOTE (seat->display, EVENTS,
|
||||||
g_message ("proximity in, seat %p surface %p tool %d",
|
g_message ("proximity in, seat %p surface %p tool %d",
|
||||||
seat, tablet->pointer_info.focus,
|
seat, tablet->pointer_info.focus,
|
||||||
@ -3515,7 +3521,11 @@ tablet_tool_handle_proximity_out (void *data,
|
|||||||
|
|
||||||
gdk_wayland_pointer_stop_cursor_animation (&tablet->pointer_info);
|
gdk_wayland_pointer_stop_cursor_animation (&tablet->pointer_info);
|
||||||
|
|
||||||
gdk_wayland_device_update_surface_cursor (tablet->master);
|
tablet->pointer_info.pointer_surface_outputs =
|
||||||
|
g_slist_remove (tablet->pointer_info.pointer_surface_outputs,
|
||||||
|
gdk_wayland_surface_get_wl_output (tablet->pointer_info.focus));
|
||||||
|
pointer_surface_update_scale (tablet->master);
|
||||||
|
|
||||||
g_object_unref (tablet->pointer_info.focus);
|
g_object_unref (tablet->pointer_info.focus);
|
||||||
tablet->pointer_info.focus = NULL;
|
tablet->pointer_info.focus = NULL;
|
||||||
|
|
||||||
@ -4439,7 +4449,15 @@ pointer_surface_update_scale (GdkDevice *device)
|
|||||||
void
|
void
|
||||||
gdk_wayland_seat_update_cursor_scale (GdkWaylandSeat *seat)
|
gdk_wayland_seat_update_cursor_scale (GdkWaylandSeat *seat)
|
||||||
{
|
{
|
||||||
|
GList *l;
|
||||||
|
|
||||||
pointer_surface_update_scale (seat->master_pointer);
|
pointer_surface_update_scale (seat->master_pointer);
|
||||||
|
|
||||||
|
for (l = seat->tablets; l; l = l->next)
|
||||||
|
{
|
||||||
|
GdkWaylandTabletData *tablet = l->data;
|
||||||
|
pointer_surface_update_scale (tablet->master);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user