Tip surfaces not being repositioned on client request

Bug #1633052 reported by Gerry Boland
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MirAL
Fix Released
Medium
Alan Griffiths

Bug Description

I'm testing tooltips with Qt. I find if I move quickly from one button to another, the tooltip remains positioned at the first tooltip, but the contents are changed to suit the second.

Steps to repro:
1. Grab lp:~gerboland/qtubuntu/latest/, qmake & make.
2. Set env var with location of the new QPA plugin:
    export QT_QPA_PLATFORM_PLUGIN_PATH=..../path/to/src/ubuntumirclient/libqpa-ubuntumirclient.so
3. Install qtbase5-examples
4. Run miral-shell
5. Run QT_LOGGING_RULES=ubuntumirclient=true QT_QPA_PLATFORM=ubuntumirclient /usr/lib/x86_64-linux-gnu/qt5/examples/widgets/widgets/tooltips/tooltips
6. Hover mouse over a square to get a tooltip.
7. Move mouse quickly on top of a triangle

Expected Result: new tooltip at location of the triangle with contents "Triangle"
Actual Result: tooltop at old square location, but contents updated to "Triangle"

Note: tooltips have rendering errors, known issue, working on it

Related branches

Revision history for this message
Gerry Boland (gerboland) wrote :

To see QtUbuntu asking for the repositioning of the Tooltip, see the console output from the app:

ubuntumirclient: makeSurfaceSpec(window=0x1fb1330): Tip spec (type=0xd, position=(238, 178)px, size=(57x20)px)
ubuntumirclient: makeSurfaceSpec(window=0x1fb1330): Tip spec (type=0xd, position=(150, 179)px, size=(57x20)px)

Revision history for this message
Gerry Boland (gerboland) wrote :
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Which Mir version are you building qtubuntu against?

With lp:mir I need:

$ bzr diff
=== modified file 'src/ubuntumirclient/screen.h'
--- src/ubuntumirclient/screen.h 2016-04-28 14:09:54 +0000
+++ src/ubuntumirclient/screen.h 2016-10-13 14:04:39 +0000
@@ -20,7 +20,7 @@
 #include <qpa/qplatformscreen.h>
 #include <QSurfaceFormat>

-#include <mircommon/mir_toolkit/common.h> // just for MirFormFactor enum
+#include <mir_toolkit/common.h> // just for MirFormFactor enum

 #include "cursor.h"

=== modified file 'src/ubuntumirclient/window.cpp'
--- src/ubuntumirclient/window.cpp 2016-10-13 11:35:08 +0000
+++ src/ubuntumirclient/window.cpp 2016-10-13 14:12:06 +0000
@@ -269,7 +269,7 @@
         spec = Spec{mir_connection_create_spec_for_dialog(connection, width, height, pixelFormat)};
         break;
     case mir_surface_type_tip:
-#if MIR_SERVER_VERSION < MIR_VERSION_NUMBER(0, 25, 0)
+#if MIR_CLIENT_VERSION < MIR_VERSION_NUMBER(3, 4, 0)
         spec = Spec{mir_connection_create_spec_for_tooltip(connection, width, height, pixelFormat, parent,
                     &location)};
 #else

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :
Download full text (8.2 KiB)

Running with the above patch, lp:mir and lp:miral I see no tooltips. The log shows a window being created placed and destroyed:

