|
@@ -97,6 +97,7 @@ class ExtendedControls:
|
|
= ToggleExtendedControlsAction()
|
|
= ToggleExtendedControlsAction()
|
|
self._default_action = ForwardKeyEventAction()
|
|
self._default_action = ForwardKeyEventAction()
|
|
self._engine_window = None
|
|
self._engine_window = None
|
|
|
|
+ self._other_engine_windows = None
|
|
self._enabled = False
|
|
self._enabled = False
|
|
|
|
|
|
@property
|
|
@property
|
|
@@ -165,6 +166,8 @@ class ExtendedControls:
|
|
self._xdisplay.keysym_to_keycode(keysym),
|
|
self._xdisplay.keysym_to_keycode(keysym),
|
|
)
|
|
)
|
|
self._enabled = True
|
|
self._enabled = True
|
|
|
|
+ # reset cache
|
|
|
|
+ self._other_engine_windows = None
|
|
print("INFO Enabled Extended Controls")
|
|
print("INFO Enabled Extended Controls")
|
|
|
|
|
|
def disable(self):
|
|
def disable(self):
|
|
@@ -207,3 +210,9 @@ class ExtendedControls:
|
|
lambda w: w.get_wm_name() == TOONTOWN_WINDOW_NAME
|
|
lambda w: w.get_wm_name() == TOONTOWN_WINDOW_NAME
|
|
and w.id != self.engine_window.id,
|
|
and w.id != self.engine_window.id,
|
|
)
|
|
)
|
|
|
|
+
|
|
|
|
+ @property
|
|
|
|
+ def other_engine_windows(self):
|
|
|
|
+ if not self._other_engine_windows:
|
|
|
|
+ self._other_engine_windows = self.find_other_engine_windows()
|
|
|
|
+ return self._other_engine_windows
|