Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.5.3, 4.6.2
-
None
-
Linux / qt4.6.2
Description
Imagine a simple program that consists of a QMainWindow with a QMdiArea, like the "MDI Example" in qt4 documentation. A QMainSubwindow can be created and added to the QMdiArea through direct user interaction on the gui; when we add a QMainSubwindow to a QMdiArea, if the previous QMdiArea::currentSubWindow() was maximized, the new one will be maximized, too. Everything works fine.
Now imagine to code a program where a QMainSubwindow could also be created as a consequence of an external event (such as a network event) or other kind of event (such a QTimer slot).
In this last example, the QMainWindow is not guaranteed to be the active window in the desktop/window manager. When the newly added QMainSubwindow gets automatically maximized, it will steal the focus to the currently open window in the destkop/window manager and gain it.
This has been tested on linux and happens with gnome/xfce, while on kde it only happens if the kwin's focus stealing prevention policy is disabled.