activateWindow, forceActiveWindow
Kevin Kofler
kevin.kofler at chello.at
Mon Mar 3 09:22:06 CET 2008
Hi,
I believe the current implementations of activateWindow and forceActiveWindow
in kwindowsystem_win.cpp don't implement the same semantics as their X11
versions. The issue is that SetActiveWindow only works within a thread (in
particular, only in the same application), whereas on X11,
KWindowSystem::activateWindow works just fine across applications. Moreover,
forceActiveWindow doesn't really force the active window, i.e. bypass focus
steal prevention, as it's supposed to.
I believe it would be more compliant to have activateWindow call
SetForegroundWindow( win ); (is calling SetActiveWindow first really
necessary?) and forceActiveWindow use some hack like
http://vb.mvps.org/articles/ap199902.pdf (I've also seen some other hacks,
like sending a fake user input event to the window to activate, but I can't
find them now.)
I can't test this though (only running GNU/Linux these days).
Kevin Kofler
More information about the Kde-windows
mailing list