Example #1
0
 def __init__(self):
     #sanity check:
     check_display()
     image = CG.CGWindowListCreateImage(CG.CGRectInfinite,
                 CG.kCGWindowListOptionOnScreenOnly,
                 CG.kCGNullWindowID,
                 CG.kCGWindowImageDefault)
     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_pixels_to_bytes()
     self.refresh_count = 0
     self.refresh_rectangle_count = 0
     self.refresh_registered = False
     super().__init__()
Example #2
0
    def __init__(self):
        check_display()
        StubClientMixin.__init__(self)
        self.dpi = 0
        self.initial_scaling = 1, 1
        self.xscale, self.yscale = self.initial_scaling
        self.scale_change_embargo = float("inf")
        self.desktop_fullscreen = False
        self.desktop_scaling = False
        self.screen_size_change_timer = None

        self.server_desktop_size = None
        self.server_actual_desktop_size = None
        self.server_max_desktop_size = None
        self.server_display = None
        self.server_randr = False
Example #3
0
 def test_check_display(self):
     #only implemented properly on MacOS
     check_display()