On Thursday April 20 2017 14:56:04 Tor Arne Vestbø wrote:
> Yes.
>
> If you want non-platform behavior because you disagree with the
> platform's choice, you are welcome to write one in user-code using
> frameless window set to QScreen::geometry() e.g.
That's a valid PoV for writing code using only native SDKs, but not one I think
Qt can afford to apply too liberally. It exists in part because of the
convenience it provides to design GUI applications
Indeed, creating standard fullscreen behaviour is simple and can be done in "Qt
userland" as well as with readily available and documented native SDK calls.
Meaning it's extremely simple to add support for a basic fullscreen mode and to
me that's an argument to keep it in the QPA as apparently it always was.
Anything else is imposing unnecessary work on Qt users by requiring them to
reinvent the wheel, make their code less maintainable through
platform-conditional blocks etc.
Ultimately this also is NOT non-platform behaviour. That would be the case if
native fullscreen mode always blacked out all other screens and if none of
Apple's own and/or officially condoned applications provided different types of
fullscreen behaviour. A fullscreen window is nothing but a window occupying an
entire screen and without decoration (frame) and the platform allows to turn
any window into and back from such a configuration. Exactly the kind of
platform behaviour emulation used elsewhere in Qt/Mac. End of discussion, IMHO.
I guess we'll see how much outcry there is once 5.9.0 is released and starts
being used and people thus start losing the trick to disable the fullscreen
button and get normal, consistent fullscreen behaviour. Though I fear most of
that outcry will be caught and addressed at levels where the powers that be
don't bother listening...
Since we're talking about fullscreen behaviour: ever tried putting a window
from a multi-window application (say a Qt-based terminal emulator like Konsole)
in native fullscreen mode and then open an additional window? If I understand
the code correctly that window should get the
NSWindowCollectionBehaviorFullScreenAuxiliary flag meaning it's apparently
allowed to appear in fullscreen mode. What really happens is that it too is
made fullscreen, and when one exits fullscreen mode the original window has
disappeared (but not closed because the shell is still running). Apple's own
Terminal.app does the same thing so it's probably a Cocoa bug, but one that
isn't triggered when using a simple fullscreen mode. If that bug still exists
in the latest Mac OS version that only gives an additional reason to provide a
workaround - or is that "not done" either?
R.
PS: why does QApplication::setWindowIcon("foo.svgz") do anything on Mac? Isn't
it decidedly non-platform behaviour to change a running application's app icon,
with something un-Mac'ish as a compressed SVG image at that? :P
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development