Unsolved `containsMouse` is `false` after setting mouse coordinates from c++ backend
-
Title kinda says it.
If I use the c++ backend to set the mouse coordinates (link) and move to cursor in aMouseArea
, thecontainsMouse
property of that area staysfalse
.Is this a bug ?
Qt 5.11 -
hi @rghvdberg ,is hoverEnabled true ?
-
Yes , it's set to true
-
Which OS and/or windowing system is this?
In principle the window manager should send you a mouse event with the new position after it processes the call to change the cursor position, could you install an event filter on the application and log if this is the case? -
I'm using Linux Mint 18.
I'll checkout the eventFilter thing. -
Forgot to mention it is the Cinnamon desktop.
-
could you install an event filter on the application
Now I,m confused.
Are we talking about a qt eventfilter or some other app / log thingy?
(you might notice here I'm kinda new to these things ;-) ) -
After struggling for an hour installing a qt eventFilter I've come to the conclusion I didn't need that. Lol
I should read better 😁 -
seems cinnamon uses Muffin / Mutter
wmctrl -m Name: Mutter (Muffin) Class: N/A PID: N/A Window manager's "showing the desktop" mode: N/A
no clue yet how to get info from that
-
@kshegunov to be clear, the mouse cursor does show up at the right location , but the MouseArea fails to register it is inside it. So the containsMouse flag stays
false
even when the mouse cursor is in it. -
@rghvdberg said in `containsMouse` is `false` after setting mouse coordinates from c++ backend:
Are we talking about a qt eventfilter or some other app / log thingy?
Yes, that's what we are talking about.
After struggling for an hour installing a qt eventFilter I've come to the conclusion I didn't need that. Lol
I should read better 😁Then you solved your problem? I will repeat what I wrote before:
In principle the window manager should send you a mouse event with the new position after it processes the call to change the cursor position, could you install an event filter on the application and log if this is the case?
I want you to find out if there's an incoming mouse event after the call to
QCursor::setPos
to confirm or deny whether this is due to the window manager. -
I used the eventfilter to log the mouse coordinates to the console. It shows that after the setPos the coordinates are updated perfectly.
Furthermore, I have a hot corner in Cinnamon. When the mouse is at top left of the screen (0,0) it triggers the "exposé" ; show all open windows.
When I do setPos(0,0), the desktop shows the exposé. It seems that the desktop is also updated.Is this enough proof, because I have no clue how to snoop on the window manager.
-
@rghvdberg said in `containsMouse` is `false` after setting mouse coordinates from c++ backend:
I used the eventfilter to log the mouse coordinates to the console. It shows that after the setPos the coordinates are updated perfectly.
Okay, assuming this is correct, which I have no reason to doubt, then you should file that as a bug report and/or write to the interest mailing list to (maybe) get answers from the developers.
Possibly related to QTBUG-56857 or QTBUG-65157.