[gtk+/gtk-3-14] Keep gtk_window_set_hide_titlebar_when_maximized working
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] Keep gtk_window_set_hide_titlebar_when_maximized working
- Date: Thu, 27 Nov 2014 01:25:16 +0000 (UTC)
commit 7c213fa980103c3a95668295df3a2f630f5e4f80
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Nov 24 06:49:19 2014 -0500
Keep gtk_window_set_hide_titlebar_when_maximized working
This broke in 510c2cdfb6362568f4384790dc06e0b1b4aba0e5.
https://bugzilla.gnome.org/show_bug.cgi?id=740287
gtk/gtkwindow.c | 31 ++++++++++++++++++-------------
1 files changed, 18 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 7f5aae7..7b811e6 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -3707,6 +3707,21 @@ gtk_window_get_destroy_with_parent (GtkWindow *window)
return window->priv->destroy_with_parent;
}
+static void
+gtk_window_apply_hide_titlebar_when_maximized (GtkWindow *window)
+{
+#ifdef GDK_WINDOWING_X11
+ GdkWindow *gdk_window;
+ gboolean setting;
+
+ setting = window->priv->hide_titlebar_when_maximized;
+ gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
+
+ if (GDK_IS_X11_WINDOW (gdk_window))
+ gdk_x11_window_set_hide_titlebar_when_maximized (gdk_window, setting);
+#endif
+}
+
/**
* gtk_window_set_hide_titlebar_when_maximized:
* @window: a #GtkWindow
@@ -3734,18 +3749,9 @@ gtk_window_set_hide_titlebar_when_maximized (GtkWindow *window,
if (window->priv->hide_titlebar_when_maximized == setting)
return;
-#ifdef GDK_WINDOWING_X11
- {
- GdkWindow *gdk_window;
-
- gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
-
- if (GDK_IS_X11_WINDOW (gdk_window))
- gdk_x11_window_set_hide_titlebar_when_maximized (gdk_window, setting);
- }
-#endif
-
window->priv->hide_titlebar_when_maximized = setting;
+ gtk_window_apply_hide_titlebar_when_maximized (window);
+
g_object_notify (G_OBJECT (window), "hide-titlebar-when-maximized");
}
@@ -5933,8 +5939,7 @@ gtk_window_map (GtkWidget *widget)
if (priv->type == GTK_WINDOW_TOPLEVEL)
{
gtk_window_set_theme_variant (window);
- gtk_window_set_hide_titlebar_when_maximized (window,
- priv->hide_titlebar_when_maximized);
+ gtk_window_apply_hide_titlebar_when_maximized (window);
}
/* No longer use the default settings */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]