From kde-devel Thu Oct 14 19:32:07 2010 From: Thomas =?iso-8859-1?q?L=FCbking?= Date: Thu, 14 Oct 2010 19:32:07 +0000 To: kde-devel Subject: X11 / broken input focus, need so. to reproduce Message-Id: <201010142132.07759.thomas.luebking () web ! de> X-MARC-Message: https://marc.info/?l=kde-devel&m=128708503221691 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_3q1tMvI6NnU6Vx+" --Boundary-00=_3q1tMvI6NnU6Vx+ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit The mail was originally sent to the kwin mailing list, but since i got no reply i'll try here ;-) I just want some confirmation that this is not a local problem. If you can spare the time and have KDE installed, please compile the testcase, run it and try to activate the window by clicking it (you local focus policy is irrelevant! - the only WM that seems to "work" here is IceWM...) Then pleast reply on success and your XOrg/Qt/KDE version (though KDE should actually not matter) Thanks alot, Thomas //compile: gcc -o focustest focustest.cpp -I /usr/include \ -I/usr/include/QtGui -lQtCore -lkdeui ------- Original mail with some details ------------------- This is maybe not really a kwin issue, but might be of interest. Since "some" recent update (of Xorg, Qt?) i'm no longer able to set the input focus to windows after XWMHints *hints = XGetWMHints ( QX11Info::display(), window()->winId() ); hints->input = false; XSetWMHints ( QX11Info::display(), window()->winId(), hints ); ... and i mean: "not at all". Neither using QWidget::activateWindow() (used to work) nor KWindowSystem::activateWindow() nor even KWindowSystem::forceActiveWindow() I also cannot even override the input focus from the rules anymore. And the focus policy (tried none) has no impact either. I first thought this might be a recent bug in kwin, but it actually works with neither compiz nor metacity nor openbox. It /does/ however work with [drumroll] IceWM... =\ Is anyone aware of recent changes in XWMHints or the clientmessage system? Is it a general issue at all or only a localdistro one? (ie: can you reproduce this, testcase attached) And why could IceWM keep working? (it does not ignore the hint, the inactive part of the client does not cause an activation) Testcase attached, Workspace::allowClientActivation() figures "Activation: Belongs to active application", what /should/ result in a permittance ... Cheers, Thomas --Boundary-00=_3q1tMvI6NnU6Vx+ Content-Type: text/x-c++src; charset="utf-8"; name="focustest.cpp" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="focustest.cpp" //compile: gcc -o focustest focustest.cpp -I /usr/include -I/usr/include/QtGui -lQtCore -lkdeui #include #include #include #include #include class Widget : public QWidget { public: Widget() : QWidget() { XWMHints *hints = XGetWMHints ( QX11Info::display(), window()->winId() ); hints->input = false; XSetWMHints ( QX11Info::display(), window()->winId(), hints ); } protected: void mousePressEvent( QMouseEvent * ) { activateWindow(); // KWindowSystem::activateWindow( window()->winId() ); // KWindowSystem::forceActiveWindow( window()->winId() ); } }; int main (int argc, char **argv) { QApplication a(argc, argv); Widget *window = new Widget; window->resize( 640, 480 ); window->show(); return a.exec(); } --Boundary-00=_3q1tMvI6NnU6Vx+ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --Boundary-00=_3q1tMvI6NnU6Vx+--