[gtk+] csd: properly check titlebar visibility
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] csd: properly check titlebar visibility
- Date: Sun, 6 Oct 2013 03:18:10 +0000 (UTC)
commit 9490e7064ec818bb91b4812daa4ceaef3e8624b3
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Oct 5 23:17:02 2013 -0400
csd: properly check titlebar visibility
Now that we are using child-visible to hide titlebars, we need to
adjust the visibility checks in various places to take it into account.
https://bugzilla.gnome.org/show_bug.cgi?id=709323
gtk/gtkwindow.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index bcb23e9..c573fd1 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5503,7 +5503,9 @@ gtk_window_map (GtkWidget *widget)
if (child != NULL && gtk_widget_get_visible (child))
gtk_widget_map (child);
- if (priv->title_box != NULL && gtk_widget_get_visible (priv->title_box))
+ if (priv->title_box != NULL &&
+ gtk_widget_get_visible (priv->title_box) &&
+ gtk_widget_get_child_visible (priv->title_box))
gtk_widget_map (priv->title_box);
gdk_window = gtk_widget_get_window (widget);
@@ -7323,7 +7325,9 @@ get_active_region_type (GtkWindow *window, GdkEventAny *event, gint x, gint y)
return i;
}
- if (priv->title_box != NULL && gtk_widget_get_visible (priv->title_box))
+ if (priv->title_box != NULL &&
+ gtk_widget_get_visible (priv->title_box) &&
+ gtk_widget_get_child_visible (priv->title_box))
{
gtk_widget_get_allocation (priv->title_box, &allocation);
if (allocation.x <= x && allocation.x + allocation.width > x &&
@@ -9374,7 +9378,9 @@ gtk_window_draw (GtkWidget *widget,
gtk_style_context_restore (context);
}
- if (priv->title_box && gtk_widget_get_visible (priv->title_box))
+ if (priv->title_box &&
+ gtk_widget_get_visible (priv->title_box) &&
+ gtk_widget_get_child_visible (priv->title_box))
title_height = priv->title_height;
else
title_height = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]