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

QWidget::setMask ignored on MouseMoved events in Cocoa (macOS)

    XMLWordPrintable

Details

    • macOS

    Description

      Qt 6.2 docs says that Masked widgets receive mouse events only on their visible portions in https://doc.qt.io/qt-6/qwidget.html#setMask, but it seems that this only applies to MouseDown events. The handler of MouseMoved events don't take into account the mask of the widget.

      If I look at the implementation of mouseMovedImpl in qtbase/src/plugins/platforms/cocoa/qnsview_mouse.mm the mask is ignored while if I look at the implementation of handleMouseDownEvent the mask is taken into account to forward or process the event.

      Am I missing something?

      Attached minimal example. Is a minimal example to reproduce a problem that also occurs in a larger application where I need to control the number of native windows that are created since there is a much larger hierarchy of widgets.

      Thanks in advance

      Attachments

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

        Activity

          People

            srutledg Shawn Rutledge
            kilianbl Kilian Bl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes