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

Proposed by Dubstar_04 on 2016-07-12
Status: Rejected
Rejected by: Christian Dywan on 2016-09-12
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 2016-07-12 Needs Information on 2016-07-15
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 on 2016-07-13

Only make the MouseArea visible when its needed.

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
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

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.

Christian Dywan (kalikiana) wrote :

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

Unmerged revisions

2033. By Dubstar_04 on 2016-07-13

Only make the MouseArea visible when its needed.

2032. By Dubstar_04 on 2016-07-12

Stop the PerformanceOverlay Stealing the mouse focus.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/PerformanceMetrics/PerformanceOverlay.qml'
2--- src/Ubuntu/PerformanceMetrics/PerformanceOverlay.qml 2015-03-03 13:47:48 +0000
3+++ src/Ubuntu/PerformanceMetrics/PerformanceOverlay.qml 2016-07-13 16:30:47 +0000
4@@ -115,7 +115,7 @@
5 property int pressCountToActivate: 4
6
7 anchors.fill: parent
8- enabled: performanceOverlayEnabled
9+ visible: performanceOverlayEnabled && !overlay.active
10
11 onPressed: {
12 mouse.accepted = false;

Subscribers

People subscribed via source and target branches