[ghex/expand-search-options] hexwidget: Fix redraw on keyboard focus change
- From: Logan Rathbone <larathbone src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex/expand-search-options] hexwidget: Fix redraw on keyboard focus change
- Date: Tue, 19 Apr 2022 07:44:40 +0000 (UTC)
commit 03950e92b26c4880c30e17fccb7f0cb9593da35b
Author: Logan Rathbone <poprocks gmail com>
Date: Tue Apr 19 00:28:17 2022 -0400
hexwidget: Fix redraw on keyboard focus change
(cherry picked from commit c1782266dc34f91b05a999ca9e9c2583184897a8)
src/gtkhex.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/src/gtkhex.c b/src/gtkhex.c
index 03dfc2b..641b1e2 100644
--- a/src/gtkhex.c
+++ b/src/gtkhex.c
@@ -2975,6 +2975,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",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]