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:
Rui Matos
2016-01-10 17:28:54 +01:00
parent 262e184fe7
commit 2c1d3e5b70
3 changed files with 53 additions and 0 deletions

View File

@@ -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