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 ...@@ -90,14 +90,22 @@ XIMPreeditNothing or XIMPreeditNone or Constant XIMPreedit
dpy #38 0 XKeycodeToKeysym drop dpy #38 0 XKeycodeToKeysym drop
dpy screen XRootWindow to root-win dpy screen XRootWindow to root-win
dpy root-win XRRGetScreenResourcesCurrent to rr-res dpy root-win XRRGetScreenResourcesCurrent to rr-res
dpy rr-res dup XRRScreenResources-crtcs @ @ XRRGetCrtcInfo to rr-crt0 rr-res XRRScreenResources-noutput l@ 0 DO
rr-crt0 XRRCrtcInfo-noutput l@ 0 ?DO dpy rr-res dup XRRScreenResources-crtcs @ I cells + @
dpy rr-res rr-crt0 XRRCrtcInfo-outputs @ I cells + @ XRRGetCrtcInfo to rr-crt0
XRRGetOutputInfo rr-crt0 XRRCrtcInfo-noutput l@ 0 ?DO
dup XRROutputInfo-npreferred l@ IF to rr-out0 ELSE drop THEN dpy rr-res rr-crt0 XRRCrtcInfo-outputs @ I cells + @
LOOP XRRGetOutputInfo
rr-crt0 XRRCrtcInfo-width l@ dup XRROutputInfo-npreferred l@
rr-crt0 XRRCrtcInfo-height l@ ; over XRROutputInfo-connection w@ 0= and
IF to rr-out0 ELSE drop THEN
LOOP
rr-crt0 XRRCrtcInfo-width 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 4 buffer: spot \ spot location, two shorts
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment