Skip to content

Commit

Permalink
#1861: win32 platform fixups: don't assume we have the windows mixin
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@19891 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 9, 2018
1 parent 76e00c9 commit ec02443
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/xpra/platform/win32/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
keylog = Logger("win32", "keyboard")
mouselog = Logger("win32", "mouse")

from xpra.client import mixin_features
from xpra.platform.win32 import constants as win32con
from xpra.platform.win32.window_hooks import Win32Hooks
from xpra.platform.win32.win32_events import KNOWN_EVENTS, POWER_EVENTS
Expand Down Expand Up @@ -937,9 +938,9 @@ def log_screensaver():
log.error("Error: cannot register focus and power callbacks:")
log.error(" %s", e)
self.keyboard_hook_id = None
if FORWARD_WINDOWS_KEY:
from xpra.make_thread import make_thread
make_thread(self.init_keyboard_listener, "keyboard-listener", daemon=True).start()
if FORWARD_WINDOWS_KEY and mixin_features.windows:
from xpra.make_thread import start_thread
start_thread(self.init_keyboard_listener, "keyboard-listener", daemon=True)

def ready(self):
pass
Expand Down Expand Up @@ -1111,6 +1112,8 @@ def activateapp(self, wParam, lParam):
log("WM_ACTIVATEAPP: %s/%s client=%s", wParam, lParam, c)
if not c:
return
if not mixin_features.windows:
return
if wParam==0:
#our app has lost focus
c.update_focus(0, False)
Expand Down

0 comments on commit ec02443

Please sign in to comment.