[gtk+] GtkWindow: Avoid an early exit
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkWindow: Avoid an early exit
- Date: Fri, 17 Oct 2014 18:01:16 +0000 (UTC)
commit 8821d488c52ca0d571fc76c8160f181c6aa43f41
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 17 13:59:39 2014 -0400
GtkWindow: Avoid an early exit
When gtk_window_set_titlebar (win, NULL) is called, we were taking
an early exit and forgot to re-map the window. This does not normally
happen in practice, but glade is about to get a 'csd' switch which
lets one toggle back and forth between titlebar and no titlebar.
gtk/gtkwindow.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index bf6d85c..d177b23 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -3977,7 +3977,8 @@ gtk_window_set_titlebar (GtkWindow *window,
priv->custom_title = FALSE;
priv->client_decorated = FALSE;
gtk_style_context_remove_class (gtk_widget_get_style_context (widget), GTK_STYLE_CLASS_CSD);
- return;
+
+ goto out;
}
if (gtk_window_supports_csd (window))
@@ -4001,6 +4002,7 @@ gtk_window_set_titlebar (GtkWindow *window,
gtk_style_context_add_class (gtk_widget_get_style_context (titlebar),
GTK_STYLE_CLASS_TITLEBAR);
+out:
if (was_mapped)
gtk_widget_map (widget);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]