[gnome-builder] layout-grid: focus current column after removing column
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] layout-grid: focus current column after removing column
- Date: Sat, 27 Jan 2018 09:43:51 +0000 (UTC)
commit ee35c258688c77a22fb540661daf008b66a8365d
Author: Christian Hergert <chergert redhat com>
Date: Sat Jan 27 01:43:20 2018 -0800
layout-grid: focus current column after removing column
This fixes an issue when closing a layout column which resulted in the
widget grab being cleared.
Fixes #376
src/libide/layout/ide-layout-grid.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/layout/ide-layout-grid.c b/src/libide/layout/ide-layout-grid.c
index ea9b52819..66ba4a4a1 100644
--- a/src/libide/layout/ide-layout-grid.c
+++ b/src/libide/layout/ide-layout-grid.c
@@ -431,7 +431,14 @@ ide_layout_grid_remove (GtkContainer *container,
ide_layout_grid_update_actions (self);
if (notify)
- g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_CURRENT_COLUMN]);
+ {
+ GtkWidget *head = g_queue_peek_head (&priv->focus_column);
+
+ if (head != NULL)
+ gtk_widget_grab_focus (head);
+
+ g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_CURRENT_COLUMN]);
+ }
}
static inline gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]