cursor-renderer: Add a cursor painted signal
This signal allows interested parties to be notified of a new cursor frame being painted regardless of whether it's being painted by the backend directly or if it's a software rendered cursor frame handled by clutter. https://bugzilla.gnome.org/show_bug.cgi?id=749913
This commit is contained in:
@@ -216,6 +216,7 @@ update_hw_cursor (MetaCursorRendererNative *native,
|
||||
MetaCRTC *crtcs;
|
||||
unsigned int i, n_crtcs;
|
||||
MetaRectangle rect;
|
||||
gboolean painted = FALSE;
|
||||
|
||||
monitors = meta_monitor_manager_get ();
|
||||
meta_monitor_manager_get_resources (monitors, NULL, NULL, &crtcs, &n_crtcs, NULL, NULL);
|
||||
@@ -247,8 +248,12 @@ update_hw_cursor (MetaCursorRendererNative *native,
|
||||
drmModeMoveCursor (priv->drm_fd, crtcs[i].crtc_id,
|
||||
rect.x - crtc_rect->x,
|
||||
rect.y - crtc_rect->y);
|
||||
painted = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (painted)
|
||||
meta_cursor_renderer_emit_painted (renderer, cursor_sprite);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Reference in New Issue
Block a user