Skip to content

Commit

Permalink
#469: re-instate the osx focus workaround, but not for OR windows
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@15264 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 10, 2017
1 parent 4306337 commit bab6425
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/xpra/client/gtk_base/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
BREAK_MOVERESIZE = os.environ.get("XPRA_BREAK_MOVERESIZE", "Escape").split(",")
MOVERESIZE_X11 = envbool("XPRA_MOVERESIZE_X11", os.name=="posix")

OSX_FOCUS_WORKAROUND = envbool("XPRA_OSX_FOCUS_WORKAROUND", False)
OSX_FOCUS_WORKAROUND = envbool("XPRA_OSX_FOCUS_WORKAROUND", True)
SAVE_WINDOW_ICONS = envbool("XPRA_SAVE_WINDOW_ICONS", False)
UNDECORATED_TRANSIENT_IS_OR = envint("XPRA_UNDECORATED_TRANSIENT_IS_OR", 1)
XSHAPE = envbool("XPRA_XSHAPE", True)
Expand Down Expand Up @@ -1361,7 +1361,8 @@ def _focus_change(self, *args):
def get_mouse_event_wid(self, x, y):
#on OSX, the mouse events are reported against the wrong window by GTK,
#so we may have to patch this and use the currently focused window:
if OSX and OSX_FOCUS_WORKAROUND:
#(OR windows may never get the focus events - so don't patch those..)
if OSX and OSX_FOCUS_WORKAROUND and not self.is_OR():
focused = self._client._focused
w = self._client._id_to_window.get(focused)
focuslog("get_mouse_event_wid(%s, %s) focused=%s vs id=%i, window=%s", x, y, focused, self._id, w)
Expand Down

0 comments on commit bab6425

Please sign in to comment.