Commit b6181a50 authored by Bernd Paysan's avatar Bernd Paysan

Solve problem when primary screen is off

parent 1c1485b3
Pipeline #860 passed with stage
in 10 minutes and 8 seconds
......@@ -90,14 +90,22 @@ XIMPreeditNothing or XIMPreeditNone or Constant XIMPreedit
dpy #38 0 XKeycodeToKeysym drop
dpy screen XRootWindow to root-win
dpy root-win XRRGetScreenResourcesCurrent to rr-res
dpy rr-res dup XRRScreenResources-crtcs @ @ XRRGetCrtcInfo to rr-crt0
rr-res XRRScreenResources-noutput l@ 0 DO
dpy rr-res dup XRRScreenResources-crtcs @ I cells + @
XRRGetCrtcInfo to rr-crt0
rr-crt0 XRRCrtcInfo-noutput l@ 0 ?DO
dpy rr-res rr-crt0 XRRCrtcInfo-outputs @ I cells + @
dup XRROutputInfo-npreferred l@ IF to rr-out0 ELSE drop THEN
dup XRROutputInfo-npreferred l@
over XRROutputInfo-connection w@ 0= and
IF to rr-out0 ELSE drop THEN
rr-crt0 XRRCrtcInfo-width l@
rr-crt0 XRRCrtcInfo-height l@ ;
rr-crt0 XRRCrtcInfo-height l@
2dup d0<> IF unloop EXIT THEN 2drop
LOOP \ fallback: screen struct
screen-struct Screen-width l@
screen-struct Screen-height l@ ;
4 buffer: spot \ spot location, two shorts
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment