topMost InverseMouseArea should removeEventFilter when disabled

Bug #1253608 reported by Daniel d'Andrada
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Zsombor Egri

Bug Description

An InverseMouseArea that has the topMost property as true will install itself as an event filter. When it's disabled, there's no use for such event filtering and it will therefore be just useless overhead. Specially when that event filter is installed on the QGuiApplication, which gets quite a lot of events.

I actually don't get why to you install it on the QGuiApplication when your target (sensing area) is the rootItem. It would be great if there was a comment in the code explaining this strange decision. Maybe its because of the bug that you cannot filter events sent to QQuickItems [1] (whose fix is on the way [2]).

[1] - https://bugreports.qt-project.org/browse/QTBUG-32004
[2] - https://codereview.qt-project.org/#change,71241

Zsombor Egri (zsombi)
tags: added: inversemousearea
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
assignee: nobody → Zsombor Egri (zsombi)
status: New → Confirmed
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Zsombor Egri (zsombi)
status: New → Confirmed
Zoltan Balogh (bzoltan)
no longer affects: ubuntu-ui-toolkit
Revision history for this message
Zsombor Egri (zsombi) wrote :

This seems to be fixed some time, as we are no longer filtering the app events, but the window. So I'll mark it as fix released.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.