And we got rid of KDebug

Usages of kBacktrace got dropped.
This commit is contained in:
Martin Gräßlin 2013-09-02 13:14:39 +02:00
parent add219d5bc
commit 57905c0cc2
47 changed files with 291 additions and 294 deletions

View file

@ -45,6 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "rules.h" #include "rules.h"
#include "screens.h" #include "screens.h"
#include "useractions.h" #include "useractions.h"
#include <QDebug>
#include <QX11Info> #include <QX11Info>
namespace KWin namespace KWin
@ -382,7 +383,7 @@ void Workspace::takeActivity(Client* c, int flags, bool handled)
if (c->tabGroup() && c->tabGroup()->current() != c) if (c->tabGroup() && c->tabGroup()->current() != c)
c->tabGroup()->setCurrent(c); c->tabGroup()->setCurrent(c);
if (!c->isShown(true)) { // shouldn't happen, call activateClient() if needed if (!c->isShown(true)) { // shouldn't happen, call activateClient() if needed
kWarning(1212) << "takeActivity: not shown" ; qWarning() << "takeActivity: not shown" ;
return; return;
} }
c->takeActivity(flags, handled); c->takeActivity(flags, handled);
@ -573,18 +574,18 @@ bool Workspace::allowClientActivation(const KWin::Client *c, xcb_timestamp_t tim
if (!ignore_desktop && !c->isOnCurrentDesktop()) if (!ignore_desktop && !c->isOnCurrentDesktop())
return false; // allow only with level == 0 return false; // allow only with level == 0
if (ac == NULL || ac->isDesktop()) { if (ac == NULL || ac->isDesktop()) {
kDebug(1212) << "Activation: No client active, allowing"; qDebug() << "Activation: No client active, allowing";
return true; // no active client -> always allow return true; // no active client -> always allow
} }
// TODO window urgency -> return true? // TODO window urgency -> return true?
if (Client::belongToSameApplication(c, ac, true)) { if (Client::belongToSameApplication(c, ac, true)) {
kDebug(1212) << "Activation: Belongs to active application"; qDebug() << "Activation: Belongs to active application";
return true; return true;
} }
if (level == 3) // high if (level == 3) // high
return false; return false;
if (time == -1U) { // no time known if (time == -1U) { // no time known
kDebug(1212) << "Activation: No timestamp at all"; qDebug() << "Activation: No timestamp at all";
if (level == 1) // low if (level == 1) // low
return true; return true;
// no timestamp at all, don't activate - because there's also creation timestamp // no timestamp at all, don't activate - because there's also creation timestamp
@ -594,7 +595,7 @@ bool Workspace::allowClientActivation(const KWin::Client *c, xcb_timestamp_t tim
} }
// level == 2 // normal // level == 2 // normal
Time user_time = ac->userTime(); Time user_time = ac->userTime();
kDebug(1212) << "Activation, compared:" << c << ":" << time << ":" << user_time qDebug() << "Activation, compared:" << c << ":" << time << ":" << user_time
<< ":" << (timestampCompare(time, user_time) >= 0) << endl; << ":" << (timestampCompare(time, user_time) >= 0) << endl;
return timestampCompare(time, user_time) >= 0; // time >= user_time return timestampCompare(time, user_time) >= 0; // time >= user_time
} }
@ -615,18 +616,18 @@ bool Workspace::allowFullClientRaising(const KWin::Client *c, xcb_timestamp_t ti
if (level == 4) // extreme if (level == 4) // extreme
return false; return false;
if (ac == NULL || ac->isDesktop()) { if (ac == NULL || ac->isDesktop()) {
kDebug(1212) << "Raising: No client active, allowing"; qDebug() << "Raising: No client active, allowing";
return true; // no active client -> always allow return true; // no active client -> always allow
} }
// TODO window urgency -> return true? // TODO window urgency -> return true?
if (Client::belongToSameApplication(c, ac, true)) { if (Client::belongToSameApplication(c, ac, true)) {
kDebug(1212) << "Raising: Belongs to active application"; qDebug() << "Raising: Belongs to active application";
return true; return true;
} }
if (level == 3) // high if (level == 3) // high
return false; return false;
xcb_timestamp_t user_time = ac->userTime(); xcb_timestamp_t user_time = ac->userTime();
kDebug(1212) << "Raising, compared:" << time << ":" << user_time qDebug() << "Raising, compared:" << time << ":" << user_time
<< ":" << (timestampCompare(time, user_time) >= 0) << endl; << ":" << (timestampCompare(time, user_time) >= 0) << endl;
return timestampCompare(time, user_time) >= 0; // time >= user_time return timestampCompare(time, user_time) >= 0; // time >= user_time
} }
@ -729,7 +730,7 @@ xcb_timestamp_t Client::readUserTimeMapTimestamp(const KStartupInfoId *asn_id, c
time = asn_data->timestamp(); time = asn_data->timestamp();
} }
} }
kDebug(1212) << "User timestamp, ASN:" << time; qDebug() << "User timestamp, ASN:" << time;
if (time == -1U) { if (time == -1U) {
// The window doesn't have any timestamp. // The window doesn't have any timestamp.
// If it's the first window for its application // If it's the first window for its application
@ -756,7 +757,7 @@ xcb_timestamp_t Client::readUserTimeMapTimestamp(const KStartupInfoId *asn_id, c
} }
// don't refuse if focus stealing prevention is turned off // don't refuse if focus stealing prevention is turned off
if (!first_window && rules()->checkFSP(options->focusStealingPreventionLevel()) > 0) { if (!first_window && rules()->checkFSP(options->focusStealingPreventionLevel()) > 0) {
kDebug(1212) << "User timestamp, already exists:" << 0; qDebug() << "User timestamp, already exists:" << 0;
return 0; // refuse activation return 0; // refuse activation
} }
} }
@ -773,7 +774,7 @@ xcb_timestamp_t Client::readUserTimeMapTimestamp(const KStartupInfoId *asn_id, c
return -1U; return -1U;
time = readUserCreationTime(); time = readUserCreationTime();
} }
kDebug(1212) << "User timestamp, final:" << this << ":" << time; qDebug() << "User timestamp, final:" << this << ":" << time;
return time; return time;
} }

View file

@ -134,7 +134,7 @@ bool Activities::start(const QString &id)
if (ksmserver.isValid()) { if (ksmserver.isValid()) {
ksmserver.asyncCall("restoreSubSession", id); ksmserver.asyncCall("restoreSubSession", id);
} else { } else {
kDebug(1212) << "couldn't get ksmserver interface"; qDebug() << "couldn't get ksmserver interface";
return false; return false;
} }
return true; return true;
@ -160,7 +160,7 @@ void Activities::reallyStop(const QString &id)
if (ws->sessionSaving()) if (ws->sessionSaving())
return; //ksmserver doesn't queue requests (yet) return; //ksmserver doesn't queue requests (yet)
kDebug(1212) << id; qDebug() << id;
QSet<QByteArray> saveSessionIds; QSet<QByteArray> saveSessionIds;
QSet<QByteArray> dontCloseSessionIds; QSet<QByteArray> dontCloseSessionIds;
@ -204,14 +204,14 @@ void Activities::reallyStop(const QString &id)
} }
} }
kDebug(1212) << "saveActivity" << id << saveAndClose << saveOnly; qDebug() << "saveActivity" << id << saveAndClose << saveOnly;
//pass off to ksmserver //pass off to ksmserver
QDBusInterface ksmserver("org.kde.ksmserver", "/KSMServer", "org.kde.KSMServerInterface"); QDBusInterface ksmserver("org.kde.ksmserver", "/KSMServer", "org.kde.KSMServerInterface");
if (ksmserver.isValid()) { if (ksmserver.isValid()) {
ksmserver.asyncCall("saveSubSession", id, saveAndClose, saveOnly); ksmserver.asyncCall("saveSubSession", id, saveAndClose, saveOnly);
} else { } else {
kDebug(1212) << "couldn't get ksmserver interface"; qDebug() << "couldn't get ksmserver interface";
} }
} }

View file

