[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: semi-OT: broken input focus
From: Thomas =?iso-8859-1?q?L=FCbking?= <thomas.luebking () web ! de>
Date: 2010-10-08 17:19:48
Message-ID: 201010081919.48669.thomas.luebking () web ! de
[Download RAW message or body]
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
["focustest.cpp" (text/x-c++src)]
//compile: gcc -o focustest focustest.cpp -I /usr/include -I/usr/include/QtGui -lQtCore -lkdeui
#include <QApplication>
#include <QWidget>
#include <QX11Info>
#include <KDE/KWindowSystem>
#include <netwm.h>
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();
}
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic