Cocoa integration - make tool window resizable again

Tool window always had NSResizableWindowMask before dd02c1eb38,
and this is broken, the new logic depends on WindowMaximizeButtonHint which is not
set on, for example, un-docked widget. Bring the old behavior back, while not
cancelling dd02c1e - make it resizable unconditionally, as it always was.

Task-number: QTBUG-46882
Change-Id: Ib739a701d85aaadab83230deee808757de6b5e21
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
This commit is contained in:
Timur Pocheptsov 2015-09-17 11:29:46 +02:00
parent 9b9f86985f
commit d37643c433

View File

@ -800,13 +800,10 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags)
return styleMask;
if ((type & Qt::Popup) == Qt::Popup) {
if (!windowIsPopupType(type)) {
styleMask = NSUtilityWindowMask;
styleMask = NSUtilityWindowMask | NSResizableWindowMask;
if (!(flags & Qt::CustomizeWindowHint)) {
styleMask |= NSResizableWindowMask | NSClosableWindowMask |
NSMiniaturizableWindowMask | NSTitledWindowMask;
styleMask |= NSClosableWindowMask | NSMiniaturizableWindowMask | NSTitledWindowMask;
} else {
if (flags & Qt::WindowMaximizeButtonHint)
styleMask |= NSResizableWindowMask;
if (flags & Qt::WindowTitleHint)
styleMask |= NSTitledWindowMask;
if (flags & Qt::WindowCloseButtonHint)