mirror of
https://github.com/kbumsik/VirtScreen.git
synced 2025-03-09 15:40:18 +00:00
XRandR: Fixed issue with parsing primary screen in some hardware
This commit is contained in:
parent
c6a3d8f73d
commit
aaf3b28206
1 changed files with 5 additions and 5 deletions
|
@ -91,12 +91,12 @@ class XRandR(SubprocessWrapper):
|
|||
|
||||
def _update_primary_screen(self) -> None:
|
||||
output = self.run("xrandr")
|
||||
match = re.search(r"^(\w*)\s+.*primary\s*(\d+)x(\d+)\+(\d+)\+(\d+).*$", output, re.M)
|
||||
match = re.search(r"^(\S*)\s+(connected|disconnected)\s+primary\s+(\d+)x(\d+)\+(\d+)\+(\d+)\s+.*$", output, re.M)
|
||||
self.primary.name = match.group(1)
|
||||
self.primary.width = int(match.group(2))
|
||||
self.primary.height = int(match.group(3))
|
||||
self.primary.x_offset = int(match.group(4))
|
||||
self.primary.y_offset = int(match.group(5))
|
||||
self.primary.width = int(match.group(3))
|
||||
self.primary.height = int(match.group(4))
|
||||
self.primary.x_offset = int(match.group(5))
|
||||
self.primary.y_offset = int(match.group(6))
|
||||
|
||||
def _update_virtual_screen(self) -> None:
|
||||
output = self.run("xrandr")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue