From 5a8267dfaec8c097deac7646ae2fdc5dffdb790c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 6 Sep 2020 20:46:42 -0400 Subject: [PATCH 1/3] text: Set the hotspot for the drag icon This makes the drag icon align properly with the dragged text at the beginning of the drag. --- gtk/gtktext.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/gtktext.c b/gtk/gtktext.c index 7e2f2308eb..4fa9a77b21 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -2986,7 +2986,9 @@ gtk_text_drag_gesture_update (GtkGestureDrag *gesture, g_signal_connect (drag, "cancel", G_CALLBACK (dnd_cancel_cb), self); paintable = gtk_text_util_create_drag_icon (widget, text, -1); - gtk_drag_icon_set_from_paintable (drag, paintable, ranges[0], 0); + gtk_drag_icon_set_from_paintable (drag, paintable, + (priv->drag_start_x - ranges[0]), + priv->drag_start_y); g_clear_object (&paintable); priv->drag = drag; From 2738d5bc9397dfd8defd34a4f234bff2e8221656 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 7 Sep 2020 11:16:52 -0400 Subject: [PATCH 2/3] gsk: Mention gl as valid value for GSK_RENDERER --- gsk/gskrenderer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gsk/gskrenderer.c b/gsk/gskrenderer.c index 1ac74110f9..be0e930b26 100644 --- a/gsk/gskrenderer.c +++ b/gsk/gskrenderer.c @@ -510,6 +510,7 @@ get_renderer_for_name (const char *renderer_name) #endif g_print (" cairo - Use the Cairo fallback renderer\n"); g_print (" opengl - Use the default OpenGL renderer\n"); + g_print (" gl - Same as opengl\n"); #ifdef GDK_RENDERING_VULKAN g_print (" vulkan - Use the Vulkan renderer\n"); #else From d595c6ab12836a96e9d8e030c7802a95199632e0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 7 Sep 2020 11:17:24 -0400 Subject: [PATCH 3/3] gsk: Complain if we fail to realize a renderer The only likely place where this is going to happen is if a renderer was explicitly requested with the GSK_RENDERER environment variable, and in that case, it is misleading to silently use a different renderer. --- gsk/gskrenderer.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gsk/gskrenderer.c b/gsk/gskrenderer.c index be0e930b26..8ec0e0d36a 100644 --- a/gsk/gskrenderer.c +++ b/gsk/gskrenderer.c @@ -637,11 +637,10 @@ gsk_renderer_new_for_surface (GdkSurface *surface) return renderer; } - GSK_RENDERER_NOTE (renderer, RENDERER, - g_message ("Failed to realize renderer of type '%s' for surface '%s': %s\n", - G_OBJECT_TYPE_NAME (renderer), - G_OBJECT_TYPE_NAME (surface), - error->message)); + g_message ("Failed to realize renderer of type '%s' for surface '%s': %s\n", + G_OBJECT_TYPE_NAME (renderer), + G_OBJECT_TYPE_NAME (surface), + error->message); g_object_unref (renderer); g_clear_error (&error); }