Skip to content

getDisplayRects returns wrong values #10

Description

@Ari24-cb24

Hey,

this is an issue which appears in desktopmagic and in the screeninfo library but only seem to appear when I call functions from both of these libraries in my project which is kind of weird (I tried to call these functions in my python shell and both of them gave me a correct output!)

My real screeninfo

I have two monitors, the first one at (x: 0, y: 0, width: 1920, height: 1080) and the second one at (x: 1920, y: 0, width: 1920, height: 1080)

Results

My project:

desktopmagic

desktopmagic.screengrab_win32.getDisplayRects()
> [(0, 0, 1920, 1080), (2400, 0, 4800, 1350)]

screeninfo

screeninfo.get_monitors()
> [Monitor(x=0, y=0, width=1920, height=1080, width_mm=344, height_mm=194, name='\\\\.\\DISPLAY1'), Monitor(x=2400, y=0, width=2400, height=1350, width_mm=531, height_mm=299, name='\\\\.\\DISPLAY2')]

Python Shell

desktopmagic

desktopmagic.screengrab_win32.getDisplayRects()
> [(0, 0, 1536, 864), (1920, 0, 3840, 1080)]

screeninfo

screeninfo.get_monitors()
> [Monitor(x=0, y=0, width=1920, height=1080, width_mm=344, height_mm=194, name='\\\\.\\DISPLAY1'), Monitor(x=1920, y=0, width=1920, height=1080, width_mm=531, height_mm=299, name='\\\\.\\DISPLAY2')]

both libraries seem to use the same function "EnumDisplayMonitors" but in a different way.
screeninfo: https://github.com/rr-/screeninfo/blob/master/screeninfo/enumerators/windows.py#L6
desktopmagic: https://github.com/ludios/Desktopmagic/blob/master/desktopmagic/screengrab_win32.py#L98

My current project: https://github.com/Ari24-cb24/screen-drawer/blob/testing/utils.py (testing branch)
I don't know if that is reproduceable tho.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions