[gnome-builder/wip/libide-merge: 17/35] reposition after maximize
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide-merge: 17/35] reposition after maximize
- Date: Thu, 19 Mar 2015 08:55:59 +0000 (UTC)
commit 92921b7f3fad74c0b4bd1e891af480b3722b9ca2
Author: Christian Hergert <christian hergert me>
Date: Wed Mar 18 19:13:45 2015 -0700
reposition after maximize
src/views/gb-view-grid.c | 35 ++++++++++++++++++++++++++++-------
1 files changed, 28 insertions(+), 7 deletions(-)
---
diff --git a/src/views/gb-view-grid.c b/src/views/gb-view-grid.c
index 698ee7f..4857f40 100644
--- a/src/views/gb-view-grid.c
+++ b/src/views/gb-view-grid.c
@@ -644,6 +644,16 @@ gb_view_grid_toplevel_set_focus (GtkWidget *toplevel,
}
static void
+gb_view_grid_toplevel_is_maximized (GtkWidget *toplevel,
+ GParamSpec *pspec,
+ GbViewGrid *self)
+{
+ g_return_if_fail (GB_IS_VIEW_GRID (self));
+
+ gb_view_grid_reposition (self);
+}
+
+static void
gb_view_grid_hierarchy_changed (GtkWidget *widget,
GtkWidget *previous_toplevel)
{
@@ -653,16 +663,27 @@ gb_view_grid_hierarchy_changed (GtkWidget *widget,
g_return_if_fail (GB_IS_VIEW_GRID (self));
if (GTK_IS_WINDOW (previous_toplevel))
- g_signal_handlers_disconnect_by_func (previous_toplevel,
- G_CALLBACK (gb_view_grid_toplevel_set_focus),
- self);
+ {
+ g_signal_handlers_disconnect_by_func (previous_toplevel,
+ G_CALLBACK (gb_view_grid_toplevel_set_focus),
+ self);
+ g_signal_handlers_disconnect_by_func (previous_toplevel,
+ G_CALLBACK (gb_view_grid_toplevel_is_maximized),
+ self);
+ }
toplevel = gtk_widget_get_toplevel (widget);
if (GTK_IS_WINDOW (toplevel))
- g_signal_connect (toplevel,
- "set-focus",
- G_CALLBACK (gb_view_grid_toplevel_set_focus),
- self);
+ {
+ g_signal_connect (toplevel,
+ "set-focus",
+ G_CALLBACK (gb_view_grid_toplevel_set_focus),
+ self);
+ g_signal_connect (toplevel,
+ "notify::is-maximized",
+ G_CALLBACK (gb_view_grid_toplevel_is_maximized),
+ self);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]