Xpra: Ticket #755: some tooltip windows have window decorations (causing position offset problems)

In airgap client 0.14.13.271, running Firefox brings up a Firefox welcome screen that contains a popup on the right "Take a quick tour".

Within this window is an 'x' to dismiss the window. Moving the mouse up to that cursor, the x does not highlight when the mouse cursor is over the x. Instead, it gets highlighted when the mouse cursor is roughly 10 pixels below the x.



Wed, 03 Dec 2014 23:42:01 GMT - Nick Centanni:

Since this same startup screen doesn't show the second time Firefox is loaded, here's the URL that will bring up the screen in question:

https://www.mozilla.org/en-US/firefox/33.0/firstrun/


Thu, 04 Dec 2014 02:39:21 GMT - Antoine Martin: owner changed

Could be related to #746, #734.

Please provide xpra info and small screenshot of when it happens, -d cursor debug log would also help.


Tue, 09 Dec 2014 04:09:22 GMT - Antoine Martin: priority changed

Raising as I would like to get this in 0.14.13 if possible.


Tue, 09 Dec 2014 19:52:57 GMT - Nick Centanni:

It's likely that this mouse offset is caused by the fact that we add decoration (title bar) to a browser window which is supposed to displayed as an undecorated tooltip, thereby throwing off the cursor positioning by the height of that additional decoration.


Tue, 09 Dec 2014 20:46:41 GMT - Antoine Martin:

Found that this Firefox tooltip window is defined as a non override-redirect transient window for the main browser window and is of type UTILITY:

window[29].XShm=True
window[29].class-instance=('Popup', 'Firefox')
window[29].client-machine=localhost.localdomain
window[29].dimensions=(438, 228)
window[29].focused=0
window[29].grabbed=0
window[29].has-alpha=True
window[29].icon-title=Firefox
window[29].opacity=-1
window[29].override-redirect=False
window[29].pid=16674
window[29].position=(1350, 263)
window[29].scaling=(1, 1)
window[29].size=(438, 228)
window[29].size-constraints.gravity=1
window[29].size-constraints.maximum-size=(32767, 32767)
window[29].size-constraints.minimum-size=(1, 228)
window[29].size-constraints.position=(0, 0)
window[29].suspended=False
window[29].title=Firefox
window[29].total_frames[png]=11
window[29].total_pixels[png]=222627
window[29].transient-for=28
window[29].tray=False
window[29].window-type=('UTILITY',)
window[29].xid=0x8009b8

The wm spec states: _NET_WM_WINDOW_TYPE_UTILITY indicates a small persistent utility window, such as a palette or toolbox. It is distinct from type TOOLBAR because it does not correspond to a toolbar torn off from the main application. It's distinct from type DIALOG because it isn't a transient dialog, the user will probably keep it open while they're working. Windows of this type may set the WM_TRANSIENT_FOR hint indicating the main application window.

Reading this text, it isn't clear to me if we should really always make it an undecorated window - but r8222 does this and probably gets rid of the offset bug (which looks like a Firefox bug, it either makes the assumption that there will not be an offset, or queries the window position before we have mapped it with the offset due to the title bar and either fails to detect that we mapped it lower or tries to force it where it wants it).

Does this fix the offset bug? (I would like to backport to v0.14.x)


Tue, 09 Dec 2014 22:50:11 GMT - Antoine Martin: priority changed

Backport to v0.14.x in r8023.

Please close if this fixes things. (raising as this is due for 0.14 release)


Wed, 10 Dec 2014 04:20:56 GMT - Antoine Martin: status changed; resolution set

Fix has been released as part of 0.14.13

Closing.


Thu, 11 Dec 2014 18:30:25 GMT - Antoine Martin: summary changed

(updating ticket title to reflect actual bug fixed)


Thu, 11 Dec 2014 18:35:22 GMT - Antoine Martin:

See also #762


Sat, 23 Jan 2021 05:05:01 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/755