Skip to content

Commit

Permalink
make it possible to run without the cython rectangle class
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Feb 17, 2022
1 parent b693a52 commit 6c6df92
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions xpra/client/gtk_base/gtk_client_window_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ def can_set_workspace():
workspacelog.error("Error: failed to setup workspace hooks:")
workspacelog.error(" %s", e)
CAN_SET_WORKSPACE = can_set_workspace()
except ImportError as e:
except ImportError as x11e:
log("x11 bindings", exc_info=True)
log.error("Error: cannot import X11 bindings:")
log.error(" %s", e)
log.error(" %s", x11e)


AWT_DIALOG_WORKAROUND = envbool("XPRA_AWT_DIALOG_WORKAROUND", WIN32)
Expand Down Expand Up @@ -714,7 +714,11 @@ def calculate_window_offset(self, wx, wy, ww, wh):
if not monitors:
geomlog("screen %s lacks monitors information: %s", screen0)
return None
from xpra.rectangle import rectangle #@UnresolvedImport
try:
from xpra.rectangle import rectangle #@UnresolvedImport
except ImportError as e:
geomlog("cannot calculate offset: %s", e)
return None
wrect = rectangle(wx, wy, ww, wh)
rects = [wrect]
pixels_in_monitor = {}
Expand Down

0 comments on commit 6c6df92

Please sign in to comment.