Merge lp:~dubstar-04/ubuntu-ui-toolkit/MainViewMouseFocus into lp:ubuntu-ui-toolkit/staging

Proposed by Dubstar_04
Status: Rejected
Rejected by: Cris Dywan
Proposed branch: lp:~dubstar-04/ubuntu-ui-toolkit/MainViewMouseFocus
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 12 lines (+1/-1)
1 file modified
src/Ubuntu/PerformanceMetrics/PerformanceOverlay.qml (+1/-1)
To merge this branch: bzr merge lp:~dubstar-04/ubuntu-ui-toolkit/MainViewMouseFocus
Reviewer Review Type Date Requested Status
Zsombor Egri Needs Information
Review via email: mp+299861@code.launchpad.net

Description of the change

Changed the MouseArea{} enabled: property to visible:

This still stops the mouse cursor changing when the performance overlay is enabled but the mouse cursor behaves as intended when the performance overlay isn't active.

To Test:

1. Compile UITK and test the code sample from the bug report. The mouse should behave as intended and the cursor should be displayed as a cross.

2. Set the performance overlay to be active "export PERFORMANCE_OVERLAY=true". Test the sample again and the mouse cursor should be displayed as a regular arrow pointer. Click the screen 4 times and the overlay will appear.

3. Disable the overlay "export PERFORMANCE_OVERLAY=". Test the sample again and the cursor should be back to a cross.

To post a comment you must log in.
2033. By Dubstar_04

Only make the MouseArea visible when its needed.

Revision history for this message
Zsombor Egri (zsombi) wrote :

This feels a bit weird to me, that the MouseArea steals the cursor. I've tested an MR of mine (SplitView in subject) where I had the topmost component a Window, in which there was an active MouseArea, and that did not steal the resize cursor from the SplitView's resize handlers... I feel we need to dig more on this...

review: Needs Information
Revision history for this message
Dubstar_04 (dubstar-04) wrote :

I agree. I expected the mouse focus to propagate through to the underlying app, but it doesn’t and the containsMouse property for the app's MouseArea doesn't seem to get set to true under any conditions.

I should have more time to look at this in a couple of weeks, can you suggest anything to look for?

Thanks,

Dan

Revision history for this message
Zsombor Egri (zsombi) wrote :

Dan, Loic removed the PerformanceOverlay from MainView. The MainWindow Christian will land soon won't have that either. Let's wait till all these land, and then perhaps we can get rid of this annoying thing, so you won't need this MR anymore.

Revision history for this message
Cris Dywan (kalikiana) wrote :

It would appear to be unnecessary now so I Rejected the MR.

Unmerged revisions

2033. By Dubstar_04

Only make the MouseArea visible when its needed.

2032. By Dubstar_04

Stop the PerformanceOverlay Stealing the mouse focus.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Ubuntu/PerformanceMetrics/PerformanceOverlay.qml'
--- src/Ubuntu/PerformanceMetrics/PerformanceOverlay.qml 2015-03-03 13:47:48 +0000
+++ src/Ubuntu/PerformanceMetrics/PerformanceOverlay.qml 2016-07-13 16:30:47 +0000
@@ -115,7 +115,7 @@
115 property int pressCountToActivate: 4115 property int pressCountToActivate: 4
116116
117 anchors.fill: parent117 anchors.fill: parent
118 enabled: performanceOverlayEnabled118 visible: performanceOverlayEnabled && !overlay.active
119119
120 onPressed: {120 onPressed: {
121 mouse.accepted = false;121 mouse.accepted = false;

Subscribers

People subscribed via source and target branches