[gtk] label: Change cursor even if unrealized
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] label: Change cursor even if unrealized
- Date: Wed, 9 Oct 2019 14:59:52 +0000 (UTC)
commit d8b0a78c1e99b7a207b937ea83b79925f21b7c68
Author: Timm Bäder <mail baedert org>
Date: Thu Sep 26 05:36:19 2019 +0200
label: Change cursor even if unrealized
Cursor don't depend on that anymore.
gtk/gtklabel.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index b9e444c2fb..ebd5e2587d 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3739,27 +3739,22 @@ static void
gtk_label_update_cursor (GtkLabel *label)
{
GtkLabelPrivate *priv = gtk_label_get_instance_private (label);
- GtkWidget *widget;
+ GtkWidget *widget = GTK_WIDGET (label);
if (!priv->select_info)
return;
- widget = GTK_WIDGET (label);
-
- if (gtk_widget_get_realized (widget))
+ if (gtk_widget_is_sensitive (widget))
{
- if (gtk_widget_is_sensitive (widget))
- {
- if (priv->select_info->active_link)
- gtk_widget_set_cursor_from_name (widget, "pointer");
- else if (priv->select_info->selectable)
- gtk_widget_set_cursor_from_name (widget, "text");
- else
- gtk_widget_set_cursor (widget, NULL);
- }
+ if (priv->select_info->active_link)
+ gtk_widget_set_cursor_from_name (widget, "pointer");
+ else if (priv->select_info->selectable)
+ gtk_widget_set_cursor_from_name (widget, "text");
else
gtk_widget_set_cursor (widget, NULL);
}
+ else
+ gtk_widget_set_cursor (widget, NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]