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

Why is it not possible to specify "No Click Through" for Mac/OSX anymore?

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • 5.15.1
    • None
    • macOS, Qt 5.15.1.  But this problem exists on all recent Qt versions.

    • macOS

    Description

      So there is some history here.  See: https://bugreports.qt.io/browse/QTBUG-41126

      The short story is Qt used to have "WA_MacNoClickThrough", which was then removed, then it was added again some time ago. then removed again.

      Why does this matter? 

      The problem with removing this attribute it is that macOS by default has all Windows use "no click through". So the inability to specify this makes it hard to make a truly native macOS app, for one.

      Moreover, for some applications this behavior is very much desired and crucial.

      My use-case:

      I have developed a movie player using Qt (something that works a bit like VLC). The player has the capability of toggling pause/play if the user clicks on the video in the window (sort of standard functionality for all movie players). If the app is not the foreground app, however, I don't want users clicking on the window to automatically pause/play the video!

      I ended up having to do all sorts of ugly hacks and workarounds to get this working properly using various Qt events.  That didn't always work as expected and was complex.  I threw that away and ended up "swizzling" or "monkey patching" the QNSView class to change the behavior of Objective-C method: 

      • (BOOL) acceptsFirstMouse:

       

      As you can imagine – this is less than ideal.  I would prefer to just be able to specify WA_MacNoClickThrough.

      Please bring back WA_MacNoClickThrough!!

       

      Attachments

        Issue Links

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

          Activity

            People

              vestbo Tor Arne Vestbø
              cculianu calin culianu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes