[Development] old-style, consistent fullscreen behaviour on Mac

René J. V. Bertin rjvbertin at gmail.com
Thu Apr 20 00:04:30 CEST 2017


Hi,

I went ahead and tinkered with Qt4's code:

https://github.com/RJVB/shortcut-test-qt5/blob/master/mainwindow.cpp#L302

QCocoaWindow inherits only QObject, not QWidget or QWindow, so implementing this 
logic in the Cocoa QPA was a bit more work but not impossible:

https://cgit.kde.org/scratch/rjvbb/osx-integration.git/tree/src/qcocoa-qpa/qcocoawindow.mm?h=qt590#n1906

This PoC implementation applies the "legacy" (old-style) fullscreen mode to 
windows without the fullscreen titlebar button, and when QT_LEGACY_FULLSCREEN is 
set. In the latter case it appears to be a good idea to unset 
Qt::WindowFullscreenButtonHint because otherwise certain events restore the 
window frame (decoration).

R




More information about the Development mailing list