[2016-10-13 15:21:09.598751] miral::Window Management: place_new_surface app_info={application=tooltips, windows={, , Tool Tips}}, requested_specification={name=, type=normal, top_left=(330, 202), size=(51, 20), output_id=0, state=restored, min_width=0, min_height=0, max_width=16777215, max_height=16777215} -> {name=, type=normal, top_left=(330, 212), size=(51, 20), output_id=0, state=restored, min_width=0, min_height=0, max_width=16777215, max_height=16777215}
[2016-10-13 15:21:09.598914] miral::Window Management: advise_new_window window_info={name=, type=normal, state=restored, restore_rect=((330, 212), (51, 20)), children={}, min_width=0, min_height=0, max_width=16777215, max_height=16777215, width_inc=1, height_inc=1, min_aspect={0, 4294967295}, max_aspect={4294967295, 0}, preferred_orientation=15, confine_pointer=0, output_id=0}
[2016-10-13 15:21:09.600738] miral::Window Management: handle_modify_window window_info={name=, type=normal, state=restored, restore_rect=((330, 212), (51, 20)), children={}, min_width=0, min_height=0, max_width=16777215, max_height=16777215, width_inc=1, height_inc=1, min_aspect={0, 4294967295}, max_aspect={4294967295, 0}, preferred_orientation=15, confine_pointer=0, output_id=0}, modifications={name=}
[2016-10-13 15:21:09.600793] miral::Window Management: modify_window window_info={name=, type=normal, state=restored, restore_rect=((330, 212), (51, 20)), children={}, min_width=0, min_height=0, max_width=16777215, max_height=16777215, width_inc=1, height_inc=1, min_aspect={0, 4294967295}, max_aspect={4294967295, 0}, preferred_orientation=15, confine_pointer=0, output_id=0}, modifications={name=}
[2016-10-13 15:21:09.600828] miral::Window Management: ====
[2016-10-13 15:21:09.600963] miral::Window Management: handle_modify_window window_info={name=, type=normal, state=restored, restore_rect=((330, 212), (51, 20)), children={}, min_width=0, min_height=0, max_width=16777215, max_height=16777215, width_inc=1, height_inc=1, min_aspect={0, 4294967295}, max_aspect={4294967295, 0}, preferred_orientation=15, confine_pointer=0, output_id=0}, modifications={size=(51, 20)}
[2016-10-13 15:21:09.600984] miral::Window Management: modify_window window_info={name=, type=normal, state=restored, restore_rect=((330, 212), (51, 20)), children={}, min_width=0, min_height=0, max_width=16777215, max_height=16777215, width_inc=1, height_inc=1, min_aspect={0, 4294967295}, max_aspect={4294967295, 0}, preferred_orientation=15, confine_pointer=0, output_id=0}, modifications={size=(51, 20)}
[2016-10-13 15:21:09.600997] miral::Window Management: ====
[2016-10-13 15:21:09.606447] miral::Window Management: handle_window_ready window_info={name=, type=normal, state=restored, restore_rect=((330, 212), (51, 20)), children={}, min_width=0, min_height=0, max_width=16777215, max_height=16777215, width_inc=1, height_inc=1, min_aspect={0, 4294967295}, max_aspect={4294967295, 0}, preferred_orientation=15, confine_pointer=0, output_id=0}
[2016-10-13 15:21:09.606657] miral::Window Management: advise_focus_lost window_info={name=...

Read more...

Changed in miral:
status: New → Incomplete
Revision history for this message
Gerry Boland (gerboland) wrote :

Yep, I'm running with Mir 0.24, not trunk. I'll look into why it's not working with trunk. Thanks for the patches

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Also tried yakkety+overlay+the 0.3.0 ppa (2068)

I don't see any tips there either.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Doh!

I changed export QT_QPA_PLATFORM_PLUGIN_PATH=..../path/to/src/ubuntumirclient/libqpa-ubuntumirclient.so

To QT_QPA_PLATFORM_PLUGIN_PATH=..../path/to/src/ubuntumirclient/

And the I can reproduce

Changed in miral:
status: Incomplete → In Progress
assignee: nobody → Alan Griffiths (alan-griffiths)
importance: Undecided → Medium
Changed in miral:
status: In Progress → Fix Committed
milestone: none → 0.4
Revision history for this message
Gerry Boland (gerboland) wrote :

> I changed export QT_QPA_PLATFORM_PLUGIN_PATH=..../path/to/src/ubuntumirclient/libqpa-ubuntumirclient.so
>
> To QT_QPA_PLATFORM_PLUGIN_PATH=..../path/to/src/ubuntumirclient/

Ah so sorry

Changed in miral:
milestone: 0.4 → 0.3
Changed in miral:
status: Fix Committed → 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.