Skip to content

Commit

Permalink
fix sync xrandr and drm monitor backends.
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Jul 31, 2024
1 parent b54b166 commit 421fe93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/module/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def get_drm_monitors(self):
if f.read().strip() == "connected":
card = device.split("-")[0]
monitors.append(device[len(card)+1:])
monitors.sort()
return monitors

def get_device(self, monitor):
Expand Down Expand Up @@ -62,6 +63,7 @@ def get_xrandr_monitors(self):
for i in ["+", "*"]:
line = line.replace(i, "")
monitors.append(line)
monitors.sort()
return monitors

def get_xrandr_resolutions(self, monitor):
Expand Down Expand Up @@ -162,6 +164,7 @@ def set_window_monitor(screen_index=0):
loginwindow.o("ui_window_main").unfullscreen()
loginwindow.o("ui_window_main").move(int(new_x), 0)
loginwindow.o("ui_window_main").fullscreen()
debug("Using primatry monitor:{}::{}::{}".format(m, res, screen_index))
update_window_resolution(w, h)
monitor.screen_event_lock = False

Expand Down

0 comments on commit 421fe93

Please sign in to comment.