From d78993c5566a9b206ab1ed835ebf7d4d19c66335 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Tue, 9 Apr 2019 00:16:51 +0200
Subject: [PATCH] Make popup key available from all window configurations.

---
 new/example_client.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/new/example_client.py b/new/example_client.py
index ee71241..4e61c51 100755
--- a/new/example_client.py
+++ b/new/example_client.py
@@ -532,6 +532,16 @@ class TUI:
                         self.socket.send(''.join(self.to_send))
                         self.to_send[:] = []
                         self.to_update['edit'] = True
+                elif key == 't':
+                    if not popup_widget.visible:
+                        self.to_update['popup'] = True
+                        popup_widget.visible = True
+                        popup_widget.reconfigure()
+                        draw_popup_if_visible = True
+                    else:
+                        popup_widget.visible = False
+                        for w in top_widgets:
+                            w.ensure_freshness(True)
                 elif map_widget.visible:
                     if key == 'w':
                         self.socket.send('TASK:MOVE UPLEFT')
@@ -545,16 +555,6 @@ class TUI:
                         self.socket.send('TASK:MOVE DOWNLEFT')
                     elif key == 'c':
                         self.socket.send('TASK:MOVE DOWNRIGHT')
-                    elif key == 't':
-                        if not popup_widget.visible:
-                            self.to_update['popup'] = True
-                            popup_widget.visible = True
-                            popup_widget.reconfigure()
-                            draw_popup_if_visible = True
-                        else:
-                            popup_widget.visible = False
-                            for w in top_widgets:
-                                w.ensure_freshness(True)
                     elif key == 'p':
                         self.socket.send('GET_PICKABLE_ITEMS')
                         self.item_pointer = 0
-- 
2.30.2