Version: 4.4.74 (using Devel) Compiler: gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 OS: Linux Installed from: Compiled sources Input fields in Plasma Panels are unable to receive focus when other windows are open. I'm not sure whether its a KWin bug or not, but I guess that might be it. Steps to reproduce- 1. Add a applet which takes input (e.g Notes, Microblog) to a panel (a new one maybe added to test). 2. Open some application windows, try to position the cursor in the applet's input fields. 3. It doesn't take any input or display the cursor, possibly because the focus isn't provided to the applet. The following is a use case for fixing this behaviour- "I have microblog in a panel and when I've Firefox open, I want to tweet something, have to minimize everything. Its cumbersome." Expected- The applets inside panels should be able to receive input even if application windows are open.
kwin* doesn't focus docks, this would probably cause issues with systray icons and the taskbar (at least flicker), therefore i doubt this will change. so if sth. (the applet) in a dock requires kbd input focus it will have to take it (on mouseclicks) itself. *neither do openbox or e17 - compiz is the only WM i know that passes the focus to dock type windows and returns it to the former window on mouse leave events
Well I tried doing a setFocus() on the textEdit (if that is what you meant) on mouse clicks. I am sure that the method is getting called, but it still doesn't focus the textBox. Any suggestions?
no, i'm sorry for the ambiguity. "WM Focus" -> QWidget::activateWindow();
Thanks for the help, but I think I'm missing something. I tried m_statusEdit->nativeWidget()->activateWindow(); inside a eventFilter attached to m_statusEdit. Doesn't seem to work, but the event filter is being called (kDebug verification). Any pointers?
*** This bug has been marked as a duplicate of bug 177674 ***
no idea. clearly works for me with *native qwidget* usage (i've never tried that with a graphicswidget, does it return a valid "m_statusEdit->nativeWidget()->window();"?) MyDock::MyDock(.) { KWindowSystem::setType( winId(), NET::Dock ); // .... } bool MyDock::eventFilter( QObject *o, QEvent *ev ) { // hangs on few special child widgets if ( ev->type() == QEvent::MouseButtonPress ) activateWindow(); // .... } weird guess would be to call: if (m_statusEdit->nativeWidget()->window()) m_statusEdit->nativeWidget()->window()->activateWindow(); else qDebug("there is no spoon... err \"window\"");
@Thomas Lübking: kwin can still deny focus to a widget that wants to be activated: what we want in this case is KWindowSystem::forceActiveWindow()
(In reply to comment #7) > kwin can still deny focus to a widget that wants to be activated: sure, eg. if you set a high focus protection level. has been identified why plasma panels get a "mean" handling (compared to my random dock window - the relevant properties are equal)? Tried on "medium" focus stealing protection. maybe this is important: my dock also gets a "raise();" request before. > what we want in this case is KWindowSystem::forceActiveWindow() "The usage of forceActiveWindow() is meant only for pagers and similar tools, which represent direct user actions related to window manipulation. Except for rare cases, this request will be always honored, and normal applications are forbidden to use it."