blob: 7bdbf8c890208689eb4c3ba803f024c2726af627 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
diff --git a/src/gtkhex.c b/src/gtkhex.c
index c34b57f..b155838 100644
--- a/src/gtkhex.c
+++ b/src/gtkhex.c
@@ -2951,6 +2951,17 @@ hex_widget_init (HexWidget *self)
gtk_widget_add_controller (widget,
GTK_EVENT_CONTROLLER(controller));
+ /* Event controller - focus */
+
+ controller = gtk_event_controller_focus_new ();
+
+ g_signal_connect_swapped (controller, "enter",
+ G_CALLBACK(gtk_widget_queue_draw), widget);
+ g_signal_connect_swapped (controller, "leave",
+ G_CALLBACK(gtk_widget_queue_draw), widget);
+
+ gtk_widget_add_controller (widget, GTK_EVENT_CONTROLLER(controller));
+
/* Connect signal for adjustment */
g_signal_connect (self->adj, "value-changed",
|