Skip to content

Commit

Permalink
rename patch function to match new location
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 24, 2021
1 parent b3c0d17 commit 465176a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xpra/platform/darwin/shadow_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
BTYPES = tuple((str, bytes, memoryview, bytearray))

#ensure that picture_encode can deal with pixels as NSCFData:
def patch_picture_encode():
def patch_pixels_to_bytes():
from CoreFoundation import CFDataGetBytes, CFDataGetLength #@UnresolvedImport
def pixels_to_bytes(v):
if isinstance(v, BTYPES):
Expand Down Expand Up @@ -81,7 +81,7 @@ def __init__(self):
if image is None:
log("cannot grab test screenshot - maybe you need to run this command whilst logged in via the UI")
raise InitExit(EXIT_FAILURE, "cannot grab pixels from the screen, make sure this command is launched from a GUI session")
patch_picture_encode()
patch_pixels_to_bytes()
self.refresh_count = 0
self.refresh_rectangle_count = 0
self.refresh_registered = False
Expand Down

0 comments on commit 465176a

Please sign in to comment.