[gnome-builder/wip/gtk4-port: 955/1774] libide/gui: clear focus when clicking on status page
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 955/1774] libide/gui: clear focus when clicking on status page
- Date: Mon, 11 Jul 2022 22:31:29 +0000 (UTC)
commit 337a13104c7e7cd1b4487f71000c5fc649d02e9e
Author: Christian Hergert <chergert redhat com>
Date: Tue May 10 15:27:16 2022 -0700
libide/gui: clear focus when clicking on status page
Instead of moving focus which ends up sort of weird, just clear the focus
for the workspace.
src/libide/gui/ide-frame.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/gui/ide-frame.c b/src/libide/gui/ide-frame.c
index ac82f25be..48ea1950d 100644
--- a/src/libide/gui/ide-frame.c
+++ b/src/libide/gui/ide-frame.c
@@ -178,10 +178,13 @@ status_page_pressed_cb (IdeFrame *self,
int n_press,
GtkGestureClick *click)
{
+ GtkRoot *root;
+
g_assert (IDE_IS_FRAME (self));
g_assert (GTK_IS_GESTURE_CLICK (click));
- gtk_widget_child_focus (GTK_WIDGET (self), GTK_DIR_TAB_FORWARD);
+ root = gtk_widget_get_root (GTK_WIDGET (self));
+ gtk_root_set_focus (root, NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]