aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-gtk/interface.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-04-19 17:00:18 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-04-19 17:00:18 +0300
commit29f1dea16c4ffa21926ccdc5a3b3c73a56d9437a (patch)
treed862e31fc92d56a82b18e78c6ee8af24623489a8 /src/interface-gtk/interface.c
parentc3b9b3b56edc61aa82cca38bdc64e2f463551456 (diff)
downloadsciteco-29f1dea16c4ffa21926ccdc5a3b3c73a56d9437a.tar.gz
Gtk: fixed setting the mouse cursor after changing the active buffer
* The GdkWindow stacking order obviously got messed up when swapping out the child widget in the GtkEventBox. * This was probably also responsible for input events coming through to the Scintilla view even though the GtkEventBox should block all input events from reaching the Scintilla view. The event masking in teco_view_new() is probably no longer necessary - but better keep it to be on the safe side.
Diffstat (limited to 'src/interface-gtk/interface.c')
-rw-r--r--src/interface-gtk/interface.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/interface-gtk/interface.c b/src/interface-gtk/interface.c
index db70f20..045f9d7 100644
--- a/src/interface-gtk/interface.c
+++ b/src/interface-gtk/interface.c
@@ -876,9 +876,15 @@ teco_interface_refresh(gboolean current_view_changed)
teco_interface.current_view_widget = GTK_WIDGET(teco_interface_current_view);
+ /*
+ * NOTE: The hiding helps to ensure the correct GdkWindow
+ * ordering, which is important at least for setting the
+ * mouse cursors.
+ */
+ gtk_widget_hide(teco_interface.event_box_widget);
gtk_container_add(GTK_CONTAINER(teco_interface.event_box_widget),
teco_interface.current_view_widget);
- gtk_widget_show(teco_interface.current_view_widget);
+ gtk_widget_show_all(teco_interface.event_box_widget);
}
}