[KDE/Mac] [OS X/Wayland] using WIds created by a different process to create KMessageBox'es and other widgets/windows

Martin Graesslin mgraesslin at kde.org
Wed Dec 9 12:51:47 UTC 2015

On Wednesday, December 9, 2015 1:29:41 PM CET René J.V. Bertin wrote:
> KWindowSystem::setMainWindow() is a different matter. Firstly, it does NOT
> use the plugin architecture currently, but simply assumes that
> QWindow::fromWinId() will always work (and never crash).

oh that explains a lot... Like why couldn't I find it in my Wayland backend, 
why do random applications crash on Wayland...

> For the time being
> it will thus require ifdefs.

nah, won't help. Well would help for OSX, but not for Linux/Wayland. I think 
we need to move it to plugin architecture, too.

> Beyond that, exactly how should I adapt it?
> Never do anything on OS X (the solution used currently in
> KDELibs4/MacPorts)? Or check the result from QWidget::find() and only do
> its job when that function returns a valid pointer (which could actually be
> the general approach if that find() function isn't expensive on platforms
> where calling it is redundant).
> Beyond that I suppose that setMainWindow() is *not* the place to push the
> new window to the foreground so that it doesn't get overlooked - or is it?
> In other words, what exactly is the role of KWindowSystem's main window?

It's an X11 thing (like most KWindowSystem methods) for parent-child 
relationship. It's not about raising windows, etc. That's up to the windowing 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20151209/34bb8aba/attachment.sig>

More information about the kde-mac mailing list