From 25b58fc0a23302f3c68e7e501802d6f91f97d85e Mon Sep 17 00:00:00 2001 From: Albert Esteve Date: Wed, 24 May 2023 09:46:28 +0200 Subject: [PATCH] display-picture: set cursor on init Set cursor to none (i.e., hide it) on init. Otherwise, in cases where the define_cursor signal is not received (e.g., atomic kms), there are two cursors painted on the Widget display. Signed-off-by: Albert Esteve --- lib/mks-display-picture.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/mks-display-picture.c b/lib/mks-display-picture.c index 7e81427..d31bc02 100644 --- a/lib/mks-display-picture.c +++ b/lib/mks-display-picture.c @@ -629,6 +629,7 @@ static void mks_display_picture_init (MksDisplayPicture *self) { GtkEventController *controller; + g_autoptr(GdkCursor) gdk_cursor = gdk_cursor_new_from_name ("none", NULL); controller = gtk_event_controller_legacy_new (); g_signal_connect_object (controller, @@ -661,6 +662,7 @@ mks_display_picture_init (MksDisplayPicture *self) self, G_CONNECT_SWAPPED); + gtk_widget_set_cursor (GTK_WIDGET (self), gdk_cursor); gtk_widget_set_focusable (GTK_WIDGET (self), TRUE); }