Unity 8 doesnt respect Qt::CursorShape

Bug #1547360 reported by Dubstar_04
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
unity8 (Ubuntu)
Incomplete
Undecided
Daniel d'Andrada

Bug Description

Unity 8 doesn't respect the cursor shape and the cursor remains a standard Qt::ArrowCursor regardless of what it is set to.

http://doc.qt.io/qt-5/qt.html#CursorShape-enum

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity8 (Ubuntu):
status: New → Confirmed
Changed in unity8 (Ubuntu):
assignee: nobody → Daniel d'Andrada (dandrader)
status: Confirmed → In Progress
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Works on my laptop.

Changed in unity8 (Ubuntu):
status: In Progress → Incomplete
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Please provide details and a sample application

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

for testing, I used CursorShapes.qml from lp:~dandrader/+junk/animatedDemos
(if you wanna try that you'll have to build the CustomCursor module there and make QML2_IMPORT_PATH point to it

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

This is a copy of the code from the mouse area:

           MouseArea {
                id: mouseArea
                anchors.fill:parent

                hoverEnabled: true
                cursorShape: Qt.CrossCursor
}

The Apps were built with "framework": "ubuntu-sdk-15.04" which framework are you using?

Revision history for this message
Daniel d'Andrada (dandrader) wrote : Re: [Bug 1547360] Re: Unity 8 doesnt respect Qt::CursorShape

On 19/02/2016 11:13, Dubstar_04 wrote:
> This is a copy of the code from the mouse area:
>
> MouseArea {
> id: mouseArea
> anchors.fill:parent
>
> hoverEnabled: true
> cursorShape: Qt.CrossCursor
> }
>
>
> The Apps were built with "framework": "ubuntu-sdk-15.04" which framework are you using?
>

That isn't enough. MouseArea.cursorShape is subject to interference from
overlapping MouseAreas etc. Nothing guarantees you it will be reflected
on the QWindow::cursor() of your application, which is what the shell
(Unity 8) sees. So it depends on the scene as a whole.

That test app I pointed you to uses just plain Qt/QML. There's no Ubuntu
Ui Toolkit in there.

My guess is that the bug is either in the application code or in the
toolkit used by it.

Check if you QWindow::cursor() also changes to a Qt.CrossCursor.

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

The app works as expected in Unity 7 when testing. The cursor is set depending on the current action and switches as expected.

On unity 8 I only have a Qt::ArrowCursor shown.

I do have the mouseArea wrapped in a MultiPointTouchArea. Maybe the MultiPointTouchArea is handled differently on unity 7 because there is no touch device.

I will remove the MultiPointTouchArea and test and feedback.

Thanks,

Dan

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If you still find it doesn't work, then that's bug 1447839.

Although our toolkits do tell Mir what the current cursor is as it moves over the window, Unity8 is the one shell that doesn't yet implement that in-window cursor changing. There's a trivial test case for it in bug 1447839.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Unity8 does implement "in-window cursor changing". If by that you mean a client application setting the cursor of its surface and unity8 taking that info a using it.

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.