forked from AuroraMiddleware/gtk
Merge branch 'wip/cursor-output-scale-changes' into 'master'
wayland: Update cursor surface scale when output scale changes See merge request GNOME/gtk!224
This commit is contained in:
commit
9c3de51412
@ -4516,6 +4516,12 @@ pointer_surface_update_scale (GdkDevice *device)
|
|||||||
gdk_wayland_device_update_surface_cursor (device);
|
gdk_wayland_device_update_surface_cursor (device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gdk_wayland_seat_update_cursor_scale (GdkWaylandSeat *seat)
|
||||||
|
{
|
||||||
|
pointer_surface_update_scale (seat->master_pointer);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pointer_surface_enter (void *data,
|
pointer_surface_enter (void *data,
|
||||||
struct wl_surface *wl_surface,
|
struct wl_surface *wl_surface,
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "gdkdisplay.h"
|
#include "gdkdisplay.h"
|
||||||
#include "gdkdisplay-wayland.h"
|
#include "gdkdisplay-wayland.h"
|
||||||
#include "gdkmonitor-wayland.h"
|
#include "gdkmonitor-wayland.h"
|
||||||
|
#include "gdkseat-wayland.h"
|
||||||
#include "gdkinternals.h"
|
#include "gdkinternals.h"
|
||||||
#include "gdkdeviceprivate.h"
|
#include "gdkdeviceprivate.h"
|
||||||
#include "gdkkeysprivate.h"
|
#include "gdkkeysprivate.h"
|
||||||
@ -1883,9 +1884,20 @@ transform_to_string (int transform)
|
|||||||
static void
|
static void
|
||||||
update_scale (GdkDisplay *display)
|
update_scale (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
|
GList *seats;
|
||||||
|
GList *l;
|
||||||
|
|
||||||
g_list_foreach (gdk_wayland_display_get_toplevel_surfaces (display),
|
g_list_foreach (gdk_wayland_display_get_toplevel_surfaces (display),
|
||||||
(GFunc)gdk_wayland_surface_update_scale,
|
(GFunc)gdk_wayland_surface_update_scale,
|
||||||
NULL);
|
NULL);
|
||||||
|
seats = gdk_display_list_seats (display);
|
||||||
|
for (l = seats; l; l = l->next)
|
||||||
|
{
|
||||||
|
GdkSeat *seat = l->data;
|
||||||
|
|
||||||
|
gdk_wayland_seat_update_cursor_scale (GDK_WAYLAND_SEAT (seat));
|
||||||
|
}
|
||||||
|
g_list_free (seats);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -41,4 +41,6 @@ struct _GdkWaylandSeatClass
|
|||||||
|
|
||||||
GType gdk_wayland_seat_get_type (void) G_GNUC_CONST;
|
GType gdk_wayland_seat_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
void gdk_wayland_seat_update_cursor_scale (GdkWaylandSeat *seat);
|
||||||
|
|
||||||
#endif /* __GDK_WAYLAND_SEAT_H__ */
|
#endif /* __GDK_WAYLAND_SEAT_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user