[vte] widget: Focus events have no modifier state



commit 6b773dda1399a66dbdcc94cf7bf7304d1da5c0e2
Author: Christian Persch <chpe src gnome org>
Date:   Fri May 1 23:08:42 2020 +0200

    widget: Focus events have no modifier state
    
    ... so don't even try to read it.

 src/vte.cc | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 885288af..53490a96 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -7136,9 +7136,6 @@ Terminal::widget_focus_in(GdkEventFocus *event)
 
        gtk_widget_grab_focus(m_widget);
 
-       /* Read the keyboard modifiers, though they're probably garbage. */
-       read_modifiers((GdkEvent*)event);
-
        /* We only have an IM context when we're realized, and there's not much
         * point to painting the cursor if we don't have a window. */
        if (widget_realized()) {
@@ -7166,9 +7163,6 @@ Terminal::widget_focus_out(GdkEventFocus *event)
 {
        _vte_debug_print(VTE_DEBUG_EVENTS, "Focus out.\n");
 
-       /* Read the keyboard modifiers, though they're probably garbage. */
-       read_modifiers((GdkEvent*)event);
-
        /* We only have an IM context when we're realized, and there's not much
         * point to painting ourselves if we don't have a window. */
        if (widget_realized()) {
@@ -7201,6 +7195,8 @@ Terminal::widget_enter(GdkEventCrossing *event)
         GdkEvent* base_event = reinterpret_cast<GdkEvent*>(event);
         auto pos = view_coords_from_event(base_event);
 
+        // FIXMEchpe read event modifiers here
+
        _vte_debug_print(VTE_DEBUG_EVENTS, "Enter at %s\n", pos.to_string());
 
         m_mouse_cursor_over_widget = TRUE;
@@ -7218,6 +7214,8 @@ Terminal::widget_leave(GdkEventCrossing *event)
         GdkEvent* base_event = reinterpret_cast<GdkEvent*>(event);
         auto pos = view_coords_from_event(base_event);
 
+        // FIXMEchpe read event modifiers here
+
        _vte_debug_print(VTE_DEBUG_EVENTS, "Leave at %s\n", pos.to_string());
 
         m_mouse_cursor_over_widget = FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]