Skip to content

Commit

Permalink
fix zero dimension check
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Mar 29, 2023
1 parent a762be3 commit 0e42692
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xpra/x11/bindings/randr_bindings.pyx
Expand Up @@ -1123,16 +1123,16 @@ cdef class RandRBindingsInstance(X11CoreBindingsInstance):
RR_Rotate_0, &output, noutput)
if r:
raise Exception(f"failed to set crtc config for monitor {i}")
mmw = m.get("width-mm", dpi96(width))
mmh = m.get("height-mm", dpi96(height))
mmw = m.get("width-mm", 0) or dpi96(width)
mmh = m.get("height-mm", 0) or dpi96(height)
self.set_output_int_property(i, "WIDTH_MM", mmw)
self.set_output_int_property(i, "HEIGHT_MM", mmh)
#this allows us to disconnect the output of this crtc:
self.set_output_int_property(i, "SUSPENDED", not bool(m))
posinfo = ""
if x or y:
posinfo = " at %i,%i" % (x, y)
if width==height==mmw==mmh==0:
if width==0 or height==0:
log.info(f"disabling dummy crtc and output {i}")
else:
log.info(f"setting dummy crtc and output {i} to {width}x{height} {hz}Hz ({mmw}x{mmh} mm){posinfo}")
Expand Down

0 comments on commit 0e42692

Please sign in to comment.