@ -27,6 +27,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "composite.h" #include "composite.h"
#include "workspace.h" #include "workspace.h"
#include <QDebug>
namespace KWin namespace KWin
{ {
@ -247,7 +249,7 @@ Client *Bridge::clientForId(long id) const
{ {
Client* client = reinterpret_cast<Client*>(id); Client* client = reinterpret_cast<Client*>(id);
if (!workspace()->hasClient(client)) { if (!workspace()->hasClient(client)) {
kWarning(1212) << "****** ARBITRARY CODE EXECUTION ATTEMPT DETECTED ******" << id; qWarning() << "****** ARBITRARY CODE EXECUTION ATTEMPT DETECTED ******" << id;
return 0; return 0;
} }
return client; return client;

View file

@ -47,6 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KDE/KWindowSystem> #include <KDE/KWindowSystem>
// Qt // Qt
#include <QApplication> #include <QApplication>
#include <QDebug>
#include <QProcess> #include <QProcess>
#include <QStandardPaths> #include <QStandardPaths>
#ifdef KWIN_BUILD_SCRIPTING #ifdef KWIN_BUILD_SCRIPTING
@ -1297,7 +1298,7 @@ void Client::closeWindow()
*/ */
void Client::killWindow() void Client::killWindow()
{ {
kDebug(1212) << "Client::killWindow():" << caption(); qDebug() << "Client::killWindow():" << caption();
killProcess(false); killProcess(false);
XKillClient(display(), window()); // Always kill this client at the server XKillClient(display(), window()); // Always kill this client at the server
destroyClient(); destroyClient();
@ -1338,7 +1339,7 @@ void Client::gotPing(xcb_timestamp_t timestamp)
void Client::pingTimeout() void Client::pingTimeout()
{ {
kDebug(1212) << "Ping timeout:" << caption(); qDebug() << "Ping timeout:" << caption();
ping_timer->deleteLater(); ping_timer->deleteLater();
ping_timer = NULL; ping_timer = NULL;
killProcess(true, m_pingTimestamp); killProcess(true, m_pingTimestamp);
@ -1352,7 +1353,7 @@ void Client::killProcess(bool ask, xcb_timestamp_t timestamp)
pid_t pid = info->pid(); pid_t pid = info->pid();
if (pid <= 0 || clientMachine()->hostName().isEmpty()) // Needed properties missing if (pid <= 0 || clientMachine()->hostName().isEmpty()) // Needed properties missing
return; return;
kDebug(1212) << "Kill process:" << pid << "(" << clientMachine()->hostName() << ")"; qDebug() << "Kill process:" << pid << "(" << clientMachine()->hostName() << ")";
if (!ask) { if (!ask) {
if (!clientMachine()->isLocal()) { if (!clientMachine()->isLocal()) {
QStringList lst; QStringList lst;

View file

@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "client_machine.h" #include "client_machine.h"
// KWin // KWin
#include "utils.h" #include "utils.h"
// KDE
#include <KDE/KDebug>
// Qt // Qt
#include <QtConcurrentRun> #include <QtConcurrentRun>
#include <QFutureWatcher> #include <QFutureWatcher>
@ -124,7 +122,7 @@ bool GetAddrInfo::resolved(QFutureWatcher< int >* watcher)
return false; return false;
} }
if (watcher->result() != 0) { if (watcher->result() != 0) {
kDebug(1212) << "getaddrinfo failed with error:" << gai_strerror(watcher->result()); qDebug() << "getaddrinfo failed with error:" << gai_strerror(watcher->result());
// call failed; // call failed;
deleteLater(); deleteLater();
return false; return false;

View file

@ -135,10 +135,10 @@ void Compositor::setup()
if (hasScene()) if (hasScene())
return; return;
if (m_suspended) { if (m_suspended) {
kDebug(1212) << "Compositing is suspended, reason:" << m_suspended; qDebug() << "Compositing is suspended, reason:" << m_suspended;
return; return;
} else if (!CompositingPrefs::compositingPossible()) { } else if (!CompositingPrefs::compositingPossible()) {
kError(1212) << "Compositing is not possible"; qCritical() << "Compositing is not possible";
return; return;
} }
m_starting = true; m_starting = true;
@ -179,14 +179,14 @@ void Compositor::slotCompositingOptionsInitialized()
} }
switch(options->compositingMode()) { switch(options->compositingMode()) {
case OpenGLCompositing: { case OpenGLCompositing: {
kDebug(1212) << "Initializing OpenGL compositing"; qDebug() << "Initializing OpenGL compositing";
// Some broken drivers crash on glXQuery() so to prevent constant KWin crashes: // Some broken drivers crash on glXQuery() so to prevent constant KWin crashes:
KSharedConfigPtr unsafeConfigPtr = KGlobal::config(); KSharedConfigPtr unsafeConfigPtr = KGlobal::config();
KConfigGroup unsafeConfig(unsafeConfigPtr, "Compositing"); KConfigGroup unsafeConfig(unsafeConfigPtr, "Compositing");
const QString openGLIsUnsafe = QStringLiteral("OpenGLIsUnsafe") + (is_multihead ? QString::number(screen_number) : QString()); const QString openGLIsUnsafe = QStringLiteral("OpenGLIsUnsafe") + (is_multihead ? QString::number(screen_number) : QString());
if (unsafeConfig.readEntry(openGLIsUnsafe, false)) if (unsafeConfig.readEntry(openGLIsUnsafe, false))
kWarning(1212) << "KWin has detected that your OpenGL library is unsafe to use"; qWarning() << "KWin has detected that your OpenGL library is unsafe to use";
else { else {
unsafeConfig.writeEntry(openGLIsUnsafe, true); unsafeConfig.writeEntry(openGLIsUnsafe, true);
unsafeConfig.sync(); unsafeConfig.sync();
@ -194,7 +194,7 @@ void Compositor::slotCompositingOptionsInitialized()
if (!CompositingPrefs::hasGlx()) { if (!CompositingPrefs::hasGlx()) {
unsafeConfig.writeEntry(openGLIsUnsafe, false); unsafeConfig.writeEntry(openGLIsUnsafe, false);
unsafeConfig.sync(); unsafeConfig.sync();
kDebug(1212) << "No glx extensions available"; qDebug() << "No glx extensions available";
break; break;
} }
#endif #endif
@ -217,20 +217,20 @@ void Compositor::slotCompositingOptionsInitialized()
} }
#ifdef KWIN_HAVE_XRENDER_COMPOSITING #ifdef KWIN_HAVE_XRENDER_COMPOSITING
case XRenderCompositing: case XRenderCompositing:
kDebug(1212) << "Initializing XRender compositing"; qDebug() << "Initializing XRender compositing";
m_scene = new SceneXrender(Workspace::self()); m_scene = new SceneXrender(Workspace::self());
break; break;
#endif #endif
default: default:
kDebug(1212) << "No compositing enabled"; qDebug() << "No compositing enabled";
m_starting = false; m_starting = false;
cm_selection->owning = false; cm_selection->owning = false;
cm_selection->release(); cm_selection->release();
return; return;
} }
if (m_scene == NULL || m_scene->initFailed()) { if (m_scene == NULL || m_scene->initFailed()) {
kError(1212) << "Failed to initialize compositing, compositing disabled"; qCritical() << "Failed to initialize compositing, compositing disabled";
kError(1212) << "Consult http://techbase.kde.org/Projects/KWin/4.0-release-notes#Setting_up"; qCritical() << "Consult http://techbase.kde.org/Projects/KWin/4.0-release-notes#Setting_up";
delete m_scene; delete m_scene;
m_scene = NULL; m_scene = NULL;
m_starting = false; m_starting = false;
@ -342,7 +342,7 @@ void Compositor::releaseCompositorSelection()
m_releaseSelectionTimer.start(); m_releaseSelectionTimer.start();
return; return;
} }
kDebug(1212) << "Releasing compositor selection"; qDebug() << "Releasing compositor selection";
cm_selection->owning = false; cm_selection->owning = false;
cm_selection->release(); cm_selection->release();
} }
@ -1062,10 +1062,10 @@ bool Toplevel::updateUnredirectedState()
lastUnredirect.start(); lastUnredirect.start();
unredirect = should; unredirect = should;
if (unredirect) { if (unredirect) {
kDebug(1212) << "Unredirecting:" << this; qDebug() << "Unredirecting:" << this;
xcb_composite_unredirect_window(connection(), frameId(), XCB_COMPOSITE_REDIRECT_MANUAL); xcb_composite_unredirect_window(connection(), frameId(), XCB_COMPOSITE_REDIRECT_MANUAL);
} else { } else {
kDebug(1212) << "Redirecting:" << this; qDebug() << "Redirecting:" << this;
xcb_composite_redirect_window(connection(), frameId(), XCB_COMPOSITE_REDIRECT_MANUAL); xcb_composite_redirect_window(connection(), frameId(), XCB_COMPOSITE_REDIRECT_MANUAL);
discardWindowPixmap(); discardWindowPixmap();
} }

View file

@ -24,12 +24,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "kwinglplatform.h" #include "kwinglplatform.h"
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <kdebug.h>
#include <KDE/KGlobal> #include <KDE/KGlobal>
#include <KDE/KLocalizedString> #include <KDE/KLocalizedString>
#include <kdeversion.h> #include <kdeversion.h>
#include <ksharedconfig.h> #include <ksharedconfig.h>
#include <QDebug>
#include <QStandardPaths> #include <QStandardPaths>
#include <qprocess.h> #include <qprocess.h>
@ -65,11 +65,11 @@ bool CompositingPrefs::compositingPossible()
return false; return false;
if (!Xcb::Extensions::self()->isCompositeAvailable()) { if (!Xcb::Extensions::self()->isCompositeAvailable()) {
kDebug(1212) << "No composite extension available"; qDebug() << "No composite extension available";
return false; return false;
} }
if (!Xcb::Extensions::self()->isDamageAvailable()) { if (!Xcb::Extensions::self()->isDamageAvailable()) {
kDebug(1212) << "No damage extension available"; qDebug() << "No damage extension available";
return false; return false;
} }
if (hasGlx()) if (hasGlx())
@ -81,7 +81,7 @@ bool CompositingPrefs::compositingPossible()
#ifdef KWIN_HAVE_OPENGLES #ifdef KWIN_HAVE_OPENGLES
return true; return true;
#endif #endif
kDebug(1212) << "No OpenGL or XRender/XFixes support"; qDebug() << "No OpenGL or XRender/XFixes support";
return false; return false;
} }

View file

@ -22,13 +22,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kconfig.h> #include <kconfig.h>
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <kdebug.h>
#include <kcomponentdata.h> #include <kcomponentdata.h>
#include <kaboutdata.h> #include <kaboutdata.h>
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
#include <kglobal.h> #include <kglobal.h>
#include <QtDBus/QtDBus> #include <QtDBus/QtDBus>
#include <QtCore/QStandardPaths> #include <QtCore/QStandardPaths>
#include <QDebug>
int main( int argc, char* argv[] ) int main( int argc, char* argv[] )
{ {
@ -41,7 +41,7 @@ int main( int argc, char* argv[] )
QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString( "kwin/default_rules/%1" ).arg(argv[ 1 ] )); QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString( "kwin/default_rules/%1" ).arg(argv[ 1 ] ));
if( file.isEmpty()) if( file.isEmpty())
{ {
kWarning(1212) << "File " << argv[ 1 ] << " not found!" ; qWarning() << "File " << argv[ 1 ] << " not found!" ;
return 1; return 1;
} }
KConfig src_cfg( file ); KConfig src_cfg( file );

View file

@ -26,6 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "paintredirector.h" #include "paintredirector.h"
#include "shadow.h" #include "shadow.h"
#include <QDebug>
namespace KWin namespace KWin
{ {
@ -48,7 +50,7 @@ Deleted::Deleted()
Deleted::~Deleted() Deleted::~Deleted()
{ {
if (delete_refcount != 0) if (delete_refcount != 0)
kError(1212) << "Deleted client has non-zero reference count (" << delete_refcount << ")"; qCritical() << "Deleted client has non-zero reference count (" << delete_refcount << ")";
assert(delete_refcount == 0); assert(delete_refcount == 0);
workspace()->removeDeleted(this); workspace()->removeDeleted(this);
deleteEffectWindow(); deleteEffectWindow();

View file

@ -48,6 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "workspace.h" #include "workspace.h"
#include "kwinglutils.h" #include "kwinglutils.h"
#include <QDebug>
#include <QFile> #include <QFile>
#include <QFutureWatcher> #include <QFutureWatcher>
#include <QtConcurrentRun> #include <QtConcurrentRun>
@ -55,7 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QDBusPendingCallWatcher> #include <QDBusPendingCallWatcher>
#include <QStandardPaths> #include <QStandardPaths>
#include <KDE/KDebug>
#include <KDE/KLibrary> #include <KDE/KLibrary>
#include <KDE/KDesktopFile> #include <KDE/KDesktopFile>
#include <KDE/KConfigGroup> #include <KDE/KConfigGroup>
@ -1295,7 +1295,7 @@ KLibrary* EffectsHandlerImpl::findEffectLibrary(KService* service)
libname.replace(QStringLiteral("kwin"), QStringLiteral(KWIN_NAME)); libname.replace(QStringLiteral("kwin"), QStringLiteral(KWIN_NAME));
KLibrary* library = new KLibrary(libname); KLibrary* library = new KLibrary(libname);
if (!library) { if (!library) {
kError(1212) << "couldn't open library for effect '" << qCritical() << "couldn't open library for effect '" <<
service->name() << "'" << endl; service->name() << "'" << endl;
return 0; return 0;
} }
@ -1337,24 +1337,24 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
m_compositor->addRepaintFull(); m_compositor->addRepaintFull();
if (!name.startsWith(QLatin1String("kwin4_effect_"))) if (!name.startsWith(QLatin1String("kwin4_effect_")))
kWarning(1212) << "Effect names usually have kwin4_effect_ prefix" ; qWarning() << "Effect names usually have kwin4_effect_ prefix" ;
// Make sure a single effect won't be loaded multiple times // Make sure a single effect won't be loaded multiple times
for (QVector< EffectPair >::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) { for (QVector< EffectPair >::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if ((*it).first == name) { if ((*it).first == name) {
kDebug(1212) << "EffectsHandler::loadEffect : Effect already loaded : " << name; qDebug() << "EffectsHandler::loadEffect : Effect already loaded : " << name;
return true; return true;
} }
} }
kDebug(1212) << "Trying to load " << name; qDebug() << "Trying to load " << name;
QString internalname = name.toLower(); QString internalname = name.toLower();
QString constraint = QStringLiteral("[X-KDE-PluginInfo-Name] == '%1'").arg(internalname); QString constraint = QStringLiteral("[X-KDE-PluginInfo-Name] == '%1'").arg(internalname);
KService::List offers = KServiceTypeTrader::self()->query(QStringLiteral("KWin/Effect"), constraint); KService::List offers = KServiceTypeTrader::self()->query(QStringLiteral("KWin/Effect"), constraint);
if (offers.isEmpty()) { if (offers.isEmpty()) {
kError(1212) << "Couldn't find effect " << name << endl; qCritical() << "Couldn't find effect " << name << endl;
return false; return false;
} }
KService::Ptr service = offers.first(); KService::Ptr service = offers.first();
@ -1372,7 +1372,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
QString version_symbol = QStringLiteral("effect_version_") + name; QString version_symbol = QStringLiteral("effect_version_") + name;
KLibrary::void_function_ptr version_func = library->resolveFunction(version_symbol.toAscii().constData()); KLibrary::void_function_ptr version_func = library->resolveFunction(version_symbol.toAscii().constData());
if (version_func == NULL) { if (version_func == NULL) {
kWarning(1212) << "Effect " << name << " does not provide required API version, ignoring."; qWarning() << "Effect " << name << " does not provide required API version, ignoring.";
delete library; delete library;
return false; return false;
} }
@ -1383,7 +1383,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
if (version > KWIN_EFFECT_API_VERSION if (version > KWIN_EFFECT_API_VERSION
|| (version >> 8) != KWIN_EFFECT_API_VERSION_MAJOR || (version >> 8) != KWIN_EFFECT_API_VERSION_MAJOR
|| (KWIN_EFFECT_API_VERSION_MAJOR == 0 && version != KWIN_EFFECT_API_VERSION)) { || (KWIN_EFFECT_API_VERSION_MAJOR == 0 && version != KWIN_EFFECT_API_VERSION)) {
kWarning(1212) << "Effect " << name << " requires unsupported API version " << version; qWarning() << "Effect " << name << " requires unsupported API version " << version;
delete library; delete library;
return false; return false;
} }
@ -1401,7 +1401,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
typedef bool (*t_supportedfunc)(); typedef bool (*t_supportedfunc)();
t_supportedfunc supported = reinterpret_cast<t_supportedfunc>(supported_func); t_supportedfunc supported = reinterpret_cast<t_supportedfunc>(supported_func);
if (!supported()) { if (!supported()) {
kWarning(1212) << "EffectsHandler::loadEffect : Effect " << name << " is not supported" ; qWarning() << "EffectsHandler::loadEffect : Effect " << name << " is not supported" ;
library->unload(); library->unload();
return false; return false;
} }
@ -1418,7 +1418,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
} }
if (!create_func) { if (!create_func) {
kError(1212) << "EffectsHandler::loadEffect : effect_create function not found" << endl; qCritical() << "EffectsHandler::loadEffect : effect_create function not found" << endl;
library->unload(); library->unload();
return false; return false;
} }
@ -1432,7 +1432,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
QStringList dependencies = plugininfo.dependencies(); QStringList dependencies = plugininfo.dependencies();
foreach (const QString & depName, dependencies) { foreach (const QString & depName, dependencies) {
if (!loadEffect(depName)) { if (!loadEffect(depName)) {
kError(1212) << "EffectsHandler::loadEffect : Couldn't load dependencies for effect " << name << endl; qCritical() << "EffectsHandler::loadEffect : Couldn't load dependencies for effect " << name << endl;
library->unload(); library->unload();
return false; return false;
} }
@ -1453,17 +1453,17 @@ bool EffectsHandlerImpl::loadScriptedEffect(const QString& name, KService *servi
const KDesktopFile df(QStandardPaths::GenericDataLocation, QStringLiteral("kde5/services/") + service->entryPath()); const KDesktopFile df(QStandardPaths::GenericDataLocation, QStringLiteral("kde5/services/") + service->entryPath());
const QString scriptName = df.desktopGroup().readEntry<QString>(QStringLiteral("X-Plasma-MainScript"), QString()); const QString scriptName = df.desktopGroup().readEntry<QString>(QStringLiteral("X-Plasma-MainScript"), QString());
if (scriptName.isEmpty()) { if (scriptName.isEmpty()) {
kDebug(1212) << "X-Plasma-MainScript not set"; qDebug() << "X-Plasma-MainScript not set";
return false; return false;
} }
const QString scriptFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(KWIN_NAME) + QStringLiteral("/effects/") + name + QStringLiteral("/contents/") + scriptName); const QString scriptFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(KWIN_NAME) + QStringLiteral("/effects/") + name + QStringLiteral("/contents/") + scriptName);
if (scriptFile.isNull()) { if (scriptFile.isNull()) {
kDebug(1212) << "Could not locate the effect script"; qDebug() << "Could not locate the effect script";
return false; return false;
} }
ScriptedEffect *effect = ScriptedEffect::create(name, scriptFile); ScriptedEffect *effect = ScriptedEffect::create(name, scriptFile);
if (!effect) { if (!effect) {
kDebug(1212) << "Could not initialize scripted effect: " << name; qDebug() << "Could not initialize scripted effect: " << name;
return false; return false;
} }
effect_order.insert(service->property(QStringLiteral("X-KDE-Ordering")).toInt(), EffectPair(name, effect)); effect_order.insert(service->property(QStringLiteral("X-KDE-Ordering")).toInt(), EffectPair(name, effect));
@ -1482,7 +1482,7 @@ void EffectsHandlerImpl::unloadEffect(const QString& name)
for (QMap< int, EffectPair >::iterator it = effect_order.begin(); it != effect_order.end(); ++it) { for (QMap< int, EffectPair >::iterator it = effect_order.begin(); it != effect_order.end(); ++it) {
if (it.value().first == name) { if (it.value().first == name) {
kDebug(1212) << "EffectsHandler::unloadEffect : Unloading Effect : " << name; qDebug() << "EffectsHandler::unloadEffect : Unloading Effect : " << name;
if (activeFullScreenEffect() == it.value().second) { if (activeFullScreenEffect() == it.value().second) {
setActiveFullScreenEffect(0); setActiveFullScreenEffect(0);
} }
@ -1502,7 +1502,7 @@ void EffectsHandlerImpl::unloadEffect(const QString& name)
} }
} }
kDebug(1212) << "EffectsHandler::unloadEffect : Effect not loaded : " << name; qDebug() << "EffectsHandler::unloadEffect : Effect not loaded : " << name;
} }
void EffectsHandlerImpl::reconfigureEffect(const QString& name) void EffectsHandlerImpl::reconfigureEffect(const QString& name)
@ -1542,9 +1542,9 @@ void EffectsHandlerImpl::effectsChanged()
{ {
loaded_effects.clear(); loaded_effects.clear();
m_activeEffects.clear(); // it's possible to have a reconfigure and a quad rebuild between two paint cycles - bug #308201 m_activeEffects.clear(); // it's possible to have a reconfigure and a quad rebuild between two paint cycles - bug #308201
// kDebug(1212) << "Recreating effects' list:"; // qDebug() << "Recreating effects' list:";
foreach (const EffectPair & effect, effect_order) { foreach (const EffectPair & effect, effect_order) {
// kDebug(1212) << effect.first; // qDebug() << effect.first;
loaded_effects.append(effect); loaded_effects.append(effect);
} }
m_activeEffects.reserve(loaded_effects.count()); m_activeEffects.reserve(loaded_effects.count());

View file

@ -25,7 +25,6 @@
#include <QMatrix4x4> #include <QMatrix4x4>
#include <QLinkedList> #include <QLinkedList>
#include <KDebug>
namespace KWin namespace KWin
{ {

View file

@ -21,8 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "kscreen.h" #include "kscreen.h"
// KConfigSkeleton // KConfigSkeleton
#include "kscreenconfig.h" #include "kscreenconfig.h"
// KDE // Qt
#include <KDE/KDebug> #include <QDebug>
/** /**
* How this effect works: * How this effect works:

View file

@ -21,8 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "screenshot.h" #include "screenshot.h"
#include <kwinglutils.h> #include <kwinglutils.h>
#include <kwinxrenderutils.h> #include <kwinxrenderutils.h>
#include <KDE/KDebug>
#include <KDE/KTemporaryFile> #include <KDE/KTemporaryFile>
#include <QDebug>
#include <QtDBus/QDBusConnection> #include <QtDBus/QDBusConnection>
#include <QVarLengthArray> #include <QVarLengthArray>
#include <QtGui/QPainter> #include <QtGui/QPainter>

View file

@ -19,12 +19,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/ *********************************************************************/
#include "startupfeedback.h" #include "startupfeedback.h"
// Qt // Qt
#include <QDebug>
#include <QSize> #include <QSize>
#include <QtCore/QStandardPaths> #include <QtCore/QStandardPaths>
#include <QtGui/QPainter> #include <QtGui/QPainter>
// KDE // KDE
#include <KDE/KConfigGroup> #include <KDE/KConfigGroup>
#include <KDE/KDebug>
#include <KDE/KGlobal> #include <KDE/KGlobal>
#include <KDE/KIconLoader> #include <KDE/KIconLoader>
#include <KDE/KStartupInfo> #include <KDE/KStartupInfo>

View file

@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QAction> #include <QAction>
#include <QApplication> #include <QApplication>
#include <QDebug>
#include <QStyle> #include <QStyle>
#include <QtGui/QVector2D> #include <QtGui/QVector2D>
#include <QtDBus/QDBusConnection> #include <QtDBus/QDBusConnection>
@ -33,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KDE/KConfigGroup> #include <KDE/KConfigGroup>
#include <KDE/KGlobalAccel> #include <KDE/KGlobalAccel>
#include <KDE/KLocalizedString> #include <KDE/KLocalizedString>
#include <KDE/KDebug>
#include <kwinglutils.h> #include <kwinglutils.h>
#ifdef KWIN_HAVE_XRENDER_COMPOSITING #ifdef KWIN_HAVE_XRENDER_COMPOSITING

View file

@ -64,7 +64,7 @@ static void registryHandleGlobal(void *data, struct wl_registry *registry,
} else if (strcmp(interface, "wl_shm") == 0) { } else if (strcmp(interface, "wl_shm") == 0) {
d->createShm(name); d->createShm(name);
} }
kDebug(1212) << "Wayland Interface: " << interface; qDebug() << "Wayland Interface: " << interface;
} }
/** /**
@ -320,7 +320,7 @@ bool CursorData::init(ShmPool *pool)
m_cursor = pool->createBuffer(cursorImage); m_cursor = pool->createBuffer(cursorImage);
if (!m_cursor) { if (!m_cursor) {
kDebug(1212) << "Creating cursor buffer failed"; qDebug() << "Creating cursor buffer failed";
return false; return false;
} }
@ -420,18 +420,18 @@ ShmPool::~ShmPool()
bool ShmPool::createPool() bool ShmPool::createPool()
{ {
if (!m_tmpFile->open()) { if (!m_tmpFile->open()) {
kDebug(1212) << "Could not open temporary file for Shm pool"; qDebug() << "Could not open temporary file for Shm pool";
return false; return false;
} }
if (ftruncate(m_tmpFile->handle(), m_size) < 0) { if (ftruncate(m_tmpFile->handle(), m_size) < 0) {
kDebug(1212) << "Could not set size for Shm pool file"; qDebug() << "Could not set size for Shm pool file";
return false; return false;
} }
m_poolData = mmap(NULL, m_size, PROT_READ | PROT_WRITE, MAP_SHARED, m_tmpFile->handle(), 0); m_poolData = mmap(NULL, m_size, PROT_READ | PROT_WRITE, MAP_SHARED, m_tmpFile->handle(), 0);
m_pool = wl_shm_create_pool(m_shm, m_tmpFile->handle(), m_size); m_pool = wl_shm_create_pool(m_shm, m_tmpFile->handle(), m_size);
if (!m_poolData || !m_pool) { if (!m_poolData || !m_pool) {
kDebug(1212) << "Creating Shm pool failed"; qDebug() << "Creating Shm pool failed";
return false; return false;
} }
m_tmpFile->close(); m_tmpFile->close();
@ -535,7 +535,7 @@ WaylandBackend::WaylandBackend()
, m_seat() , m_seat()
, m_shm() , m_shm()
{ {
kDebug(1212) << "Created Wayland display"; qDebug() << "Created Wayland display";
// setup the registry // setup the registry
wl_registry_add_listener(m_registry, &s_registryListener, this); wl_registry_add_listener(m_registry, &s_registryListener, this);
wl_display_dispatch(m_display); wl_display_dispatch(m_display);
@ -568,7 +568,7 @@ WaylandBackend::~WaylandBackend()
wl_display_flush(m_display); wl_display_flush(m_display);
wl_display_disconnect(m_display); wl_display_disconnect(m_display);
} }
kDebug(1212) << "Destroyed Wayland display"; qDebug() << "Destroyed Wayland display";
} }
void WaylandBackend::readEvents() void WaylandBackend::readEvents()
@ -588,7 +588,7 @@ bool WaylandBackend::createSurface()
{ {
m_surface = wl_compositor_create_surface(m_compositor); m_surface = wl_compositor_create_surface(m_compositor);
if (!m_surface) { if (!m_surface) {
kError(1212) << "Creating Wayland Surface failed"; qCritical() << "Creating Wayland Surface failed";
return false; return false;
} }
// map the surface as fullscreen // map the surface as fullscreen
@ -598,7 +598,7 @@ bool WaylandBackend::createSurface()
// TODO: do something better than displayWidth/displayHeight // TODO: do something better than displayWidth/displayHeight
m_overlay = wl_egl_window_create(m_surface, displayWidth(), displayHeight()); m_overlay = wl_egl_window_create(m_surface, displayWidth(), displayHeight());
if (!m_overlay) { if (!m_overlay) {
kError(1212) << "Creating Wayland Egl window failed"; qCritical() << "Creating Wayland Egl window failed";
return false; return false;
} }
wl_shell_surface_set_fullscreen(m_shellSurface, WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, NULL); wl_shell_surface_set_fullscreen(m_shellSurface, WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, NULL);
@ -629,7 +629,7 @@ EglWaylandBackend::EglWaylandBackend()
, m_context(EGL_NO_CONTEXT) , m_context(EGL_NO_CONTEXT)
, m_wayland(new Wayland::WaylandBackend) , m_wayland(new Wayland::WaylandBackend)
{ {
kDebug(1212) << "Connected to Wayland display?" << (m_wayland->display() ? "yes" : "no" ); qDebug() << "Connected to Wayland display?" << (m_wayland->display() ? "yes" : "no" );
if (!m_wayland->display()) { if (!m_wayland->display()) {
setFailed("Could not connect to Wayland compositor"); setFailed("Could not connect to Wayland compositor");
return; return;
@ -639,9 +639,9 @@ EglWaylandBackend::EglWaylandBackend()
// Egl is always direct rendering // Egl is always direct rendering
setIsDirectRendering(true); setIsDirectRendering(true);
kWarning(1212) << "Using Wayland rendering backend"; qWarning() << "Using Wayland rendering backend";
kWarning(1212) << "This is a highly experimental backend, do not use for productive usage!"; qWarning() << "This is a highly experimental backend, do not use for productive usage!";
kWarning(1212) << "Please do not report any issues you might encounter when using this backend!"; qWarning() << "Please do not report any issues you might encounter when using this backend!";
} }
EglWaylandBackend::~EglWaylandBackend() EglWaylandBackend::~EglWaylandBackend()
@ -665,20 +665,20 @@ bool EglWaylandBackend::initializeEgl()
return false; return false;
EGLint error = eglGetError(); EGLint error = eglGetError();
if (error != EGL_SUCCESS) { if (error != EGL_SUCCESS) {
kWarning(1212) << "Error during eglInitialize " << error; qWarning() << "Error during eglInitialize " << error;
return false; return false;
} }
kDebug(1212) << "Egl Initialize succeeded"; qDebug() << "Egl Initialize succeeded";
#ifdef KWIN_HAVE_OPENGLES #ifdef KWIN_HAVE_OPENGLES
eglBindAPI(EGL_OPENGL_ES_API); eglBindAPI(EGL_OPENGL_ES_API);
#else #else
if (eglBindAPI(EGL_OPENGL_API) == EGL_FALSE) { if (eglBindAPI(EGL_OPENGL_API) == EGL_FALSE) {
kError(1212) << "bind OpenGL API failed"; qCritical() << "bind OpenGL API failed";
return false; return false;
} }
#endif #endif
kDebug(1212) << "EGL version: " << major << "." << minor; qDebug() << "EGL version: " << major << "." << minor;
return true; return true;
} }
@ -731,7 +731,7 @@ bool EglWaylandBackend::initRenderingContext()
#endif #endif
if (m_context == EGL_NO_CONTEXT) { if (m_context == EGL_NO_CONTEXT) {
kError(1212) << "Create Context failed"; qCritical() << "Create Context failed";
return false; return false;
} }
@ -741,7 +741,7 @@ bool EglWaylandBackend::initRenderingContext()
m_surface = eglCreateWindowSurface(m_display, m_config, m_wayland->overlay(), NULL); m_surface = eglCreateWindowSurface(m_display, m_config, m_wayland->overlay(), NULL);
if (m_surface == EGL_NO_SURFACE) { if (m_surface == EGL_NO_SURFACE) {
kError(1212) << "Create Window Surface failed"; qCritical() << "Create Window Surface failed";
return false; return false;
} }
@ -751,13 +751,13 @@ bool EglWaylandBackend::initRenderingContext()
bool EglWaylandBackend::makeContextCurrent() bool EglWaylandBackend::makeContextCurrent()
{ {
if (eglMakeCurrent(m_display, m_surface, m_surface, m_context) == EGL_FALSE) { if (eglMakeCurrent(m_display, m_surface, m_surface, m_context) == EGL_FALSE) {
kError(1212) << "Make Context Current failed"; qCritical() << "Make Context Current failed";
return false; return false;
} }
EGLint error = eglGetError(); EGLint error = eglGetError();
if (error != EGL_SUCCESS) { if (error != EGL_SUCCESS) {
kWarning(1212) << "Error occurred while creating context " << error; qWarning() << "Error occurred while creating context " << error;
return false; return false;
} }
return true; return true;
@ -783,11 +783,11 @@ bool EglWaylandBackend::initBufferConfigs()
EGLint count; EGLint count;
EGLConfig configs[1024]; EGLConfig configs[1024];
if (eglChooseConfig(m_display, config_attribs, configs, 1, &count) == EGL_FALSE) { if (eglChooseConfig(m_display, config_attribs, configs, 1, &count) == EGL_FALSE) {
kError(1212) << "choose config failed"; qCritical() << "choose config failed";
return false; return false;
} }
if (count != 1) { if (count != 1) {
kError(1212) << "choose config did not return a config" << count; qCritical() << "choose config did not return a config" << count;
return false; return false;
} }
m_config = configs[0]; m_config = configs[0];
@ -965,24 +965,24 @@ bool Shm::init()
{ {
const xcb_query_extension_reply_t *ext = xcb_get_extension_data(connection(), &xcb_shm_id); const xcb_query_extension_reply_t *ext = xcb_get_extension_data(connection(), &xcb_shm_id);
if (!ext || !ext->present) { if (!ext || !ext->present) {
kDebug(1212) << "SHM extension not available"; qDebug() << "SHM extension not available";
return false; return false;
} }
ScopedCPointer<xcb_shm_query_version_reply_t> version(xcb_shm_query_version_reply(connection(), ScopedCPointer<xcb_shm_query_version_reply_t> version(xcb_shm_query_version_reply(connection(),
xcb_shm_query_version_unchecked(connection()), NULL)); xcb_shm_query_version_unchecked(connection()), NULL));
if (version.isNull()) { if (version.isNull()) {
kDebug(1212) << "Failed to get SHM extension version information"; qDebug() << "Failed to get SHM extension version information";
return false; return false;
} }
const int MAXSIZE = 4096 * 2048 * 4; // TODO check there are not larger windows const int MAXSIZE = 4096 * 2048 * 4; // TODO check there are not larger windows
m_shmId = shmget(IPC_PRIVATE, MAXSIZE, IPC_CREAT | 0600); m_shmId = shmget(IPC_PRIVATE, MAXSIZE, IPC_CREAT | 0600);
if (m_shmId < 0) { if (m_shmId < 0) {
kDebug(1212) << "Failed to allocate SHM segment"; qDebug() << "Failed to allocate SHM segment";
return false; return false;
} }
m_buffer = shmat(m_shmId, NULL, 0 /*read/write*/); m_buffer = shmat(m_shmId, NULL, 0 /*read/write*/);
if (-1 == reinterpret_cast<long>(m_buffer)) { if (-1 == reinterpret_cast<long>(m_buffer)) {
kDebug(1212) << "Failed to attach SHM segment"; qDebug() << "Failed to attach SHM segment";
shmctl(m_shmId, IPC_RMID, NULL); shmctl(m_shmId, IPC_RMID, NULL);
return false; return false;
} }
@ -992,7 +992,7 @@ bool Shm::init()
const xcb_void_cookie_t cookie = xcb_shm_attach_checked(connection(), m_segment, m_shmId, false); const xcb_void_cookie_t cookie = xcb_shm_attach_checked(connection(), m_segment, m_shmId, false);
ScopedCPointer<xcb_generic_error_t> error(xcb_request_check(connection(), cookie)); ScopedCPointer<xcb_generic_error_t> error(xcb_request_check(connection(), cookie));
if (!error.isNull()) { if (!error.isNull()) {
kDebug(1212) << "xcb_shm_attach error: " << error->error_code; qDebug() << "xcb_shm_attach error: " << error->error_code;
shmdt(m_buffer); shmdt(m_buffer);
return false; return false;
} }

View file

@ -24,8 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "xcbutils.h" #include "xcbutils.h"
// kwin libs // kwin libs
#include <kwinglplatform.h> #include <kwinglplatform.h>
// KDE // Qt
#include <KDE/KDebug> #include <QDebug>
namespace KWin namespace KWin
{ {
@ -101,7 +101,7 @@ void EglOnXBackend::init()
gs_tripleBufferNeedsDetection = false; gs_tripleBufferNeedsDetection = false;
m_swapProfiler.init(); m_swapProfiler.init();
if (surfaceHasSubPost) { if (surfaceHasSubPost) {
kDebug(1212) << "EGL implementation and surface support eglPostSubBufferNV, let's use it"; qDebug() << "EGL implementation and surface support eglPostSubBufferNV, let's use it";
if (options->glPreferBufferSwap() != Options::NoSwapEncourage) { if (options->glPreferBufferSwap() != Options::NoSwapEncourage) {
// check if swap interval 1 is supported // check if swap interval 1 is supported
@ -109,7 +109,7 @@ void EglOnXBackend::init()
eglGetConfigAttrib(dpy, config, EGL_MAX_SWAP_INTERVAL, &val); eglGetConfigAttrib(dpy, config, EGL_MAX_SWAP_INTERVAL, &val);
if (val >= 1) { if (val >= 1) {
if (eglSwapInterval(dpy, 1)) { if (eglSwapInterval(dpy, 1)) {
kDebug(1212) << "Enabled v-sync"; qDebug() << "Enabled v-sync";
setSyncsToVBlank(true); setSyncsToVBlank(true);
const QByteArray tripleBuffer = qgetenv("KWIN_TRIPLE_BUFFER"); const QByteArray tripleBuffer = qgetenv("KWIN_TRIPLE_BUFFER");
if (!tripleBuffer.isEmpty()) { if (!tripleBuffer.isEmpty()) {
@ -119,7 +119,7 @@ void EglOnXBackend::init()
gs_tripleBufferNeedsDetection = gs_tripleBufferUndetected; gs_tripleBufferNeedsDetection = gs_tripleBufferUndetected;
} }
} else { } else {
kWarning(1212) << "Cannot enable v-sync as max. swap interval is" << val; qWarning() << "Cannot enable v-sync as max. swap interval is" << val;
} }
} else { } else {
// disable v-sync // disable v-sync
@ -131,7 +131,7 @@ void EglOnXBackend::init()
* Hence we need EGL to preserve the backbuffer for us, so that we can draw the partial updates on it and call * Hence we need EGL to preserve the backbuffer for us, so that we can draw the partial updates on it and call
* eglSwapBuffers() for each frame. eglSwapBuffers() then does the copy (no page flip possible in this mode), * eglSwapBuffers() for each frame. eglSwapBuffers() then does the copy (no page flip possible in this mode),
* which means it is slow and not synced to the v-blank. */ * which means it is slow and not synced to the v-blank. */
kWarning(1212) << "eglPostSubBufferNV not supported, have to enable buffer preservation - which breaks v-sync and performance"; qWarning() << "eglPostSubBufferNV not supported, have to enable buffer preservation - which breaks v-sync and performance";
eglSurfaceAttrib(dpy, surface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED); eglSurfaceAttrib(dpy, surface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
} }
} }
@ -150,7 +150,7 @@ bool EglOnXBackend::initRenderingContext()
eglBindAPI(EGL_OPENGL_ES_API); eglBindAPI(EGL_OPENGL_ES_API);
#else #else
if (eglBindAPI(EGL_OPENGL_API) == EGL_FALSE) { if (eglBindAPI(EGL_OPENGL_API) == EGL_FALSE) {
kError(1212) << "bind OpenGL API failed"; qCritical() << "bind OpenGL API failed";
return false; return false;
} }
#endif #endif
@ -158,7 +158,7 @@ bool EglOnXBackend::initRenderingContext()
initBufferConfigs(); initBufferConfigs();
if (!overlayWindow()->create()) { if (!overlayWindow()->create()) {
kError(1212) << "Could not get overlay window"; qCritical() << "Could not get overlay window";
return false; return false;
} else { } else {
overlayWindow()->setup(None); overlayWindow()->setup(None);
@ -197,20 +197,20 @@ bool EglOnXBackend::initRenderingContext()
#endif #endif
if (ctx == EGL_NO_CONTEXT) { if (ctx == EGL_NO_CONTEXT) {
kError(1212) << "Create Context failed"; qCritical() << "Create Context failed";
return false; return false;
} }
if (eglMakeCurrent(dpy, surface, surface, ctx) == EGL_FALSE) { if (eglMakeCurrent(dpy, surface, surface, ctx) == EGL_FALSE) {
kError(1212) << "Make Context Current failed"; qCritical() << "Make Context Current failed";
return false; return false;
} }
kDebug(1212) << "EGL version: " << major << "." << minor; qDebug() << "EGL version: " << major << "." << minor;
EGLint error = eglGetError(); EGLint error = eglGetError();
if (error != EGL_SUCCESS) { if (error != EGL_SUCCESS) {
kWarning(1212) << "Error occurred while creating context " << error; qWarning() << "Error occurred while creating context " << error;
return false; return false;
} }
@ -237,13 +237,13 @@ bool EglOnXBackend::initBufferConfigs()
EGLint count; EGLint count;
EGLConfig configs[1024]; EGLConfig configs[1024];
if (eglChooseConfig(dpy, config_attribs, configs, 1024, &count) == EGL_FALSE) { if (eglChooseConfig(dpy, config_attribs, configs, 1024, &count) == EGL_FALSE) {
kError(1212) << "choose config failed"; qCritical() << "choose config failed";
return false; return false;
} }
Xcb::WindowAttributes attribs(rootWindow()); Xcb::WindowAttributes attribs(rootWindow());
if (!attribs) { if (!attribs) {
kError(1212) << "Failed to get window attributes of root window"; qCritical() << "Failed to get window attributes of root window";
return false; return false;
} }
@ -251,7 +251,7 @@ bool EglOnXBackend::initBufferConfigs()
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
EGLint val; EGLint val;
if (eglGetConfigAttrib(dpy, configs[i], EGL_NATIVE_VISUAL_ID, &val) == EGL_FALSE) { if (eglGetConfigAttrib(dpy, configs[i], EGL_NATIVE_VISUAL_ID, &val) == EGL_FALSE) {
kError(1212) << "egl get config attrib failed"; qCritical() << "egl get config attrib failed";
} }
if (uint32_t(val) == attribs->visual) { if (uint32_t(val) == attribs->visual) {
config = configs[i]; config = configs[i];
@ -285,7 +285,7 @@ void EglOnXBackend::present()
if (qstrcmp(qgetenv("__GL_YIELD"), "USLEEP")) { if (qstrcmp(qgetenv("__GL_YIELD"), "USLEEP")) {
options->setGlPreferBufferSwap(0); options->setGlPreferBufferSwap(0);
eglSwapInterval(dpy, 0); eglSwapInterval(dpy, 0);
kWarning(1212) << "\nIt seems you are using the nvidia driver without triple buffering\n" qWarning() << "\nIt seems you are using the nvidia driver without triple buffering\n"
"You must export __GL_YIELD=\"USLEEP\" to prevent large CPU overhead on synced swaps\n" "You must export __GL_YIELD=\"USLEEP\" to prevent large CPU overhead on synced swaps\n"
"Preferably, enable the TripleBuffer Option in the xorg.conf Device\n" "Preferably, enable the TripleBuffer Option in the xorg.conf Device\n"
"For this reason, the tearing prevention has been disabled.\n" "For this reason, the tearing prevention has been disabled.\n"
@ -388,7 +388,7 @@ bool EglTexture::loadTexture(const Pixmap &pix, const QSize &size, int depth)
(EGLClientBuffer)pix, attribs); (EGLClientBuffer)pix, attribs);
if (EGL_NO_IMAGE_KHR == m_image) { if (EGL_NO_IMAGE_KHR == m_image) {
kDebug(1212) << "failed to create egl image"; qDebug() << "failed to create egl image";
q->unbind(); q->unbind();
q->discard(); q->discard();
return false; return false;

View file

@ -47,6 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "screens.h" #include "screens.h"
#include "xcbutils.h" #include "xcbutils.h"
#include <QDebug>
#include <QWhatsThis> #include <QWhatsThis>
#include <kkeyserver.h> #include <kkeyserver.h>
@ -1195,7 +1196,7 @@ bool Client::processDecorationButtonPress(int button, int /*state*/, int x, int
void Client::processMousePressEvent(QMouseEvent* e) void Client::processMousePressEvent(QMouseEvent* e)
{ {
if (e->type() != QEvent::MouseButtonPress) { if (e->type() != QEvent::MouseButtonPress) {
kWarning(1212) << "processMousePressEvent()" ; qWarning() << "processMousePressEvent()" ;
return; return;
} }
int button; int button;

View file

@ -45,6 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef KWIN_BUILD_SCREENEDGES #ifdef KWIN_BUILD_SCREENEDGES
#include "screenedge.h" #include "screenedge.h"
#endif #endif
#include <QDebug>
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QPainter> #include <QPainter>
#include <QVarLengthArray> #include <QVarLengthArray>
@ -126,7 +127,7 @@ void Workspace::updateClientArea(bool force)
const Screens *s = Screens::self(); const Screens *s = Screens::self();
int nscreens = s->count(); int nscreens = s->count();
const int numberOfDesktops = VirtualDesktopManager::self()->count(); const int numberOfDesktops = VirtualDesktopManager::self()->count();
kDebug(1212) << "screens: " << nscreens << "desktops: " << numberOfDesktops; qDebug() << "screens: " << nscreens << "desktops: " << numberOfDesktops;
QVector< QRect > new_wareas(numberOfDesktops + 1); QVector< QRect > new_wareas(numberOfDesktops + 1);
QVector< StrutRects > new_rmoveareas(numberOfDesktops + 1); QVector< StrutRects > new_rmoveareas(numberOfDesktops + 1);
QVector< QVector< QRect > > new_sareas(numberOfDesktops + 1); QVector< QVector< QRect > > new_sareas(numberOfDesktops + 1);
@ -199,7 +200,7 @@ void Workspace::updateClientArea(bool force)
for (int iS = 0; for (int iS = 0;
iS < nscreens; iS < nscreens;
iS ++) iS ++)
kDebug(1212) << "new_sarea: " << new_sareas[ i ][ iS ]; qDebug() << "new_sarea: " << new_sareas[ i ][ iS ];
} }
#endif #endif
@ -250,7 +251,7 @@ void Workspace::updateClientArea(bool force)
oldrestrictedmovearea.clear(); // reset, no longer valid or needed oldrestrictedmovearea.clear(); // reset, no longer valid or needed
} }
kDebug(1212) << "Done."; qDebug() << "Done.";
} }
void Workspace::updateClientArea() void Workspace::updateClientArea()
@ -1262,8 +1263,7 @@ QSize Client::sizeForClientSize(const QSize& wsize, Sizemode mode, bool noframe)
int w = wsize.width(); int w = wsize.width();
int h = wsize.height(); int h = wsize.height();
if (w < 1 || h < 1) { if (w < 1 || h < 1) {
kWarning(1212) << "sizeForClientSize() with empty size!" ; qWarning() << "sizeForClientSize() with empty size!" ;
kWarning(1212) << kBacktrace() ;
} }
if (w < 1) w = 1; if (w < 1) w = 1;
if (h < 1) h = 1; if (h < 1) h = 1;
@ -1604,7 +1604,7 @@ void Client::configureRequest(int value_mask, int rx, int ry, int rw, int rh, in
{ {
// "maximized" is a user setting -> we do not allow the client to resize itself // "maximized" is a user setting -> we do not allow the client to resize itself
// away from this & against the users explicit wish // away from this & against the users explicit wish
kDebug(1212) << this << bool(value_mask & (CWX|CWWidth|CWY|CWHeight)) << qDebug() << this << bool(value_mask & (CWX|CWWidth|CWY|CWHeight)) <<
bool(maximizeMode() & MaximizeVertical) << bool(maximizeMode() & MaximizeVertical) <<
bool(maximizeMode() & MaximizeHorizontal); bool(maximizeMode() & MaximizeHorizontal);
@ -1635,11 +1635,11 @@ void Client::configureRequest(int value_mask, int rx, int ry, int rw, int rh, in
} }
if (ignore) { if (ignore) {
kDebug(1212) << "DENIED"; qDebug() << "DENIED";
return; // nothing to (left) to do for use - bugs #158974, #252314, #321491 return; // nothing to (left) to do for use - bugs #158974, #252314, #321491
} }
kDebug(1212) << "PERMITTED" << this << bool(value_mask & (CWX|CWWidth|CWY|CWHeight)); qDebug() << "PERMITTED" << this << bool(value_mask & (CWX|CWWidth|CWY|CWHeight));
if (gravity == 0) // default (nonsense) value for the argument if (gravity == 0) // default (nonsense) value for the argument
gravity = xSizeHint.win_gravity; gravity = xSizeHint.win_gravity;
@ -1732,8 +1732,7 @@ void Client::resizeWithChecks(int w, int h, ForceGeometry_t force)
assert(!shade_geometry_change); assert(!shade_geometry_change);
if (isShade()) { if (isShade()) {
if (h == border_top + border_bottom) { if (h == border_top + border_bottom) {
kWarning(1212) << "Shaded geometry passed for size:" ; qWarning() << "Shaded geometry passed for size:" ;
kWarning(1212) << kBacktrace() ;
} }
} }
int newx = x(); int newx = x();
@ -1890,8 +1889,7 @@ void Client::setGeometry(int x, int y, int w, int h, ForceGeometry_t force)
; // nothing ; // nothing
else if (isShade()) { else if (isShade()) {
if (h == border_top + border_bottom) { if (h == border_top + border_bottom) {
kDebug(1212) << "Shaded geometry passed for size:"; qDebug() << "Shaded geometry passed for size:";
kDebug(1212) << kBacktrace();
} else { } else {
client_size = QSize(w - border_left - border_right, h - border_top - border_bottom); client_size = QSize(w - border_left - border_right, h - border_top - border_bottom);
h = border_top + border_bottom; h = border_top + border_bottom;
@ -1901,8 +1899,7 @@ void Client::setGeometry(int x, int y, int w, int h, ForceGeometry_t force)
} }
QRect g(x, y, w, h); QRect g(x, y, w, h);
if (block_geometry_updates == 0 && g != rules()->checkGeometry(g)) { if (block_geometry_updates == 0 && g != rules()->checkGeometry(g)) {
kDebug(1212) << "forced geometry fail:" << g << ":" << rules()->checkGeometry(g); qDebug() << "forced geometry fail:" << g << ":" << rules()->checkGeometry(g);
kDebug(1212) << kBacktrace();
} }
if (force == NormalGeometrySet && geom == g && pending_geometry_update == PendingGeometryNone) if (force == NormalGeometrySet && geom == g && pending_geometry_update == PendingGeometryNone)
return; return;
@ -1981,8 +1978,7 @@ void Client::plainResize(int w, int h, ForceGeometry_t force)
; // nothing ; // nothing
else if (isShade()) { else if (isShade()) {
if (h == border_top + border_bottom) { if (h == border_top + border_bottom) {
kDebug(1212) << "Shaded geometry passed for size:"; qDebug() << "Shaded geometry passed for size:";
kDebug(1212) << kBacktrace();
} else { } else {
client_size = QSize(w - border_left - border_right, h - border_top - border_bottom); client_size = QSize(w - border_left - border_right, h - border_top - border_bottom);
h = border_top + border_bottom; h = border_top + border_bottom;
@ -1992,8 +1988,7 @@ void Client::plainResize(int w, int h, ForceGeometry_t force)
} }
QSize s(w, h); QSize s(w, h);
if (block_geometry_updates == 0 && s != rules()->checkSize(s)) { if (block_geometry_updates == 0 && s != rules()->checkSize(s)) {
kDebug(1212) << "forced size fail:" << s << ":" << rules()->checkSize(s); qDebug() << "forced size fail:" << s << ":" << rules()->checkSize(s);
kDebug(1212) << kBacktrace();
} }
// resuming geometry updates is handled only in setGeometry() // resuming geometry updates is handled only in setGeometry()
assert(pending_geometry_update == PendingGeometryNone || block_geometry_updates > 0); assert(pending_geometry_update == PendingGeometryNone || block_geometry_updates > 0);
@ -2048,8 +2043,7 @@ void Client::move(int x, int y, ForceGeometry_t force)
assert(pending_geometry_update == PendingGeometryNone || block_geometry_updates > 0); assert(pending_geometry_update == PendingGeometryNone || block_geometry_updates > 0);
QPoint p(x, y); QPoint p(x, y);
if (block_geometry_updates == 0 && p != rules()->checkPosition(p)) { if (block_geometry_updates == 0 && p != rules()->checkPosition(p)) {
kDebug(1212) << "forced position fail:" << p << ":" << rules()->checkPosition(p); qDebug() << "forced position fail:" << p << ":" << rules()->checkPosition(p);
kDebug(1212) << kBacktrace();
} }
if (force == NormalGeometrySet && geom.topLeft() == p) if (force == NormalGeometrySet && geom.topLeft() == p)
return; return;
@ -2458,7 +2452,7 @@ void Client::updateFullscreenMonitors(NETFullscreenMonitors topology)
topology.bottom >= nscreens || topology.bottom >= nscreens ||
topology.left >= nscreens || topology.left >= nscreens ||
topology.right >= nscreens) { topology.right >= nscreens) {
kWarning(1212) << "fullscreenMonitors update failed. request higher than number of screens."; qWarning() << "fullscreenMonitors update failed. request higher than number of screens.";
return; return;
} }

View file

@ -32,8 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "overlaywindow.h" #include "overlaywindow.h"
// kwin libs // kwin libs
#include <kwinglplatform.h> #include <kwinglplatform.h>
// KDE // Qt
#include <KDE/KDebug> #include <QDebug>
namespace KWin namespace KWin
{ {
@ -142,7 +142,7 @@ void GlxBackend::init()
setIsDirectRendering(bool(glXIsDirect(display(), ctx))); setIsDirectRendering(bool(glXIsDirect(display(), ctx)));
kDebug(1212) << "Direct rendering:" << isDirectRendering() << endl; qDebug() << "Direct rendering:" << isDirectRendering() << endl;
} }
bool GlxBackend::initRenderingContext() bool GlxBackend::initRenderingContext()
@ -200,12 +200,12 @@ bool GlxBackend::initRenderingContext()
ctx = glXCreateNewContext(display(), fbconfig, GLX_RGBA_TYPE, NULL, direct); ctx = glXCreateNewContext(display(), fbconfig, GLX_RGBA_TYPE, NULL, direct);
if (!ctx) { if (!ctx) {
kDebug(1212) << "Failed to create an OpenGL context."; qDebug() << "Failed to create an OpenGL context.";
return false; return false;
} }
if (!glXMakeCurrent(display(), glxWindow, ctx)) { if (!glXMakeCurrent(display(), glxWindow, ctx)) {
kDebug(1212) << "Failed to make the OpenGL context current."; qDebug() << "Failed to make the OpenGL context current.";
glXDestroyContext(display(), ctx); glXDestroyContext(display(), ctx);
ctx = 0; ctx = 0;
return false; return false;
@ -230,14 +230,14 @@ bool GlxBackend::initBuffer()
overlayWindow()->setup(window); overlayWindow()->setup(window);
XFree(visual); XFree(visual);
} else { } else {
kError(1212) << "Failed to create overlay window"; qCritical() << "Failed to create overlay window";
return false; return false;
} }
int vis_buffer; int vis_buffer;
glXGetFBConfigAttrib(display(), fbconfig, GLX_VISUAL_ID, &vis_buffer); glXGetFBConfigAttrib(display(), fbconfig, GLX_VISUAL_ID, &vis_buffer);
XVisualInfo* visinfo_buffer = glXGetVisualFromFBConfig(display(), fbconfig); XVisualInfo* visinfo_buffer = glXGetVisualFromFBConfig(display(), fbconfig);
kDebug(1212) << "Buffer visual (depth " << visinfo_buffer->depth << "): 0x" << QString::number(vis_buffer, 16); qDebug() << "Buffer visual (depth " << visinfo_buffer->depth << "): 0x" << QString::number(vis_buffer, 16);
XFree(visinfo_buffer); XFree(visinfo_buffer);
return true; return true;
@ -268,7 +268,7 @@ bool GlxBackend::initFbConfig()
} }
if (fbconfig == NULL) { if (fbconfig == NULL) {
kError(1212) << "Failed to find a usable framebuffer configuration"; qCritical() << "Failed to find a usable framebuffer configuration";
return false; return false;
} }
@ -296,7 +296,7 @@ bool GlxBackend::initDrawableConfigs()
GLXFBConfig *configs = glXChooseFBConfig(display(), DefaultScreen(display()), attribs, &count); GLXFBConfig *configs = glXChooseFBConfig(display(), DefaultScreen(display()), attribs, &count);
if (count < 1) { if (count < 1) {
kError(1212) << "Could not find any usable framebuffer configurations."; qCritical() << "Could not find any usable framebuffer configurations.";
return false; return false;
} }
@ -366,12 +366,12 @@ bool GlxBackend::initDrawableConfigs()
XFree(configs); XFree(configs);
if (fbcdrawableinfo[DefaultDepth(display(), DefaultScreen(display()))].fbconfig == NULL) { if (fbcdrawableinfo[DefaultDepth(display(), DefaultScreen(display()))].fbconfig == NULL) {
kError(1212) << "Could not find a framebuffer configuration for the default depth."; qCritical() << "Could not find a framebuffer configuration for the default depth.";
return false; return false;
} }
if (fbcdrawableinfo[32].fbconfig == NULL) { if (fbcdrawableinfo[32].fbconfig == NULL) {
kError(1212) << "Could not find a framebuffer configuration for depth 32."; qCritical() << "Could not find a framebuffer configuration for depth 32.";
return false; return false;
} }
@ -382,7 +382,7 @@ bool GlxBackend::initDrawableConfigs()
int vis_drawable = 0; int vis_drawable = 0;
glXGetFBConfigAttrib(display(), fbcdrawableinfo[i].fbconfig, GLX_VISUAL_ID, &vis_drawable); glXGetFBConfigAttrib(display(), fbcdrawableinfo[i].fbconfig, GLX_VISUAL_ID, &vis_drawable);
kDebug(1212) << "Drawable visual (depth " << i << "): 0x" << QString::number(vis_drawable, 16); qDebug() << "Drawable visual (depth " << i << "): 0x" << QString::number(vis_drawable, 16);
} }
return true; return true;
@ -439,7 +439,7 @@ void GlxBackend::present()
if (qstrcmp(qgetenv("__GL_YIELD"), "USLEEP")) { if (qstrcmp(qgetenv("__GL_YIELD"), "USLEEP")) {
options->setGlPreferBufferSwap(0); options->setGlPreferBufferSwap(0);
setSwapInterval(0); setSwapInterval(0);
kWarning(1212) << "\nIt seems you are using the nvidia driver without triple buffering\n" qWarning() << "\nIt seems you are using the nvidia driver without triple buffering\n"
"You must export __GL_YIELD=\"USLEEP\" to prevent large CPU overhead on synced swaps\n" "You must export __GL_YIELD=\"USLEEP\" to prevent large CPU overhead on synced swaps\n"
"Preferably, enable the TripleBuffer Option in the xorg.conf Device\n" "Preferably, enable the TripleBuffer Option in the xorg.conf Device\n"
"For this reason, the tearing prevention has been disabled.\n" "For this reason, the tearing prevention has been disabled.\n"
@ -578,7 +578,7 @@ bool GlxTexture::loadTexture(const Pixmap& pix, const QSize& size, int depth)
if (pix == None || size.isEmpty() || depth < 1) if (pix == None || size.isEmpty() || depth < 1)
return false; return false;
if (m_backend->fbcdrawableinfo[ depth ].fbconfig == NULL) { if (m_backend->fbcdrawableinfo[ depth ].fbconfig == NULL) {
kDebug(1212) << "No framebuffer configuration for depth " << depth qDebug() << "No framebuffer configuration for depth " << depth
<< "; not binding pixmap" << endl; << "; not binding pixmap" << endl;
return false; return false;
} }

View file

@ -35,6 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <assert.h> #include <assert.h>
#include <kstartupinfo.h> #include <kstartupinfo.h>
#include <QDebug>
#include <QX11Info> #include <QX11Info>
@ -71,15 +72,15 @@ bool performTransiencyCheck()
if ((*it1)->deleting) if ((*it1)->deleting)
continue; continue;
if ((*it1)->in_group == NULL) { if ((*it1)->in_group == NULL) {
kDebug(1212) << "TC: " << *it1 << " in not in a group" << endl; qDebug() << "TC: " << *it1 << " in not in a group" << endl;
ret = false; ret = false;
} else if (!(*it1)->in_group->members().contains(*it1)) { } else if (!(*it1)->in_group->members().contains(*it1)) {
kDebug(1212) << "TC: " << *it1 << " has a group " << (*it1)->in_group << " but group does not contain it" << endl; qDebug() << "TC: " << *it1 << " has a group " << (*it1)->in_group << " but group does not contain it" << endl;
ret = false; ret = false;
} }
if (!(*it1)->isTransient()) { if (!(*it1)->isTransient()) {
if (!(*it1)->mainClients().isEmpty()) { if (!(*it1)->mainClients().isEmpty()) {
kDebug(1212) << "TC: " << *it1 << " is not transient, has main clients:" << (*it1)->mainClients() << endl; qDebug() << "TC: " << *it1 << " is not transient, has main clients:" << (*it1)->mainClients() << endl;
ret = false; ret = false;
} }
} else { } else {
@ -90,8 +91,8 @@ bool performTransiencyCheck()
if (transiencyCheckNonExistent if (transiencyCheckNonExistent
&& !Workspace::self()->clients.contains(*it2) && !Workspace::self()->clients.contains(*it2)
&& !Workspace::self()->desktops.contains(*it2)) { && !Workspace::self()->desktops.contains(*it2)) {
kDebug(1212) << "TC:" << *it1 << " has non-existent main client "; qDebug() << "TC:" << *it1 << " has non-existent main client ";
kDebug(1212) << "TC2:" << *it2; // this may crash qDebug() << "TC2:" << *it2; // this may crash
ret = false; ret = false;
continue; continue;
} }
@ -108,8 +109,8 @@ bool performTransiencyCheck()
if (transiencyCheckNonExistent if (transiencyCheckNonExistent
&& !Workspace::self()->clients.contains(*it2) && !Workspace::self()->clients.contains(*it2)
&& !Workspace::self()->desktops.contains(*it2)) { && !Workspace::self()->desktops.contains(*it2)) {
kDebug(1212) << "TC:" << *it1 << " has non-existent transient "; qDebug() << "TC:" << *it1 << " has non-existent transient ";
kDebug(1212) << "TC2:" << *it2; // this may crash qDebug() << "TC2:" << *it2; // this may crash
ret = false; ret = false;
continue; continue;
} }
@ -128,7 +129,7 @@ bool performTransiencyCheck()
it2 != members.constEnd(); it2 != members.constEnd();
++it2) { ++it2) {
if ((*it2)->in_group != *it1) { if ((*it2)->in_group != *it1) {
kDebug(1212) << "TC: Group " << *it1 << " contains client " << *it2 << " but client is not in that group" << endl; qDebug() << "TC: Group " << *it1 << " contains client " << *it2 << " but client is not in that group" << endl;
ret = false; ret = false;
} }
} }
@ -153,8 +154,8 @@ static void checkTransiency()
{ {
if (--transiencyCheck == 0) { if (--transiencyCheck == 0) {
if (!performTransiencyCheck()) { if (!performTransiencyCheck()) {
kDebug(1212) << "BT:" << transiencyCheckStartBt << endl; qDebug() << "BT:" << transiencyCheckStartBt << endl;
kDebug(1212) << "CLIENT:" << transiencyCheckClient << endl; qDebug() << "CLIENT:" << transiencyCheckClient << endl;
abort(); abort();
} }
transiencyCheckNonExistent = false; transiencyCheckNonExistent = false;
@ -268,15 +269,15 @@ void Group::addMember(Client* member_P)
{ {
TRANSIENCY_CHECK(member_P); TRANSIENCY_CHECK(member_P);
_members.append(member_P); _members.append(member_P);
// kDebug(1212) << "GROUPADD:" << this << ":" << member_P; // qDebug() << "GROUPADD:" << this << ":" << member_P;
// kDebug(1212) << kBacktrace(); // qDebug() << kBacktrace();
} }
void Group::removeMember(Client* member_P) void Group::removeMember(Client* member_P)
{ {
TRANSIENCY_CHECK(member_P); TRANSIENCY_CHECK(member_P);
// kDebug(1212) << "GROUPREMOVE:" << this << ":" << member_P; // qDebug() << "GROUPREMOVE:" << this << ":" << member_P;
// kDebug(1212) << kBacktrace(); // qDebug() << kBacktrace();
Q_ASSERT(_members.contains(member_P)); Q_ASSERT(_members.contains(member_P));
_members.removeAll(member_P); _members.removeAll(member_P);
// there are cases when automatic deleting of groups must be delayed, // there are cases when automatic deleting of groups must be delayed,
@ -639,28 +640,28 @@ void Client::removeFromMainClients()
void Client::cleanGrouping() void Client::cleanGrouping()
{ {
TRANSIENCY_CHECK(this); TRANSIENCY_CHECK(this);
// kDebug(1212) << "CLEANGROUPING:" << this; // qDebug() << "CLEANGROUPING:" << this;
// for ( ClientList::ConstIterator it = group()->members().begin(); // for ( ClientList::ConstIterator it = group()->members().begin();
// it != group()->members().end(); // it != group()->members().end();
// ++it ) // ++it )
// kDebug(1212) << "CL:" << *it; // qDebug() << "CL:" << *it;
// ClientList mains; // ClientList mains;
// mains = mainClients(); // mains = mainClients();
// for ( ClientList::ConstIterator it = mains.begin(); // for ( ClientList::ConstIterator it = mains.begin();
// it != mains.end(); // it != mains.end();
// ++it ) // ++it )
// kDebug(1212) << "MN:" << *it; // qDebug() << "MN:" << *it;
removeFromMainClients(); removeFromMainClients();
// kDebug(1212) << "CLEANGROUPING2:" << this; // qDebug() << "CLEANGROUPING2:" << this;
// for ( ClientList::ConstIterator it = group()->members().begin(); // for ( ClientList::ConstIterator it = group()->members().begin();
// it != group()->members().end(); // it != group()->members().end();
// ++it ) // ++it )
// kDebug(1212) << "CL2:" << *it; // qDebug() << "CL2:" << *it;
// mains = mainClients(); // mains = mainClients();
// for ( ClientList::ConstIterator it = mains.begin(); // for ( ClientList::ConstIterator it = mains.begin();
// it != mains.end(); // it != mains.end();
// ++it ) // ++it )
// kDebug(1212) << "MN2:" << *it; // qDebug() << "MN2:" << *it;
for (ClientList::ConstIterator it = transients_list.constBegin(); for (ClientList::ConstIterator it = transients_list.constBegin();
it != transients_list.constEnd(); it != transients_list.constEnd();
) { ) {
@ -670,16 +671,16 @@ void Client::cleanGrouping()
} else } else
++it; ++it;
} }
// kDebug(1212) << "CLEANGROUPING3:" << this; // qDebug() << "CLEANGROUPING3:" << this;
// for ( ClientList::ConstIterator it = group()->members().begin(); // for ( ClientList::ConstIterator it = group()->members().begin();
// it != group()->members().end(); // it != group()->members().end();
// ++it ) // ++it )
// kDebug(1212) << "CL3:" << *it; // qDebug() << "CL3:" << *it;
// mains = mainClients(); // mains = mainClients();
// for ( ClientList::ConstIterator it = mains.begin(); // for ( ClientList::ConstIterator it = mains.begin();
// it != mains.end(); // it != mains.end();
// ++it ) // ++it )
// kDebug(1212) << "MN3:" << *it; // qDebug() << "MN3:" << *it;
// HACK // HACK
// removeFromMainClients() did remove 'this' from transient // removeFromMainClients() did remove 'this' from transient
// lists of all group members, but then made windows that // lists of all group members, but then made windows that
@ -692,11 +693,11 @@ void Client::cleanGrouping()
it != group_members.constEnd(); it != group_members.constEnd();
++it) ++it)
(*it)->removeTransient(this); (*it)->removeTransient(this);
// kDebug(1212) << "CLEANGROUPING4:" << this; // qDebug() << "CLEANGROUPING4:" << this;
// for ( ClientList::ConstIterator it = group_members.begin(); // for ( ClientList::ConstIterator it = group_members.begin();
// it != group_members.end(); // it != group_members.end();
// ++it ) // ++it )
// kDebug(1212) << "CL4:" << *it; // qDebug() << "CL4:" << *it;
} }
// Make sure that no group transient is considered transient // Make sure that no group transient is considered transient
@ -771,7 +772,7 @@ xcb_window_t Client::verifyTransientFor(xcb_window_t new_transient_for, bool set
} }
if (new_transient_for == window()) { // pointing to self if (new_transient_for == window()) { // pointing to self
// also fix the property itself // also fix the property itself
kWarning(1216) << "Client " << this << " has WM_TRANSIENT_FOR poiting to itself." ; qWarning() << "Client " << this << " has WM_TRANSIENT_FOR poiting to itself." ;
new_property_value = new_transient_for = rootWindow(); new_property_value = new_transient_for = rootWindow();
} }
// The transient_for window may be embedded in another application, // The transient_for window may be embedded in another application,
@ -789,7 +790,7 @@ xcb_window_t Client::verifyTransientFor(xcb_window_t new_transient_for, bool set
} }
if (Client* new_transient_for_client = workspace()->findClient(WindowMatchPredicate(new_transient_for))) { if (Client* new_transient_for_client = workspace()->findClient(WindowMatchPredicate(new_transient_for))) {
if (new_transient_for != before_search) { if (new_transient_for != before_search) {
kDebug(1212) << "Client " << this << " has WM_TRANSIENT_FOR poiting to non-toplevel window " qDebug() << "Client " << this << " has WM_TRANSIENT_FOR poiting to non-toplevel window "
<< before_search << ", child of " << new_transient_for_client << ", adjusting." << endl; << before_search << ", child of " << new_transient_for_client << ", adjusting." << endl;
new_property_value = new_transient_for; // also fix the property new_property_value = new_transient_for; // also fix the property
} }
@ -806,7 +807,7 @@ xcb_window_t Client::verifyTransientFor(xcb_window_t new_transient_for, bool set
break; break;
loop_pos = pos->m_transientForId; loop_pos = pos->m_transientForId;
if (--count == 0 || pos == this) { if (--count == 0 || pos == this) {
kWarning(1216) << "Client " << this << " caused WM_TRANSIENT_FOR loop." ; qWarning() << "Client " << this << " caused WM_TRANSIENT_FOR loop." ;
new_transient_for = rootWindow(); new_transient_for = rootWindow();
} }
} }
@ -829,19 +830,19 @@ void Client::addTransient(Client* cl)
transients_list.append(cl); transients_list.append(cl);
if (workspace()->mostRecentlyActivatedClient() == this && cl->isModal()) if (workspace()->mostRecentlyActivatedClient() == this && cl->isModal())
check_active_modal = true; check_active_modal = true;
// kDebug(1212) << "ADDTRANS:" << this << ":" << cl; // qDebug() << "ADDTRANS:" << this << ":" << cl;
// kDebug(1212) << kBacktrace(); // qDebug() << kBacktrace();
// for ( ClientList::ConstIterator it = transients_list.begin(); // for ( ClientList::ConstIterator it = transients_list.begin();
// it != transients_list.end(); // it != transients_list.end();
// ++it ) // ++it )
// kDebug(1212) << "AT:" << (*it); // qDebug() << "AT:" << (*it);
} }
void Client::removeTransient(Client* cl) void Client::removeTransient(Client* cl)
{ {
TRANSIENCY_CHECK(this); TRANSIENCY_CHECK(this);
// kDebug(1212) << "REMOVETRANS:" << this << ":" << cl; // qDebug() << "REMOVETRANS:" << this << ":" << cl;
// kDebug(1212) << kBacktrace(); // qDebug() << kBacktrace();
transients_list.removeAll(cl); transients_list.removeAll(cl);
// cl is transient for this, but this is going away // cl is transient for this, but this is going away
// make cl group transient // make cl group transient

View file

@ -64,7 +64,7 @@ void LanczosFilter::init()
m_inited = true; m_inited = true;
const bool force = (qstrcmp(qgetenv("KWIN_FORCE_LANCZOS"), "1") == 0); const bool force = (qstrcmp(qgetenv("KWIN_FORCE_LANCZOS"), "1") == 0);
if (force) { if (force) {
kWarning(1212) << "Lanczos Filter forced on by environment variable"; qWarning() << "Lanczos Filter forced on by environment variable";
} }
if (!force && options->glSmoothScale() != 2) if (!force && options->glSmoothScale() != 2)
@ -94,7 +94,7 @@ void LanczosFilter::init()
m_uKernel = m_shader->uniformLocation("kernel"); m_uKernel = m_shader->uniformLocation("kernel");
m_uOffsets = m_shader->uniformLocation("offsets"); m_uOffsets = m_shader->uniformLocation("offsets");
} else { } else {
kDebug(1212) << "Shader is not valid"; qDebug() << "Shader is not valid";
m_shader.reset(); m_shader.reset();
} }
} }

View file

@ -74,8 +74,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <assert.h> #include <assert.h>
#include <kdebug.h>
#include "utils.h" #include "utils.h"
#include "client.h" #include "client.h"
#include "focuschain.h" #include "focuschain.h"
@ -94,6 +92,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "screenedge.h" #include "screenedge.h"
#endif #endif
#include <QDebug>
namespace KWin namespace KWin
{ {
@ -127,12 +127,12 @@ void Workspace::updateStackingOrder(bool propagate_new_clients)
force_restacking = false; force_restacking = false;
stacking_order = new_stacking_order; stacking_order = new_stacking_order;
#if 0 #if 0
kDebug(1212) << "stacking:" << changed; qDebug() << "stacking:" << changed;
if (changed || propagate_new_clients) { if (changed || propagate_new_clients) {
for (ClientList::ConstIterator it = stacking_order.begin(); for (ClientList::ConstIterator it = stacking_order.begin();
it != stacking_order.end(); it != stacking_order.end();
++it) ++it)
kDebug(1212) << (void*)(*it) << *it << ":" << (*it)->layer(); qDebug() << (void*)(*it) << *it << ":" << (*it)->layer();
} }
#endif #endif
if (changed || propagate_new_clients) { if (changed || propagate_new_clients) {
@ -504,11 +504,11 @@ ToplevelList Workspace::constrainedStackingOrder()
ToplevelList layer[ NumLayers ]; ToplevelList layer[ NumLayers ];
#if 0 #if 0
kDebug(1212) << "stacking1:"; qDebug() << "stacking1:";
for (ClientList::ConstIterator it = unconstrained_stacking_order.begin(); for (ClientList::ConstIterator it = unconstrained_stacking_order.begin();
it != unconstrained_stacking_order.end(); it != unconstrained_stacking_order.end();
++it) ++it)
kDebug(1212) << (void*)(*it) << *it << ":" << (*it)->layer(); qDebug() << (void*)(*it) << *it << ":" << (*it)->layer();
#endif #endif
// build the order from layers // build the order from layers
QVector< QMap<Group*, Layer> > minimum_layer(screens()->count()); QVector< QMap<Group*, Layer> > minimum_layer(screens()->count());
@ -537,11 +537,11 @@ ToplevelList Workspace::constrainedStackingOrder()
++lay) ++lay)
stacking += layer[ lay ]; stacking += layer[ lay ];
#if 0 #if 0
kDebug(1212) << "stacking2:"; qDebug() << "stacking2:";
for (ClientList::ConstIterator it = stacking.begin(); for (ClientList::ConstIterator it = stacking.begin();
it != stacking.end(); it != stacking.end();
++it) ++it)
kDebug(1212) << (void*)(*it) << *it << ":" << (*it)->layer(); qDebug() << (void*)(*it) << *it << ":" << (*it)->layer();
#endif #endif
// now keep transients above their mainwindows // now keep transients above their mainwindows
// TODO this could(?) use some optimization // TODO this could(?) use some optimization
@ -603,12 +603,12 @@ ToplevelList Workspace::constrainedStackingOrder()
stacking.insert(i2, current); stacking.insert(i2, current);
} }
#if 0 #if 0
kDebug(1212) << "stacking3:"; qDebug() << "stacking3:";
for (ClientList::ConstIterator it = stacking.begin(); for (ClientList::ConstIterator it = stacking.begin();
it != stacking.end(); it != stacking.end();
++it) ++it)
kDebug(1212) << (void*)(*it) << *it << ":" << (*it)->layer(); qDebug() << (void*)(*it) << *it << ":" << (*it)->layer();
kDebug(1212) << "\n\n"; qDebug() << "\n\n";
#endif #endif
return stacking; return stacking;
} }

View file

@ -37,11 +37,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KDE/KConfig> #include <KDE/KConfig>
#include <KDE/KConfigGroup> #include <KDE/KConfigGroup>
#include <KDE/KCrash> #include <KDE/KCrash>
#include <KDE/KDebug>
#include <KDE/KGlobal> #include <KDE/KGlobal>
#include <KDE/KLocalizedString> #include <KDE/KLocalizedString>
// Qt // Qt
#include <qplatformdefs.h> #include <qplatformdefs.h>
#include <QDebug>
#include <QComboBox> #include <QComboBox>
#include <qcommandlineparser.h> #include <qcommandlineparser.h>
#include <QDialog> #include <QDialog>
@ -233,10 +233,10 @@ void Application::start()
else else
::exit(1); ::exit(1);
if (cmd.length() > 500) { if (cmd.length() > 500) {
kDebug(1212) << "Command is too long, truncating"; qDebug() << "Command is too long, truncating";
cmd = cmd.left(500); cmd = cmd.left(500);
} }
kDebug(1212) << "Starting" << cmd << "and exiting"; qDebug() << "Starting" << cmd << "and exiting";
char buf[1024]; char buf[1024];
sprintf(buf, "%s &", cmd.toAscii().data()); sprintf(buf, "%s &", cmd.toAscii().data());
system(buf); system(buf);
@ -244,7 +244,7 @@ void Application::start()
} }
if (crashes >= 2) { if (crashes >= 2) {
// Disable compositing if we have had too many crashes // Disable compositing if we have had too many crashes
kDebug(1212) << "Too many crashes recently, disabling compositing"; qDebug() << "Too many crashes recently, disabling compositing";
KConfigGroup compgroup(config, "Compositing"); KConfigGroup compgroup(config, "Compositing");
compgroup.writeEntry("Enabled", false); compgroup.writeEntry("Enabled", false);
} }
@ -508,7 +508,7 @@ KDE_EXPORT int kdemain(int argc, char * argv[])
// Announce when KWIN_DIRECT_GL is set for above HACK // Announce when KWIN_DIRECT_GL is set for above HACK
if (qstrcmp(qgetenv("KWIN_DIRECT_GL"), "1") == 0) if (qstrcmp(qgetenv("KWIN_DIRECT_GL"), "1") == 0)
kDebug(1212) << "KWIN_DIRECT_GL set, not forcing LIBGL_ALWAYS_INDIRECT=1"; qDebug() << "KWIN_DIRECT_GL set, not forcing LIBGL_ALWAYS_INDIRECT=1";
QString appname; QString appname;
if (KWin::screen_number == 0) if (KWin::screen_number == 0)

View file

@ -28,6 +28,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "decorations.h" #include "decorations.h"
#include "virtualdesktops.h" #include "virtualdesktops.h"
#include "workspace.h" #include "workspace.h"
// Qt
#include <QDebug>
namespace KWin namespace KWin
{ {
@ -48,7 +50,7 @@ RootInfo *RootInfo::create()
ScopedCPointer<xcb_generic_error_t> error(xcb_request_check(connection(), ScopedCPointer<xcb_generic_error_t> error(xcb_request_check(connection(),
xcb_configure_window_checked(connection(), supportWindow, XCB_CONFIG_WINDOW_STACK_MODE, lowerValues))); xcb_configure_window_checked(connection(), supportWindow, XCB_CONFIG_WINDOW_STACK_MODE, lowerValues)));
if (!error.isNull()) { if (!error.isNull()) {
kDebug(1212) << "Error occurred while lowering support window: " << error->error_code; qDebug() << "Error occurred while lowering support window: " << error->error_code;
} }
unsigned long protocols[5] = { unsigned long protocols[5] = {

View file

@ -73,7 +73,7 @@ int currentRefreshRate()
vtotal *= 2; vtotal *= 2;
if (modeline.htotal*vtotal) // BUG 313996 if (modeline.htotal*vtotal) // BUG 313996
rate = 1000*dotclock/(modeline.htotal*vtotal); // WTF was wikipedia 1998 when I nedded it? rate = 1000*dotclock/(modeline.htotal*vtotal); // WTF was wikipedia 1998 when I nedded it?
kDebug(1212) << "Vertical Refresh Rate (as detected by XF86VM): " << rate << "Hz"; qDebug() << "Vertical Refresh Rate (as detected by XF86VM): " << rate << "Hz";
} }
} }
if (rate < 1) if (rate < 1)
@ -93,7 +93,7 @@ int currentRefreshRate()
rate = -1; rate = -1;
else else
rate = qRound(frate); rate = qRound(frate);
kDebug(1212) << "Vertical Refresh Rate (as detected by nvidia-settings): " << rate << "Hz"; qDebug() << "Vertical Refresh Rate (as detected by nvidia-settings): " << rate << "Hz";
} }
} }
} }
@ -110,7 +110,7 @@ int currentRefreshRate()
// however, additional throttling prevents very high rates from taking place anyway // however, additional throttling prevents very high rates from taking place anyway
else if (rate > 1000) else if (rate > 1000)
rate = 1000; rate = 1000;
kDebug(1212) << "Vertical Refresh rate " << rate << "Hz"; qDebug() << "Vertical Refresh rate " << rate << "Hz";
return rate; return rate;
} }
@ -905,24 +905,24 @@ bool Options::loadCompositingConfig (bool force)
if (const char *c = getenv("KWIN_COMPOSE")) { if (const char *c = getenv("KWIN_COMPOSE")) {
switch(c[0]) { switch(c[0]) {
case 'O': case 'O':
kDebug(1212) << "Compositing forced to OpenGL mode by environment variable"; qDebug() << "Compositing forced to OpenGL mode by environment variable";
compositingMode = OpenGLCompositing; compositingMode = OpenGLCompositing;
useCompositing = true; useCompositing = true;
break; break;
case 'X': case 'X':
kDebug(1212) << "Compositing forced to XRender mode by environment variable"; qDebug() << "Compositing forced to XRender mode by environment variable";
compositingMode = XRenderCompositing; compositingMode = XRenderCompositing;
useCompositing = true; useCompositing = true;
break; break;
case 'N': case 'N':
if (getenv("KDE_FAILSAFE")) if (getenv("KDE_FAILSAFE"))
kDebug(1212) << "Compositing disabled forcefully by KDE failsafe mode"; qDebug() << "Compositing disabled forcefully by KDE failsafe mode";
else else
kDebug(1212) << "Compositing disabled forcefully by environment variable"; qDebug() << "Compositing disabled forcefully by environment variable";
compositingMode = NoCompositing; compositingMode = NoCompositing;
break; break;
default: default:
kDebug(1212) << "Unknown KWIN_COMPOSE mode set, ignoring"; qDebug() << "Unknown KWIN_COMPOSE mode set, ignoring";
break; break;
} }
} }

View file

@ -30,7 +30,6 @@ DEALINGS IN THE SOFTWARE.
#include "effects.h" #include "effects.h"
#include <kwinglutils.h> #include <kwinglutils.h>
#include <kwinxrenderutils.h> #include <kwinxrenderutils.h>
#include <kdebug.h>
#include <QPaintEngine> #include <QPaintEngine>
#include <qevent.h> #include <qevent.h>
#include <qpainter.h> #include <qpainter.h>

View file

@ -27,6 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <ktemporaryfile.h> #include <ktemporaryfile.h>
#include <QFile> #include <QFile>
#include <ktoolinvocation.h> #include <ktoolinvocation.h>
#include <QDebug>
#ifndef KCMRULES #ifndef KCMRULES
#include "client.h" #include "client.h"
@ -952,7 +953,7 @@ WindowRules RuleBook::find(const Client* c, bool ignore_temporary)
} }
if ((*it)->match(c)) { if ((*it)->match(c)) {
Rules* rule = *it; Rules* rule = *it;
kDebug(1212) << "Rule found:" << rule << ":" << c; qDebug() << "Rule found:" << rule << ":" << c;
if (rule->isTemporary()) if (rule->isTemporary())
it = m_rules.erase(it); it = m_rules.erase(it);
else else

View file

@ -25,13 +25,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <netwm_def.h> #include <netwm_def.h>
#include <QRect> #include <QRect>
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <kdebug.h>
#include "placement.h" #include "placement.h"
#include <kdecoration.h> #include <kdecoration.h>
#include "options.h" #include "options.h"
#include "utils.h" #include "utils.h"
class QDebug;
class KConfig; class KConfig;
class KXMessages; class KXMessages;

View file

@ -812,20 +812,20 @@ void WindowPixmap::create()
Xcb::WindowAttributes windowAttributes(toplevel()->frameId()); Xcb::WindowAttributes windowAttributes(toplevel()->frameId());
Xcb::WindowGeometry windowGeometry(toplevel()->frameId()); Xcb::WindowGeometry windowGeometry(toplevel()->frameId());
if (xcb_generic_error_t *error = xcb_request_check(connection(), namePixmapCookie)) { if (xcb_generic_error_t *error = xcb_request_check(connection(), namePixmapCookie)) {
kDebug(1212) << "Creating window pixmap failed: " << error->error_code; qDebug() << "Creating window pixmap failed: " << error->error_code;
free(error); free(error);
return; return;
} }
// check that the received pixmap is valid and actually matches what we // check that the received pixmap is valid and actually matches what we
// know about the window (i.e. size) // know about the window (i.e. size)
if (!windowAttributes || windowAttributes->map_state != XCB_MAP_STATE_VIEWABLE) { if (!windowAttributes || windowAttributes->map_state != XCB_MAP_STATE_VIEWABLE) {
kDebug(1212) << "Creating window pixmap failed: " << this; qDebug() << "Creating window pixmap failed: " << this;
xcb_free_pixmap(connection(), pix); xcb_free_pixmap(connection(), pix);
return; return;
} }
if (!windowGeometry || if (!windowGeometry ||
windowGeometry->width != toplevel()->width() || windowGeometry->height != toplevel()->height()) { windowGeometry->width != toplevel()->width() || windowGeometry->height != toplevel()->height()) {
kDebug(1212) << "Creating window pixmap failed: " << this; qDebug() << "Creating window pixmap failed: " << this;
xcb_free_pixmap(connection(), pix); xcb_free_pixmap(connection(), pix);
return; return;
} }

View file

@ -97,7 +97,7 @@ OpenGLBackend::~OpenGLBackend()
void OpenGLBackend::setFailed(const QString &reason) void OpenGLBackend::setFailed(const QString &reason)
{ {
kWarning(1212) << "Creating the OpenGL rendering failed: " << reason; qWarning() << "Creating the OpenGL rendering failed: " << reason;
m_failed = true; m_failed = true;
} }
@ -128,13 +128,13 @@ SceneOpenGL::SceneOpenGL(Workspace* ws, OpenGLBackend *backend)
#ifndef KWIN_HAVE_OPENGLES #ifndef KWIN_HAVE_OPENGLES
if (!hasGLExtension(QStringLiteral("GL_ARB_texture_non_power_of_two")) if (!hasGLExtension(QStringLiteral("GL_ARB_texture_non_power_of_two"))
&& !hasGLExtension(QStringLiteral("GL_ARB_texture_rectangle"))) { && !hasGLExtension(QStringLiteral("GL_ARB_texture_rectangle"))) {
kError(1212) << "GL_ARB_texture_non_power_of_two and GL_ARB_texture_rectangle missing"; qCritical() << "GL_ARB_texture_non_power_of_two and GL_ARB_texture_rectangle missing";
init_ok = false; init_ok = false;
return; // error return; // error
} }
#endif #endif
if (glPlatform->isMesaDriver() && glPlatform->mesaVersion() < kVersionNumber(8, 0)) { if (glPlatform->isMesaDriver() && glPlatform->mesaVersion() < kVersionNumber(8, 0)) {
kError(1212) << "KWin requires at least Mesa 8.0 for OpenGL compositing."; qCritical() << "KWin requires at least Mesa 8.0 for OpenGL compositing.";
init_ok = false; init_ok = false;
return; return;
} }
@ -183,7 +183,7 @@ SceneOpenGL *SceneOpenGL::createScene()
// check environment variable // check environment variable
if (qstrcmp(envOpenGLInterface, "egl") == 0 || if (qstrcmp(envOpenGLInterface, "egl") == 0 ||
qstrcmp(envOpenGLInterface, "egl_wayland") == 0) { qstrcmp(envOpenGLInterface, "egl_wayland") == 0) {
kDebug(1212) << "Forcing EGL native interface through environment variable"; qDebug() << "Forcing EGL native interface through environment variable";
platformInterface = EglPlatformInterface; platformInterface = EglPlatformInterface;
} }
#endif #endif
@ -238,9 +238,9 @@ SceneOpenGL *SceneOpenGL::createScene()
#endif #endif
if (!scene) { if (!scene) {
if (GLPlatform::instance()->recommendedCompositor() == XRenderCompositing) { if (GLPlatform::instance()->recommendedCompositor() == XRenderCompositing) {
kError(1212) << "OpenGL driver recommends XRender based compositing. Falling back to XRender."; qCritical() << "OpenGL driver recommends XRender based compositing. Falling back to XRender.";
kError(1212) << "To overwrite the detection use the environment variable KWIN_COMPOSE"; qCritical() << "To overwrite the detection use the environment variable KWIN_COMPOSE";
kError(1212) << "For more information see http://community.kde.org/KWin/Environment_Variables#KWIN_COMPOSE"; qCritical() << "For more information see http://community.kde.org/KWin/Environment_Variables#KWIN_COMPOSE";
QTimer::singleShot(0, Compositor::self(), SLOT(fallbackToXRenderCompositing())); QTimer::singleShot(0, Compositor::self(), SLOT(fallbackToXRenderCompositing()));
} }
delete backend; delete backend;
@ -303,15 +303,15 @@ void SceneOpenGL::handleGraphicsReset(GLenum status)
{ {
switch (status) { switch (status) {
case GL_GUILTY_CONTEXT_RESET_KWIN: case GL_GUILTY_CONTEXT_RESET_KWIN:
kDebug(1212) << "A graphics reset attributable to the current GL context occurred."; qDebug() << "A graphics reset attributable to the current GL context occurred.";
break; break;
case GL_INNOCENT_CONTEXT_RESET_KWIN: case GL_INNOCENT_CONTEXT_RESET_KWIN:
kDebug(1212) << "A graphics reset not attributable to the current GL context occurred."; qDebug() << "A graphics reset not attributable to the current GL context occurred.";
break; break;
case GL_UNKNOWN_CONTEXT_RESET_KWIN: case GL_UNKNOWN_CONTEXT_RESET_KWIN:
kDebug(1212) << "A graphics reset of an unknown cause occurred."; qDebug() << "A graphics reset of an unknown cause occurred.";
break; break;
default: default:
@ -325,7 +325,7 @@ void SceneOpenGL::handleGraphicsReset(GLenum status)
while (timer.elapsed() < 10000 && glGetGraphicsResetStatus() != GL_NO_ERROR) while (timer.elapsed() < 10000 && glGetGraphicsResetStatus() != GL_NO_ERROR)
usleep(50); usleep(50);
kDebug(1212) << "Attempting to reset compositing."; qDebug() << "Attempting to reset compositing.";
QMetaObject::invokeMethod(this, "resetCompositing", Qt::QueuedConnection); QMetaObject::invokeMethod(this, "resetCompositing", Qt::QueuedConnection);
KNotification::event(QStringLiteral("graphicsreset"), i18n("Desktop effects were restarted due to a graphics reset")); KNotification::event(QStringLiteral("graphicsreset"), i18n("Desktop effects were restarted due to a graphics reset"));
@ -607,7 +607,7 @@ bool SceneOpenGL2::supported(OpenGLBackend *backend)
const QByteArray forceEnv = qgetenv("KWIN_COMPOSE"); const QByteArray forceEnv = qgetenv("KWIN_COMPOSE");
if (!forceEnv.isEmpty()) { if (!forceEnv.isEmpty()) {
if (qstrcmp(forceEnv, "O2") == 0) { if (qstrcmp(forceEnv, "O2") == 0) {
kDebug(1212) << "OpenGL 2 compositing enforced by environment variable"; qDebug() << "OpenGL 2 compositing enforced by environment variable";
return true; return true;
} else { } else {
// OpenGL 2 disabled by environment variable // OpenGL 2 disabled by environment variable
@ -618,13 +618,13 @@ bool SceneOpenGL2::supported(OpenGLBackend *backend)
return false; return false;
} }
if (GLPlatform::instance()->recommendedCompositor() < OpenGL2Compositing) { if (GLPlatform::instance()->recommendedCompositor() < OpenGL2Compositing) {
kDebug(1212) << "Driver does not recommend OpenGL 2 compositing"; qDebug() << "Driver does not recommend OpenGL 2 compositing";
#ifndef KWIN_HAVE_OPENGLES #ifndef KWIN_HAVE_OPENGLES
return false; return false;
#endif #endif
} }
if (options->isGlLegacy()) { if (options->isGlLegacy()) {
kDebug(1212) << "OpenGL 2 disabled by config option"; qDebug() << "OpenGL 2 disabled by config option";
return false; return false;
} }
return true; return true;
@ -640,14 +640,14 @@ SceneOpenGL2::SceneOpenGL2(OpenGLBackend *backend)
return; return;
} }
// Initialize color correction before the shaders // Initialize color correction before the shaders
kDebug(1212) << "Color correction:" << options->isColorCorrected(); qDebug() << "Color correction:" << options->isColorCorrected();
m_colorCorrection->setEnabled(options->isColorCorrected()); m_colorCorrection->setEnabled(options->isColorCorrected());
connect(m_colorCorrection, SIGNAL(changed()), Compositor::self(), SLOT(addRepaintFull())); connect(m_colorCorrection, SIGNAL(changed()), Compositor::self(), SLOT(addRepaintFull()));
connect(m_colorCorrection, SIGNAL(errorOccured()), options, SLOT(setColorCorrected()), Qt::QueuedConnection); connect(m_colorCorrection, SIGNAL(errorOccured()), options, SLOT(setColorCorrected()), Qt::QueuedConnection);
connect(options, SIGNAL(colorCorrectedChanged()), this, SLOT(slotColorCorrectedChanged()), Qt::QueuedConnection); connect(options, SIGNAL(colorCorrectedChanged()), this, SLOT(slotColorCorrectedChanged()), Qt::QueuedConnection);
if (!ShaderManager::instance()->isValid()) { if (!ShaderManager::instance()->isValid()) {
kDebug(1212) << "No Scene Shaders available"; qDebug() << "No Scene Shaders available";
init_ok = false; init_ok = false;
return; return;
} }
@ -655,12 +655,12 @@ SceneOpenGL2::SceneOpenGL2(OpenGLBackend *backend)
// push one shader on the stack so that one is always bound // push one shader on the stack so that one is always bound
ShaderManager::instance()->pushShader(ShaderManager::SimpleShader); ShaderManager::instance()->pushShader(ShaderManager::SimpleShader);
if (checkGLError("Init")) { if (checkGLError("Init")) {
kError(1212) << "OpenGL 2 compositing setup failed"; qCritical() << "OpenGL 2 compositing setup failed";
init_ok = false; init_ok = false;
return; // error return; // error
} }
kDebug(1212) << "OpenGL 2 compositing successfully initialized"; qDebug() << "OpenGL 2 compositing successfully initialized";
#ifndef KWIN_HAVE_OPENGLES #ifndef KWIN_HAVE_OPENGLES
// It is not legal to not have a vertex array object bound in a core context // It is not legal to not have a vertex array object bound in a core context
@ -774,7 +774,7 @@ bool SceneOpenGL1::supported(OpenGLBackend *backend)
const QByteArray forceEnv = qgetenv("KWIN_COMPOSE"); const QByteArray forceEnv = qgetenv("KWIN_COMPOSE");
if (!forceEnv.isEmpty()) { if (!forceEnv.isEmpty()) {
if (qstrcmp(forceEnv, "O1") == 0) { if (qstrcmp(forceEnv, "O1") == 0) {
kDebug(1212) << "OpenGL 1 compositing enforced by environment variable"; qDebug() << "OpenGL 1 compositing enforced by environment variable";
return true; return true;
} else { } else {
// OpenGL 1 disabled by environment variable // OpenGL 1 disabled by environment variable
@ -782,7 +782,7 @@ bool SceneOpenGL1::supported(OpenGLBackend *backend)
} }
} }
if (GLPlatform::instance()->recommendedCompositor() < OpenGL1Compositing) { if (GLPlatform::instance()->recommendedCompositor() < OpenGL1Compositing) {
kDebug(1212) << "Driver does not recommend OpenGL 1 compositing"; qDebug() << "Driver does not recommend OpenGL 1 compositing";
return false; return false;
} }
return true; return true;
@ -799,12 +799,12 @@ SceneOpenGL1::SceneOpenGL1(OpenGLBackend *backend)
ShaderManager::disable(); ShaderManager::disable();
setupModelViewProjectionMatrix(); setupModelViewProjectionMatrix();
if (checkGLError("Init")) { if (checkGLError("Init")) {
kError(1212) << "OpenGL 1 compositing setup failed"; qCritical() << "OpenGL 1 compositing setup failed";
init_ok = false; init_ok = false;
return; // error return; // error
} }
kDebug(1212) << "OpenGL 1 compositing successfully initialized"; qDebug() << "OpenGL 1 compositing successfully initialized";
} }
SceneOpenGL1::~SceneOpenGL1() SceneOpenGL1::~SceneOpenGL1()
@ -1853,7 +1853,7 @@ bool OpenGLWindowPixmap::bind()
if (success) if (success)
toplevel()->resetDamage(); toplevel()->resetDamage();
else else
kDebug(1212) << "Failed to bind window"; qDebug() << "Failed to bind window";
return success; return success;
} }
@ -2504,7 +2504,7 @@ char SwapProfiler::end()
m_time = (10*m_time + m_timer.nsecsElapsed())/11; m_time = (10*m_time + m_timer.nsecsElapsed())/11;
if (++m_counter > 500) { if (++m_counter > 500) {
const bool blocks = m_time > 1000 * 1000; // 1ms, i get ~250µs and ~7ms w/o triple buffering... const bool blocks = m_time > 1000 * 1000; // 1ms, i get ~250µs and ~7ms w/o triple buffering...
kDebug(1212) << "Triple buffering detection:" << QString(blocks ? QStringLiteral("NOT available") : QStringLiteral("Available")) << qDebug() << "Triple buffering detection:" << QString(blocks ? QStringLiteral("NOT available") : QStringLiteral("Available")) <<
" - Mean block time:" << m_time/(1000.0*1000.0) << "ms"; " - Mean block time:" << m_time/(1000.0*1000.0) << "ms";
return blocks ? 'd' : 't'; return blocks ? 'd' : 't';
} }

View file

@ -35,6 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <xcb/xfixes.h> #include <xcb/xfixes.h>
#include <QDebug>
#include <QtGui/QPainter> #include <QtGui/QPainter>
#include <qmath.h> #include <qmath.h>
@ -96,11 +97,11 @@ SceneXrender::SceneXrender(Workspace* ws)
, init_ok(false) , init_ok(false)
{ {
if (!Xcb::Extensions::self()->isRenderAvailable()) { if (!Xcb::Extensions::self()->isRenderAvailable()) {
kError(1212) << "No XRender extension available"; qCritical() << "No XRender extension available";
return; return;
} }
if (!Xcb::Extensions::self()->isFixesRegionAvailable()) { if (!Xcb::Extensions::self()->isFixesRegionAvailable()) {
kError(1212) << "No XFixes v3+ extension available"; qCritical() << "No XFixes v3+ extension available";
return; return;
} }
initXRender(true); initXRender(true);
@ -135,12 +136,12 @@ void SceneXrender::initXRender(bool createOverlay)
ScopedCPointer<xcb_get_window_attributes_reply_t> attribs(xcb_get_window_attributes_reply(connection(), ScopedCPointer<xcb_get_window_attributes_reply_t> attribs(xcb_get_window_attributes_reply(connection(),
xcb_get_window_attributes_unchecked(connection(), m_overlayWindow->window()), NULL)); xcb_get_window_attributes_unchecked(connection(), m_overlayWindow->window()), NULL));
if (!attribs) { if (!attribs) {
kError(1212) << "Failed getting window attributes for overlay window"; qCritical() << "Failed getting window attributes for overlay window";
return; return;
} }
format = findFormatForVisual(attribs->visual); format = findFormatForVisual(attribs->visual);
if (format == 0) { if (format == 0) {
kError(1212) << "Failed to find XRender format for overlay window"; qCritical() << "Failed to find XRender format for overlay window";
return; return;
} }
front = xcb_generate_id(connection()); front = xcb_generate_id(connection());
@ -149,7 +150,7 @@ void SceneXrender::initXRender(bool createOverlay)
// create XRender picture for the root window // create XRender picture for the root window
format = findFormatForVisual(defaultScreen()->root_visual); format = findFormatForVisual(defaultScreen()->root_visual);
if (format == 0) { if (format == 0) {
kError(1212) << "Failed to find XRender format for root window"; qCritical() << "Failed to find XRender format for root window";
return; // error return; // error
} }
front = xcb_generate_id(connection()); front = xcb_generate_id(connection());

View file

@ -27,9 +27,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
// KDE // KDE
#include <KDE/KConfigGroup> #include <KDE/KConfigGroup>
#include <KDE/KDebug>
#include <Plasma/ConfigLoader> #include <Plasma/ConfigLoader>
// Qt // Qt
#include <QDebug>
#include <QFile> #include <QFile>
#include <QtScript/QScriptEngine> #include <QtScript/QScriptEngine>
#include <QtScript/QScriptValueIterator> #include <QtScript/QScriptValueIterator>
@ -53,7 +53,7 @@ QScriptValue kwinEffectScriptPrint(QScriptContext *context, QScriptEngine *engin
} }
result.append(context->argument(i).toString()); result.append(context->argument(i).toString());
} }
kDebug(1212) << script->scriptFile() << ":" << result; qDebug() << script->scriptFile() << ":" << result;
return engine->undefinedValue(); return engine->undefinedValue();
} }
@ -358,7 +358,7 @@ void fpx2FromScriptValue(const QScriptValue &value, KWin::FPx2 &fpx2)
QScriptValue value1 = value.property(QStringLiteral("value1")); QScriptValue value1 = value.property(QStringLiteral("value1"));
QScriptValue value2 = value.property(QStringLiteral("value2")); QScriptValue value2 = value.property(QStringLiteral("value2"));
if (!value1.isValid() || !value2.isValid() || !value1.isNumber() || !value2.isNumber()) { if (!value1.isValid() || !value2.isValid() || !value1.isNumber() || !value2.isNumber()) {
kDebug(1212) << "Cannot cast scripted FPx2 to C++"; qDebug() << "Cannot cast scripted FPx2 to C++";
fpx2 = FPx2(); fpx2 = FPx2();
return; return;
} }
@ -393,7 +393,7 @@ bool ScriptedEffect::init(const QString &effectName, const QString &pathToScript
{ {
QFile scriptFile(pathToScript); QFile scriptFile(pathToScript);
if (!scriptFile.open(QIODevice::ReadOnly)) { if (!scriptFile.open(QIODevice::ReadOnly)) {
kDebug(1212) << "Could not open script file: " << pathToScript; qDebug() << "Could not open script file: " << pathToScript;
return false; return false;
} }
m_effectName = effectName; m_effectName = effectName;
@ -463,13 +463,13 @@ bool ScriptedEffect::init(const QString &effectName, const QString &pathToScript
void ScriptedEffect::signalHandlerException(const QScriptValue &value) void ScriptedEffect::signalHandlerException(const QScriptValue &value)
{ {
if (value.isError()) { if (value.isError()) {
kDebug(1212) << "KWin Effect script encountered an error at [Line " << m_engine->uncaughtExceptionLineNumber() << "]"; qDebug() << "KWin Effect script encountered an error at [Line " << m_engine->uncaughtExceptionLineNumber() << "]";
kDebug(1212) << "Message: " << value.toString(); qDebug() << "Message: " << value.toString();
QScriptValueIterator iter(value); QScriptValueIterator iter(value);
while (iter.hasNext()) { while (iter.hasNext()) {
iter.next(); iter.next();
kDebug(1212) << " " << iter.name() << ": " << iter.value().toString(); qDebug() << " " << iter.name() << ": " << iter.value().toString();
} }
} }
} }

View file

@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../workspace.h" #include "../workspace.h"
// KDE // KDE
#include <KDE/KConfigGroup> #include <KDE/KConfigGroup>
#include <KDE/KDebug>
#include <KDE/KGlobal> #include <KDE/KGlobal>
#include <KDE/KPluginInfo> #include <KDE/KPluginInfo>
#include <KDE/KServiceTypeTrader> #include <KDE/KServiceTypeTrader>
@ -42,6 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QtDBus/QDBusConnection> #include <QtDBus/QDBusConnection>
#include <QtDBus/QDBusMessage> #include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusPendingCallWatcher> #include <QtDBus/QDBusPendingCallWatcher>
#include <QDebug>
#include <QFutureWatcher> #include <QFutureWatcher>
#include <QSettings> #include <QSettings>
#include <QtConcurrentRun> #include <QtConcurrentRun>
@ -83,7 +83,7 @@ QScriptValue kwinScriptReadConfig(QScriptContext *context, QScriptEngine *engine
return engine->undefinedValue(); return engine->undefinedValue();
} }
if (context->argumentCount() < 1 || context->argumentCount() > 2) { if (context->argumentCount() < 1 || context->argumentCount() > 2) {
kDebug(1212) << "Incorrect number of arguments"; qDebug() << "Incorrect number of arguments";
return engine->undefinedValue(); return engine->undefinedValue();
} }
const QString key = context->argument(0).toString(); const QString key = context->argument(0).toString();
@ -241,7 +241,7 @@ void KWin::AbstractScript::stop()
void KWin::AbstractScript::printMessage(const QString &message) void KWin::AbstractScript::printMessage(const QString &message)
{ {
kDebug(1212) << scriptFile().fileName() << ":" << message; qDebug() << scriptFile().fileName() << ":" << message;
emit print(message); emit print(message);
} }
@ -313,7 +313,7 @@ int KWin::AbstractScript::registerCallback(QScriptValue value)
void KWin::AbstractScript::slotPendingDBusCall(QDBusPendingCallWatcher* watcher) void KWin::AbstractScript::slotPendingDBusCall(QDBusPendingCallWatcher* watcher)
{ {
if (watcher->isError()) { if (watcher->isError()) {
kDebug(1212) << "Received D-Bus message is error"; qDebug() << "Received D-Bus message is error";
watcher->deleteLater(); watcher->deleteLater();
return; return;
} }
@ -500,9 +500,9 @@ void KWin::Script::sigException(const QScriptValue& exception)
{ {
QScriptValue ret = exception; QScriptValue ret = exception;
if (ret.isError()) { if (ret.isError()) {
kDebug(1212) << "defaultscript encountered an error at [Line " << m_engine->uncaughtExceptionLineNumber() << "]"; qDebug() << "defaultscript encountered an error at [Line " << m_engine->uncaughtExceptionLineNumber() << "]";
kDebug(1212) << "Message: " << ret.toString(); qDebug() << "Message: " << ret.toString();
kDebug(1212) << "-----------------"; qDebug() << "-----------------";
QScriptValueIterator iter(ret); QScriptValueIterator iter(ret);
while (iter.hasNext()) { while (iter.hasNext()) {
@ -573,7 +573,7 @@ void KWin::DeclarativeScript::run()
void KWin::DeclarativeScript::createComponent() void KWin::DeclarativeScript::createComponent()
{ {
if (m_component->isError()) { if (m_component->isError()) {
kDebug(1212) << "Component failed to load: " << m_component->errors(); qDebug() << "Component failed to load: " << m_component->errors();
} else { } else {
m_component->create(); m_component->create();
} }
@ -673,7 +673,7 @@ LoadScriptList KWin::Scripting::queryScriptsToLoad()
const QString scriptName = service->property(QStringLiteral("X-Plasma-MainScript")).toString(); const QString scriptName = service->property(QStringLiteral("X-Plasma-MainScript")).toString();
const QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(KWIN_NAME) + QStringLiteral("/scripts/") + pluginName + QStringLiteral("/contents/") + scriptName); const QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(KWIN_NAME) + QStringLiteral("/scripts/") + pluginName + QStringLiteral("/contents/") + scriptName);
if (file.isNull()) { if (file.isNull()) {
kDebug(1212) << "Could not find script file for " << pluginName; qDebug() << "Could not find script file for " << pluginName;
continue; continue;
} }
scriptsToLoad << qMakePair(javaScript, qMakePair(file, pluginName)); scriptsToLoad << qMakePair(javaScript, qMakePair(file, pluginName));

View file

@ -23,8 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "screens.h" #include "screens.h"
#include "workspace.h" #include "workspace.h"
#include <KDE/KDebug>
namespace KWin { namespace KWin {
namespace ScriptingClientModel { namespace ScriptingClientModel {

View file

@ -28,8 +28,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KDE/KAction> #include <KDE/KAction>
#include <KDE/KActionCollection> #include <KDE/KActionCollection>
#include <KDE/KDebug>
#include <KDE/KLocalizedString> #include <KDE/KLocalizedString>
#include <QDebug>
#include <QtScript/QScriptEngine> #include <QtScript/QScriptEngine>
namespace KWin namespace KWin
@ -111,7 +111,7 @@ QScriptValue globalShortcut(QScriptContext *context, QScriptEngine *engine)
return engine->undefinedValue(); return engine->undefinedValue();
} }
if (context->argumentCount() != 4) { if (context->argumentCount() != 4) {
kDebug(1212) << "Incorrect number of arguments! Expected: title, text, keySequence, callback"; qDebug() << "Incorrect number of arguments! Expected: title, text, keySequence, callback";
return engine->undefinedValue(); return engine->undefinedValue();
} }
KActionCollection* actionCollection = new KActionCollection(script); KActionCollection* actionCollection = new KActionCollection(script);

6
sm.cpp
View file

@ -30,9 +30,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "workspace.h" #include "workspace.h"
#include "client.h" #include "client.h"
#include <QDebug>
#include <QSocketNotifier> #include <QSocketNotifier>
#include <QSessionManager> #include <QSessionManager>
#include <kdebug.h>
#include <KDE/KApplication> #include <KDE/KApplication>
namespace KWin namespace KWin
@ -179,7 +179,7 @@ void Workspace::storeSubSession(const QString &name, QSet<QByteArray> sessionIds
if (!sessionIds.contains(sessionId)) if (!sessionIds.contains(sessionId))
continue; continue;
kDebug() << "storing" << sessionId; qDebug() << "storing" << sessionId;
count++; count++;
if (c->isActive()) if (c->isActive())
active_client = count; active_client = count;
@ -341,7 +341,7 @@ const char* Workspace::windowTypeToTxt(NET::WindowType type)
return window_type_names[ type + 1 ]; // +1 (unknown==-1) return window_type_names[ type + 1 ]; // +1 (unknown==-1)
if (type == -2) // undefined (not really part of NET::WindowType) if (type == -2) // undefined (not really part of NET::WindowType)
return "Undefined"; return "Undefined";
kFatal(1212) << "Unknown Window Type" ; qFatal("Unknown Window Type");
return NULL; return NULL;
} }

View file

@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "clientmodel.h" #include "clientmodel.h"
// Qt // Qt
#include <QApplication> #include <QApplication>
#include <QDebug>
#include <QtQml/QQmlContext> #include <QtQml/QQmlContext>
#include <QtQml/QQmlEngine> #include <QtQml/QQmlEngine>
#include <QDesktopWidget> #include <QDesktopWidget>
@ -33,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QtCore/QStandardPaths> #include <QtCore/QStandardPaths>
// include KDE // include KDE
#include <KDE/KDebug>
#include <KDE/KGlobal> #include <KDE/KGlobal>
#include <KDE/KIconEffect> #include <KDE/KIconEffect>
#include <KDE/KIconLoader> #include <KDE/KIconLoader>
@ -344,12 +344,12 @@ void DeclarativeView::updateQmlSource(bool force)
return; return;
} }
if (service->property(QStringLiteral("X-Plasma-API")).toString() != QStringLiteral("declarativeappletscript")) { if (service->property(QStringLiteral("X-Plasma-API")).toString() != QStringLiteral("declarativeappletscript")) {
kDebug(1212) << "Window Switcher Layout is no declarativeappletscript"; qDebug() << "Window Switcher Layout is no declarativeappletscript";
return; return;
} }
const QString file = desktopMode ? findDesktopSwitcherScriptFile(service) : findWindowSwitcherScriptFile(service); const QString file = desktopMode ? findDesktopSwitcherScriptFile(service) : findWindowSwitcherScriptFile(service);
if (file.isNull()) { if (file.isNull()) {
kDebug(1212) << "Could not find QML file for window switcher"; qDebug() << "Could not find QML file for window switcher";
return; return;
} }
rootObject()->setProperty("source", QUrl(file)); rootObject()->setProperty("source", QUrl(file));
@ -364,7 +364,7 @@ KService::Ptr DeclarativeView::findWindowSwitcher()
constraint = QStringLiteral("[X-KDE-PluginInfo-Name] == '%1'").arg(QStringLiteral("informative")); constraint = QStringLiteral("[X-KDE-PluginInfo-Name] == '%1'").arg(QStringLiteral("informative"));
offers = KServiceTypeTrader::self()->query(QStringLiteral("KWin/WindowSwitcher"), constraint); offers = KServiceTypeTrader::self()->query(QStringLiteral("KWin/WindowSwitcher"), constraint);
if (offers.isEmpty()) { if (offers.isEmpty()) {
kDebug(1212) << "could not find default window switcher layout"; qDebug() << "could not find default window switcher layout";
return KService::Ptr(); return KService::Ptr();
} }
} }
@ -380,7 +380,7 @@ KService::Ptr DeclarativeView::findDesktopSwitcher()
constraint = QStringLiteral("[X-KDE-PluginInfo-Name] == '%1'").arg(QStringLiteral("informative")); constraint = QStringLiteral("[X-KDE-PluginInfo-Name] == '%1'").arg(QStringLiteral("informative"));
offers = KServiceTypeTrader::self()->query(QStringLiteral("KWin/DesktopSwitcher"), constraint); offers = KServiceTypeTrader::self()->query(QStringLiteral("KWin/DesktopSwitcher"), constraint);
if (offers.isEmpty()) { if (offers.isEmpty()) {
kDebug(1212) << "could not find default desktop switcher layout"; qDebug() << "could not find default desktop switcher layout";
return KService::Ptr(); return KService::Ptr();
} }
} }

View file

@ -45,6 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "xcbutils.h" #include "xcbutils.h"
// Qt // Qt
#include <QAction> #include <QAction>
#include <QDebug>
#include <QX11Info> #include <QX11Info>
#include <QtDBus/QDBusConnection> #include <QtDBus/QDBusConnection>
// KDE // KDE
@ -52,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KConfig> #include <KConfig>
#include <KConfigGroup> #include <KConfigGroup>
#include <KDE/KAction> #include <KDE/KAction>
#include <KDebug>
#include <KDE/KIcon> #include <KDE/KIcon>
#include <KDE/KGlobal> #include <KDE/KGlobal>
#include <KLocalizedString> #include <KLocalizedString>
@ -704,7 +704,7 @@ void TabBox::hide(bool abort)
} }
emit tabBoxClosed(); emit tabBoxClosed();
if (isDisplayed()) if (isDisplayed())
kDebug(1212) << "Tab box was not properly closed by an effect"; qDebug() << "Tab box was not properly closed by an effect";
m_tabBox->hide(abort); m_tabBox->hide(abort);
Xcb::sync(); Xcb::sync();
} }
@ -874,7 +874,7 @@ void TabBox::grabbedKeyEvent(QKeyEvent* event)
static bool areKeySymXsDepressed(bool bAll, const uint keySyms[], int nKeySyms) { static bool areKeySymXsDepressed(bool bAll, const uint keySyms[], int nKeySyms) {
char keymap[32]; char keymap[32];
kDebug(125) << "areKeySymXsDepressed: " << (bAll ? "all of " : "any of ") << nKeySyms; qDebug() << "areKeySymXsDepressed: " << (bAll ? "all of " : "any of ") << nKeySyms;
XQueryKeymap(display(), keymap); XQueryKeymap(display(), keymap);
@ -888,7 +888,7 @@ static bool areKeySymXsDepressed(bool bAll, const uint keySyms[], int nKeySyms)
if (i < 0 || i >= 32) if (i < 0 || i >= 32)
return false; return false;
kDebug(125) << iKeySym << ": keySymX=0x" << QString::number(keySymX, 16) qDebug() << iKeySym << ": keySymX=0x" << QString::number(keySymX, 16)
<< " i=" << i << " mask=0x" << QString::number(mask, 16) << " i=" << i << " mask=0x" << QString::number(mask, 16)
<< " keymap[i]=0x" << QString::number(keymap[i], 16) << endl; << " keymap[i]=0x" << QString::number(keymap[i], 16) << endl;
@ -1371,7 +1371,7 @@ void TabBox::keyPress(int keyQt)
backwardShortcut = m_cutWalkThroughCurrentAppWindowsAlternativeReverse; backwardShortcut = m_cutWalkThroughCurrentAppWindowsAlternativeReverse;
break; break;
default: default:
kDebug(125) << "Invalid TabBoxMode"; qDebug() << "Invalid TabBoxMode";
return; return;
} }
forward = forwardShortcut.contains(keyQt); forward = forwardShortcut.contains(keyQt);
@ -1401,7 +1401,7 @@ void TabBox::keyPress(int keyQt)
} }
} }
if (forward || backward) { if (forward || backward) {
kDebug(125) << "== " << forwardShortcut.toString() qDebug() << "== " << forwardShortcut.toString()
<< " or " << backwardShortcut.toString() << endl; << " or " << backwardShortcut.toString() << endl;
KDEWalkThroughWindows(forward); KDEWalkThroughWindows(forward);
} }

