[gtk/cursor-things: 3/3] window: Stop juggling cursors
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/cursor-things: 3/3] window: Stop juggling cursors
- Date: Thu, 18 Apr 2019 19:32:41 +0000 (UTC)
commit f3821031e0e9d06fe2bf5b613f2bce036dd54455
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Apr 18 15:07:01 2019 -0400
window: Stop juggling cursors
We have convenience api for this.
gtk/gtkwindow.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 936457692c..57ea9b14ce 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1774,7 +1774,6 @@ gtk_window_capture_motion (GtkWidget *widget,
gdouble x,
gdouble y)
{
- GdkCursor *cursor = NULL;
gint i;
const gchar *cursor_names[8] = {
"nw-resize", "n-resize", "ne-resize",
@@ -1786,15 +1785,10 @@ gtk_window_capture_motion (GtkWidget *widget,
{
if (edge_under_coordinates (GTK_WINDOW (widget), x, y, i))
{
- cursor = gdk_cursor_new_from_name (cursor_names[i], NULL);
+ gtk_widget_set_cursor_from_name (widget, cursor_names[i]);
break;
}
}
-
- gtk_widget_set_cursor (widget, cursor);
-
- if (cursor)
- g_object_unref (cursor);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]