[KDE/Mac] getting a WId for the currently active window

René J.V. Bertin rjvbertin at gmail.com
Thu Oct 30 23:47:46 UTC 2014


Hello,

I'm trying to find a way to prevent focus-stealing on Mac OS X in KDE4 applications when a notification is posted through a helper process (daemon/service/agent). The most elegant way would be to determine the active window when the notification is created, and reactivate it when the notification is being taken down.
I've figured out how to obtain an OS X specific window number corresponding to the window in question, but I am stuck converting it to a Qt object - a WId to be specific. (That is nothing more or less than an NSWindow pointer.) I've only found how to do the conversion for windows of the calling application, not for windows of another running application.

Is there a work-around? 

Thanks,
René



More information about the kde-mac mailing list