View file

@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QX11Info> #include <QX11Info>
#include <X11/Xlib.h> #include <X11/Xlib.h>
// KDE // KDE
#include <KDebug>
#include <KProcess> #include <KProcess>
#include <KWindowSystem> #include <KWindowSystem>

View file

@ -26,10 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "workspace.h" #include "workspace.h"
#include "composite.h" #include "composite.h"
// Qt // Qt
#include <QDebug>
#include <QPainter> #include <QPainter>
#include <QQuickWindow> #include <QQuickWindow>
// KDE
#include <KDE/KDebug>
namespace KWin namespace KWin
{ {
@ -74,7 +73,7 @@ void AbstractThumbnailItem::findParentEffectWindow()
if (effects) { if (effects) {
QQuickWindow *qw = window(); QQuickWindow *qw = window();
if (!qw) { if (!qw) {
kDebug(1212) << "No QQuickWindow assigned yet"; qDebug() << "No QQuickWindow assigned yet";
return; return;
} }
if (auto *w = static_cast<EffectWindowImpl*>(effects->findWindow(qw->winId()))) { if (auto *w = static_cast<EffectWindowImpl*>(effects->findWindow(qw->winId()))) {

View file

@ -33,6 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "shadow.h" #include "shadow.h"
#include "xcbutils.h" #include "xcbutils.h"
#include <QDebug>
namespace KWin namespace KWin
{ {
@ -429,7 +431,7 @@ void Toplevel::getWmOpaqueRegion()
} }
XFree(data); XFree(data);
} else { } else {
kWarning(1212) << "XGetWindowProperty failed"; qWarning() << "XGetWindowProperty failed";
break; break;
} }
} while (bytes_after_return > 0); } while (bytes_after_return > 0);

View file

@ -1863,7 +1863,7 @@ void Workspace::slotInvertScreen()
continue; continue;
} }
if (gamma->size) { if (gamma->size) {
kDebug(1212) << "inverting screen using XRRSetCrtcGamma"; qDebug() << "inverting screen using XRRSetCrtcGamma";
const int half = gamma->size / 2 + 1; const int half = gamma->size / 2 + 1;
uint16_t *red = gamma.red(); uint16_t *red = gamma.red();
@ -1896,7 +1896,7 @@ void Workspace::slotInvertScreen()
green = new unsigned short[size]; green = new unsigned short[size];
blue = new unsigned short[size]; blue = new unsigned short[size];
if (XF86VidModeGetGammaRamp(display(), scrn, size, red, green, blue)) { if (XF86VidModeGetGammaRamp(display(), scrn, size, red, green, blue)) {
kDebug(1212) << "inverting screen using XF86VidModeSetGammaRamp"; qDebug() << "inverting screen using XF86VidModeSetGammaRamp";
const int half = size / 2 + 1; const int half = size / 2 + 1;
unsigned short swap; unsigned short swap;
for (int i = 0; i < half; ++i) { for (int i = 0; i < half; ++i) {
@ -1919,13 +1919,13 @@ void Workspace::slotInvertScreen()
//BEGIN effect plugin inversion - atm only works with OpenGL and has an overhead to it //BEGIN effect plugin inversion - atm only works with OpenGL and has an overhead to it
if (effects) { if (effects) {
if (Effect *inverter = static_cast<EffectsHandlerImpl*>(effects)->provides(Effect::ScreenInversion)) { if (Effect *inverter = static_cast<EffectsHandlerImpl*>(effects)->provides(Effect::ScreenInversion)) {
kDebug(1212) << "inverting screen using Effect plugin"; qDebug() << "inverting screen using Effect plugin";
QMetaObject::invokeMethod(inverter, "toggleScreenInversion", Qt::DirectConnection); QMetaObject::invokeMethod(inverter, "toggleScreenInversion", Qt::DirectConnection);
} }
} }
if (!succeeded) if (!succeeded)
kDebug(1212) << "sorry - neither Xrandr, nor XF86VidModeSetGammaRamp worked and there's no inversion supplying effect plugin either"; qDebug() << "sorry - neither Xrandr, nor XF86VidModeSetGammaRamp worked and there's no inversion supplying effect plugin either";
} }

View file

@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef KCMRULES #ifndef KCMRULES
#include <assert.h> #include <assert.h>
#include <kdebug.h> #include <QDebug>
#include <kkeyserver.h> #include <kkeyserver.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
@ -204,7 +204,7 @@ void ungrabXKeyboard()
{ {
if (!keyboard_grabbed) { if (!keyboard_grabbed) {
// grabXKeyboard() may fail sometimes, so don't fail, but at least warn anyway // grabXKeyboard() may fail sometimes, so don't fail, but at least warn anyway
kDebug(1212) << "ungrabXKeyboard() called but keyboard not grabbed!"; qDebug() << "ungrabXKeyboard() called but keyboard not grabbed!";
} }
keyboard_grabbed = false; keyboard_grabbed = false;
xcb_ungrab_keyboard(connection(), XCB_TIME_CURRENT_TIME); xcb_ungrab_keyboard(connection(), XCB_TIME_CURRENT_TIME);

View file

@ -796,7 +796,7 @@ bool Workspace::waitForCompositingSetup()
void Workspace::slotSettingsChanged(int category) void Workspace::slotSettingsChanged(int category)
{ {
kDebug(1212) << "Workspace::slotSettingsChanged()"; qDebug() << "Workspace::slotSettingsChanged()";
if (category == KGlobalSettings::SETTINGS_SHORTCUTS) if (category == KGlobalSettings::SETTINGS_SHORTCUTS)
m_userActionsMenu->discard(); m_userActionsMenu->discard();
} }
@ -808,7 +808,7 @@ KWIN_PROCEDURE(CheckBorderSizesProcedure, Client, cl->checkBorderSizes(true));
void Workspace::slotReconfigure() void Workspace::slotReconfigure()
{ {
kDebug(1212) << "Workspace::slotReconfigure()"; qDebug() << "Workspace::slotReconfigure()";
reconfigureTimer.stop(); reconfigureTimer.stop();
bool borderlessMaximizedWindows = options->borderlessMaximizedWindows(); bool borderlessMaximizedWindows = options->borderlessMaximizedWindows();

View file

@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/ *********************************************************************/
#include "xcbutils.h" #include "xcbutils.h"
#include "utils.h" #include "utils.h"
// KDE // Qt
#include <KDE/KDebug> #include <QDebug>
// xcb // xcb
#include <xcb/composite.h> #include <xcb/composite.h>
#include <xcb/damage.h> #include <xcb/damage.h>
@ -168,7 +168,7 @@ void Extensions::init()
if (m_sync.present) { if (m_sync.present) {
initVersion<xcb_sync_initialize_reply_t>(syncVersion, &xcb_sync_initialize_reply, &m_sync); initVersion<xcb_sync_initialize_reply_t>(syncVersion, &xcb_sync_initialize_reply, &m_sync);
} }
kDebug(1212) << "Extensions: shape: 0x" << QString::number(m_shape.version, 16) qDebug() << "Extensions: shape: 0x" << QString::number(m_shape.version, 16)
<< " composite: 0x" << QString::number(m_composite.version, 16) << " composite: 0x" << QString::number(m_composite.version, 16)
<< " render: 0x" << QString::number(m_render.version, 16) << " render: 0x" << QString::number(m_render.version, 16)
<< " fixes: 0x" << QString::number(m_fixes.version, 16) << " fixes: 0x" << QString::number(m_fixes.version, 16)

View file

@ -23,8 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kwinglobals.h> #include <kwinglobals.h>
#include "utils.h" #include "utils.h"
#include <KDE/KDebug>
#include <QRect> #include <QRect>
#include <QRegion> #include <QRegion>
#include <QVector> #include <QVector>
@ -747,7 +745,6 @@ static inline void sync()
xcb_generic_error_t *error = nullptr; xcb_generic_error_t *error = nullptr;
ScopedCPointer<xcb_get_input_focus_reply_t> sync(xcb_get_input_focus_reply(c, cookie, &error)); ScopedCPointer<xcb_get_input_focus_reply_t> sync(xcb_get_input_focus_reply(c, cookie, &error));
if (error) { if (error) {
kWarning(1212) << "Sync error" << kBacktrace();
free(error); free(error);
} }
} }