[gtk+/wip/carlosg/event-delivery: 55/104] gtkwidget: Visually update cursors inside widget when changing cursor
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/carlosg/event-delivery: 55/104] gtkwidget: Visually update cursors inside widget when changing cursor
- Date: Thu, 25 May 2017 14:44:44 +0000 (UTC)
commit a595f92b7baad1b6b08a5b848018d3decc215b15
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Apr 4 17:09:41 2017 +0200
gtkwidget: Visually update cursors inside widget when changing cursor
gtk/gtkwidget.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 41d5246..92845b2 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15668,7 +15668,14 @@ void
gtk_widget_set_cursor (GtkWidget *widget,
GdkCursor *cursor)
{
- g_set_object (&widget->priv->cursor, cursor);
+ GtkWidget *toplevel;
+
+ if (!g_set_object (&widget->priv->cursor, cursor))
+ return;
+
+ toplevel = gtk_widget_get_toplevel (widget);
+ if (GTK_IS_WINDOW (toplevel))
+ gtk_window_maybe_update_cursor (GTK_WINDOW (toplevel), widget, NULL);
}
GdkCursor *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]