[gtk+/wip/frame-window: 3/6] csd: Fix interaction of fullscreen with custom titlebars
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/frame-window: 3/6] csd: Fix interaction of fullscreen with custom titlebars
- Date: Sun, 7 Jul 2013 03:14:13 +0000 (UTC)
commit 32292d6eff6f1d5ef1bfa9b139ec886b98b4dbcc
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 5 22:44:42 2013 -0400
csd: Fix interaction of fullscreen with custom titlebars
gtk/gtkwindow.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 994a934..020d353 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -3516,6 +3516,7 @@ gtk_window_set_titlebar (GtkWindow *window,
if (visual)
gtk_widget_set_visual (widget, visual);
+ update_window_buttons (window);
gtk_widget_queue_resize (widget);
}
@@ -8247,7 +8248,11 @@ add_frame_size_to_allocation (GtkWindow *window,
rect->x -= border.left;
rect->y -= border.top;
rect->width += border.left + border.right;
- rect->height += border.top + border.bottom + info->last.title_height;
+ rect->height += border.top + border.bottom;
+
+ if (priv->title_box != NULL &&
+ gtk_widget_get_visible (priv->title_box))
+ rect->height += info->last.title_height;
}
static void
@@ -8268,7 +8273,10 @@ subtract_frame_size_from_allocation (GtkWindow *window,
rect->x += border.left;
rect->y += border.top;
rect->width -= border.left + border.right;
- rect->height -= border.top + border.bottom + info->last.title_height;
+ rect->height -= border.top + border.bottom;
+ if (priv->title_box != NULL &&
+ gtk_widget_get_visible (priv->title_box))
+ rect->height -= info->last.title_height;
rect->width = MAX (1, rect->width);
rect->height = MAX (1, rect->height);
@@ -8468,13 +8476,17 @@ gtk_window_move_resize (GtkWindow *window)
info->last.flags = new_flags;
info->last.configure_request = new_request;
- if (priv->title_box != NULL)
+ if (priv->title_box != NULL && gtk_widget_get_visible (priv->title_box))
{
gtk_widget_get_preferred_height_for_width (priv->title_box,
info->last.configure_request.width,
NULL,
&info->last.title_height);
}
+ else
+ {
+ info->last.title_height = 0;
+ }
/* need to set PPosition so the WM will look at our position,
* but we don't want to count PPosition coming and going as a hints
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]