Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-30769

Mac: Tool window regression

    XMLWordPrintable

Details

    • macOS
    • ba75f604499d3c4fc15930731814fdb9415fdc83

    Description

      In 4.x it was possible to have a Qt::Tool window without title bar, by specifying Qt::Tool | Qt::CustomizeWindowHint or Qt::Tool| Qt::FramelessWindowHint.
      This is not possible anymore (while it is on Windows). As an example, this breaks the Qt example:
      qtbase\examples\widgets\mainwindows\mainwindow\mainwindow.pro
      if you run this example and make floating the window with a custom titme bar, you will see the standard Mac window on top, which is wrong. This was not so in 4.8.

      I propose the following fix that works for me:
      in file qtbase\src\plugins\platforms\cocoa\qcocoawindow.mm
      in API QCocoaWindow::windowStyleMask

      Replace

              if (!windowIsPopupType(type))
      		styleMask = (NSUtilityWindowMask | NSResizableWindowMask | NSClosableWindowMask |
                               NSMiniaturizableWindowMask | NSTitledWindowMask);
      

      with

              if (!windowIsPopupType(type))
      		if (flags & Qt::FramelessWindowHint)
      			styleMask = NSUtilityWindowMask;
      		else
      			styleMask = (NSUtilityWindowMask | NSResizableWindowMask | NSClosableWindowMask |
                               NSMiniaturizableWindowMask | NSTitledWindowMask);
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            irfan.omair@gmail.com irfan B omair
            jirauser26727 user-04d21 (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes