get_default_screen() doesn't get the primary monitor. It just gets the first monitor in the list, which is not guaranteed to be the primary.
From what I have found, the display at position 0, 0 is considered the primary in most cases.
@@ -98,12 +98,18 @@ class Display:
raise NotImplementedError('abstract')
def get_default_screen(self):
- """Get the default screen as specified by the user's operating system
+ """Get the default (primary) screen as specified by the user's operating system
preferences.
:rtype: :class:`Screen`
"""
- return self.get_screens()[0]
+ screens = self.get_screens()
+ for screen in screens:
+ if screen.x == 0 and screen.y == 0:
+ return screen
+
+ # No Primary screen found?
+ return screens[0]
def get_windows(self):
"""Get the windows currently attached to this display.
