[gnome-maps/wip/mlundblad/cleanup-gtk-deprecations] mainWindow: Add TODO comment about key-press-event and GTK 4



commit 7d14e1bb8a2a1b958b41ad73fc93ca82d349e90d
Author: Marcus Lundblad <ml update uu se>
Date:   Tue Mar 23 22:51:14 2021 +0100

    mainWindow: Add TODO comment about key-press-event and GTK 4
    
    Add a comment about switching to setting a key capture widget
    on the search entry as a replacement for the hijacking of
    key-press-events, as these event are not available in GTK 4.

 src/mainWindow.js | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 853a4386..47036c8f 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -280,6 +280,9 @@ var MainWindow = GObject.registerClass({
          * hijack the key-press to the main window and make sure that
          * they reach the entry before they can be swallowed as accelerator.
          */
+        /* TODO: GTK 4. This should probably be handled by something like
+         * setting the map view as key capture widget for the search entry
+         */
         this.connect('key-press-event', (window, event) => {
             let focusWidget = window.get_focus();
             let keyval = event.get_keyval()[1];


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