xwl: Include errors and warnings

(cherry picked from commit 439dcc4b1f)
icc-effect-5.20.5
Aleix Pol 2020-10-27 18:20:21 +01:00 committed by Nate Graham
parent a3f5d43100
commit 9854f40333
2 changed files with 5 additions and 0 deletions

View File

@ -145,6 +145,8 @@ void Clipboard::doHandleXfixesNotify(xcb_xfixes_selection_notify_event_t *event)
if (X11Source *source = x11Source()) {
source->getTargets();
} else {
qCWarning(KWIN_XWL) << "Could not create a source from" << event << Qt::hex << (event ? event->owner : -1);
}
}
@ -152,6 +154,7 @@ void Clipboard::x11OffersChanged(const QStringList &added, const QStringList &re
{
X11Source *source = x11Source();
if (!source) {
qCWarning(KWIN_XWL) << "offers changed when not having an X11Source!?";
return;
}

View File

@ -197,9 +197,11 @@ void X11Source::handleTargets()
);
auto *reply = xcb_get_property_reply(xcbConn, cookie, nullptr);
if (!reply) {
qCDebug(KWIN_XWL) << "Failed to get selection property";
return;
}
if (reply->type != XCB_ATOM_ATOM) {
qCDebug(KWIN_XWL) << "Wrong reply type";
free(reply);
return;
}