Test return values, fool !

svn path=/trunk/kdebase/kwin/; revision=46870
This commit is contained in:
Rik Hemsley 2000-04-17 09:29:56 +00:00
parent 330ea804b2
commit 830909e544

View file

@ -372,6 +372,8 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags
if (0 != avoidStatus) { if (0 != avoidStatus) {
qDebug("XGetTextProperty worked for atom _NET_AVOID_SPEC");
char ** avoidList; char ** avoidList;
int avoidListCount; int avoidListCount;
@ -380,14 +382,18 @@ Client::Client( Workspace *ws, WId w, QWidget *parent, const char *name, WFlags
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) {
case 'N': case 'N':
@ -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);
if (0 != XGetClassHint(qt_xdisplay(), win, &xch)) {
QByteArray params; QByteArray params;
QDataStream stream(params, IO_WriteOnly); QDataStream stream(params, IO_WriteOnly);
stream << QString::fromUtf8(xch.res_name); stream << QString::fromUtf8(xch.res_name);
kapp->dcopClient()->send( kapp->dcopClient()->send(
"kicker", "kicker",
"TaskbarApplet", "TaskbarApplet",
"clientMapped(QString)", "clientMapped(QString)",
params params
); );
XFree(xch.res_name);
XFree(xch.res_class);
}
} }