[gtk/wip/baedert/for-master] label: Only care about clipboard in unrealize of we need to
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master] label: Only care about clipboard in unrealize of we need to
- Date: Sat, 27 Jun 2020 09:50:40 +0000 (UTC)
commit d0bb72a2aa4c29a0dfd9bf70e0575f93e6a0b50e
Author: Timm Bäder <mail baedert org>
Date: Sat Jun 27 11:38:25 2020 +0200
label: Only care about clipboard in unrealize of we need to
gtk/gtklabel.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index b281422683..a42ff5a29d 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3573,12 +3573,15 @@ static void
gtk_label_unrealize (GtkWidget *widget)
{
GtkLabel *self = GTK_LABEL (widget);
- GdkClipboard *clipboard;
- clipboard = gtk_widget_get_primary_clipboard (widget);
if (self->select_info &&
- gdk_clipboard_get_content (clipboard) == self->select_info->provider)
- gdk_clipboard_set_content (clipboard, NULL);
+ self->select_info->provider)
+ {
+ GdkClipboard *clipboard = gtk_widget_get_primary_clipboard (widget);
+
+ if (gdk_clipboard_get_content (clipboard) == self->select_info->provider)
+ gdk_clipboard_set_content (clipboard, NULL);
+ }
GTK_WIDGET_CLASS (gtk_label_parent_class)->unrealize (widget);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]