Test return values, fool !
svn path=/trunk/kdebase/kwin/; revision=46870
This commit is contained in:
parent
330ea804b2
commit
830909e544
1 changed files with 30 additions and 12 deletions
42
client.cpp
42
client.cpp
|
@ -371,6 +371,8 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags
|
||||||
XGetTextProperty(qt_xdisplay(), w, &avoidProp, avoidAtom);
|
XGetTextProperty(qt_xdisplay(), w, &avoidProp, avoidAtom);
|
||||||
|
|
||||||
if (0 != avoidStatus) {
|
if (0 != avoidStatus) {
|
||||||
|
|
||||||
|
qDebug("XGetTextProperty worked for atom _NET_AVOID_SPEC");
|
||||||
|
|
||||||
char ** avoidList;
|
char ** avoidList;
|
||||||
int avoidListCount;
|
int avoidListCount;
|
||||||
|
@ -379,14 +381,18 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags
|
||||||
XTextPropertyToStringList(&avoidProp, &avoidList, &avoidListCount);
|
XTextPropertyToStringList(&avoidProp, &avoidList, &avoidListCount);
|
||||||
|
|
||||||
if (0 != convertStatus) {
|
if (0 != convertStatus) {
|
||||||
|
|
||||||
|
qDebug("XTextPropertyToStringList succeded");
|
||||||
|
|
||||||
avoid_ = true;
|
avoid_ = true;
|
||||||
|
|
||||||
if (avoidListCount != 1) {
|
if (avoidListCount != 1) {
|
||||||
// qDebug("Extra values in avoidance list. Ignoring.");
|
qDebug("Extra values in avoidance list. Ignoring.");
|
||||||
}
|
}
|
||||||
|
|
||||||
char * itemZero = avoidList[0];
|
char * itemZero = avoidList[0];
|
||||||
|
|
||||||
|
qDebug("Anchoring to border %s", itemZero);
|
||||||
|
|
||||||
switch (*itemZero) {
|
switch (*itemZero) {
|
||||||
|
|
||||||
|
@ -408,7 +414,12 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags
|
||||||
}
|
}
|
||||||
|
|
||||||
XFreeStringList(avoidList);
|
XFreeStringList(avoidList);
|
||||||
}
|
|
||||||
|
} else
|
||||||
|
qDebug("XTextPropertyToStringList failed");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
qDebug("XGetTextProperty failed for atom _NET_AVOID_SPEC");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -520,16 +531,23 @@ void Client::manage( bool isMapped )
|
||||||
// Notify kicker that an app has mapped a window.
|
// Notify kicker that an app has mapped a window.
|
||||||
|
|
||||||
XClassHint xch;
|
XClassHint xch;
|
||||||
XGetClassHint(qt_xdisplay(), win, &xch);
|
|
||||||
QByteArray params;
|
if (0 != XGetClassHint(qt_xdisplay(), win, &xch)) {
|
||||||
QDataStream stream(params, IO_WriteOnly);
|
|
||||||
stream << QString::fromUtf8(xch.res_name);
|
QByteArray params;
|
||||||
kapp->dcopClient()->send(
|
QDataStream stream(params, IO_WriteOnly);
|
||||||
"kicker",
|
stream << QString::fromUtf8(xch.res_name);
|
||||||
"TaskbarApplet",
|
|
||||||
"clientMapped(QString)",
|
kapp->dcopClient()->send(
|
||||||
params
|
"kicker",
|
||||||
);
|
"TaskbarApplet",
|
||||||
|
"clientMapped(QString)",
|
||||||
|
params
|
||||||
|
);
|
||||||
|
|
||||||
|
XFree(xch.res_name);
|
||||||
|
XFree(xch.res_class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue