The bug I was chasing seems to have gone away completely on its own!? Maybe a system update fixed a buggy library? (will try again on a different system)
So, back to the original bug in this ticket - recap: only occurs with opengl enabled, only on win32, only with python3 builds, only with undecorated windows!
Comparing with and without opengl, the popup window metadata looks unremarkable (as per ticket description).
So then I updated the test apps to run native under GTK3 (r24723), and it turns out that GTK3 is just buggy on win32 with undecorated windows: when you toggle the "decoration" flag off and then on again, the window does not regain its decorations or at least they are not being re-drawn, but the pointer events are adjusted... so they land with an offset.
Running the same example through xpra: the window disappears as soon as we try to remove the decorations!
(also spotted another bug: #2516)
So r24725 fixes this by not using opengl for undecorated windows and re-initializing the window when the "decorations" flag is toggled. (backport to v3 in r24727)
@wolfram: there are beta builds with this fix here: https://xpra.org/beta/windows.
Please close this ticket if that works for you.