https://bugs.winehq.org/show_bug.cgi?id=48732
--- Comment #17 from Gabriel Ivăncescu gabrielopcode@gmail.com --- (In reply to Zebediah Figura from comment #16)
Is it really correct that SetParent() on a non-visible window should cause any focus changes? That seems surprising to me. If it's not correct, I think that's what should be fixed instead.
I was under the impression that the window itself is visible, at least in MPC (not this bug). Then, when it gets unparented, it gets moved to top-left before it gets destroyed, because its parent is now the desktop window, hence the flickering.
Its position may be 0,0 but that's relative to the parent, of course. When the parent changes, so does its position. And because it becomes a top-level window, focus changes, probably due to some X11 event.