9fans / plan9port

Plan 9 from User Space
https://9fans.github.io/plan9port/
Other
1.64k stars 326 forks source link

devdraw: full screen on mac hides the dock even on another screen #336

Closed rsc closed 4 years ago

rsc commented 4 years ago

Full screen mode on the Mac does not hide the dock, which makes the bottom of the app hard to use. Unclear why.

rsc commented 4 years ago

NSApplicationPresentationHideDock is suspiciously absent from https://developer.apple.com/documentation/appkit/nsapplicationpresentationoptions/nsapplicationpresentationhidedock?language=objc

Never mind, I confused myself about which page I was looking at. :-)

rsc commented 4 years ago

StackOverflow got me to 3d1382b9. It would be good to figure out whether the window is on the display with the dock and only turn off the dock in that case. Right now I think if you full-screen on a 2nd display that does not have the dock, the dock disappears from the 1st display. But that's probably still an improvement. More people have just 1 display.

jxy commented 4 years ago

That 3d1382b does not seem to help. If you full screen, and then command-tab out and command-tab back, dock starts to appear again.

jxy commented 4 years ago

Comparing mainScreen and and the first object in screens should tell you whether the window is on the first display or not. https://developer.apple.com/documentation/appkit/nsscreen/1388371-mainscreen?language=objc

If switching focus gives back the dock to you too, maybe setting the presentation options again when in fullscreen in windowDidBecomeKey would help.

rsc commented 4 years ago

Tried again and now I can't reproduce the original problem on either Mojave or Catalina (was seeing it on Catalina last night). Will just back out the forced hiding I added and close this.