mirror of
https://github.com/brl/mutter.git
synced 2025-08-05 08:04:50 +00:00
wayland: Introduce MetaWaylandSurfaceRole
Introduce surface roles and use it to ensure a surface never changes role. https://bugzilla.gnome.org/show_bug.cgi?id=744452
This commit is contained in:
@@ -786,6 +786,15 @@ pointer_set_cursor (struct wl_client *client,
|
||||
if (pointer->focus_serial - serial > G_MAXUINT32 / 2)
|
||||
return;
|
||||
|
||||
if (surface)
|
||||
{
|
||||
if (meta_wayland_surface_set_role (surface,
|
||||
META_WAYLAND_SURFACE_ROLE_CURSOR,
|
||||
resource,
|
||||
WL_POINTER_ERROR_ROLE) != 0)
|
||||
return;
|
||||
}
|
||||
|
||||
pointer->hotspot_x = x;
|
||||
pointer->hotspot_y = y;
|
||||
set_cursor_surface (pointer, surface);
|
||||
|
Reference in New Issue
Block a user