From kwin Fri Oct 08 17:19:48 2010 From: Thomas =?iso-8859-1?q?L=FCbking?= Date: Fri, 08 Oct 2010 17:19:48 +0000 To: kwin Subject: semi-OT: broken input focus Message-Id: <201010081919.48669.thomas.luebking () web ! de> X-MARC-Message: https://marc.info/?l=kwin&m=128655865914190 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_0K1rMD+rQrdOpOl" --Boundary-00=_0K1rMD+rQrdOpOl Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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=_0K1rMD+rQrdOpOl 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=_0K1rMD+rQrdOpOl Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kwin mailing list kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin --Boundary-00=_0K1rMD+rQrdOpOl--