And we got rid of KDebug

Usages of kBacktrace got dropped.
master
Martin Gräßlin 11 years ago
parent add219d5bc
commit 57905c0cc2

@ -45,6 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "rules.h"
#include "screens.h"
#include "useractions.h"
#include <QDebug>
#include <QX11Info>
namespace KWin
@ -382,7 +383,7 @@ void Workspace::takeActivity(Client* c, int flags, bool handled)
if (c->tabGroup() && c->tabGroup()->current() != c)
c->tabGroup()->setCurrent(c);
if (!c->isShown(true)) { // shouldn't happen, call activateClient() if needed
kWarning(1212) << "takeActivity: not shown" ;
qWarning() << "takeActivity: not shown" ;
return;
}
c->takeActivity(flags, handled);
@ -573,18 +574,18 @@ bool Workspace::allowClientActivation(const KWin::Client *c, xcb_timestamp_t tim
if (!ignore_desktop && !c->isOnCurrentDesktop())
return false; // allow only with level == 0
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
}
// TODO window urgency -> return true?
if (Client::belongToSameApplication(c, ac, true)) {
kDebug(1212) << "Activation: Belongs to active application";
qDebug() << "Activation: Belongs to active application";
return true;
}
if (level == 3) // high
return false;
if (time == -1U) { // no time known
kDebug(1212) << "Activation: No timestamp at all";
qDebug() << "Activation: No timestamp at all";
if (level == 1) // low
return true;
// 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
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;
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
return false;
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
}
// TODO window urgency -> return true?
if (Client::belongToSameApplication(c, ac, true)) {
kDebug(1212) << "Raising: Belongs to active application";
qDebug() << "Raising: Belongs to active application";
return true;
}
if (level == 3) // high
return false;
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;
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();
}
}
kDebug(1212) << "User timestamp, ASN:" << time;
qDebug() << "User timestamp, ASN:" << time;
if (time == -1U) {
// The window doesn't have any timestamp.
// 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
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
}
}
@ -773,7 +774,7 @@ xcb_timestamp_t Client::readUserTimeMapTimestamp(const KStartupInfoId *asn_id, c
return -1U;
time = readUserCreationTime();
}
kDebug(1212) << "User timestamp, final:" << this << ":" << time;
qDebug() << "User timestamp, final:" << this << ":" << time;
return time;
}

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

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

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

@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "client_machine.h"
// KWin
#include "utils.h"
// KDE
#include <KDE/KDebug>
// Qt
#include <QtConcurrentRun>
#include <QFutureWatcher>
@ -124,7 +122,7 @@ bool GetAddrInfo::resolved(QFutureWatcher< int >* watcher)
return false;
}
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;
deleteLater();
return false;

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

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

@ -22,13 +22,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kdebug.h>
#include <kcomponentdata.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kglobal.h>
#include <QtDBus/QtDBus>
#include <QtCore/QStandardPaths>
#include <QDebug>
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 ] ));
if( file.isEmpty())
{
kWarning(1212) << "File " << argv[ 1 ] << " not found!" ;
qWarning() << "File " << argv[ 1 ] << " not found!" ;
return 1;
}
KConfig src_cfg( file );

@ -26,6 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "paintredirector.h"
#include "shadow.h"
#include <QDebug>
namespace KWin
{
@ -48,7 +50,7 @@ Deleted::Deleted()
Deleted::~Deleted()
{
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);
workspace()->removeDeleted(this);
deleteEffectWindow();

@ -48,6 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "workspace.h"
#include "kwinglutils.h"
#include <QDebug>
#include <QFile>
#include <QFutureWatcher>
#include <QtConcurrentRun>
@ -55,7 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QDBusPendingCallWatcher>
#include <QStandardPaths>
#include <KDE/KDebug>
#include <KDE/KLibrary>
#include <KDE/KDesktopFile>
#include <KDE/KConfigGroup>
@ -1295,7 +1295,7 @@ KLibrary* EffectsHandlerImpl::findEffectLibrary(KService* service)
libname.replace(QStringLiteral("kwin"), QStringLiteral(KWIN_NAME));
KLibrary* library = new KLibrary(libname);
if (!library) {
kError(1212) << "couldn't open library for effect '" <<
qCritical() << "couldn't open library for effect '" <<
service->name() << "'" << endl;
return 0;
}
@ -1337,24 +1337,24 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
m_compositor->addRepaintFull();
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
for (QVector< EffectPair >::const_iterator it = loaded_effects.constBegin(); it != loaded_effects.constEnd(); ++it) {
if ((*it).first == name) {
kDebug(1212) << "EffectsHandler::loadEffect : Effect already loaded : " << name;
qDebug() << "EffectsHandler::loadEffect : Effect already loaded : " << name;
return true;
}
}
kDebug(1212) << "Trying to load " << name;
qDebug() << "Trying to load " << name;
QString internalname = name.toLower();
QString constraint = QStringLiteral("[X-KDE-PluginInfo-Name] == '%1'").arg(internalname);
KService::List offers = KServiceTypeTrader::self()->query(QStringLiteral("KWin/Effect"), constraint);
if (offers.isEmpty()) {
kError(1212) << "Couldn't find effect " << name << endl;
qCritical() << "Couldn't find effect " << name << endl;
return false;
}
KService::Ptr service = offers.first();
@ -1372,7 +1372,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
QString version_symbol = QStringLiteral("effect_version_") + name;
KLibrary::void_function_ptr version_func = library->resolveFunction(version_symbol.toAscii().constData());
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;
return false;
}
@ -1383,7 +1383,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
if (version > KWIN_EFFECT_API_VERSION
|| (version >> 8) != KWIN_EFFECT_API_VERSION_MAJOR
|| (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;
return false;
}
@ -1401,7 +1401,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
typedef bool (*t_supportedfunc)();
t_supportedfunc supported = reinterpret_cast<t_supportedfunc>(supported_func);
if (!supported()) {
kWarning(1212) << "EffectsHandler::loadEffect : Effect " << name << " is not supported" ;
qWarning() << "EffectsHandler::loadEffect : Effect " << name << " is not supported" ;
library->unload();
return false;
}
@ -1418,7 +1418,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
}
if (!create_func) {
kError(1212) << "EffectsHandler::loadEffect : effect_create function not found" << endl;
qCritical() << "EffectsHandler::loadEffect : effect_create function not found" << endl;
library->unload();
return false;
}
@ -1432,7 +1432,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
QStringList dependencies = plugininfo.dependencies();
foreach (const QString & depName, dependencies) {
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();
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 QString scriptName = df.desktopGroup().readEntry<QString>(QStringLiteral("X-Plasma-MainScript"), QString());
if (scriptName.isEmpty()) {
kDebug(1212) << "X-Plasma-MainScript not set";
qDebug() << "X-Plasma-MainScript not set";
return false;
}
const QString scriptFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(KWIN_NAME) + QStringLiteral("/effects/") + name + QStringLiteral("/contents/") + scriptName);
if (scriptFile.isNull()) {
kDebug(1212) << "Could not locate the effect script";
qDebug() << "Could not locate the effect script";
return false;
}
ScriptedEffect *effect = ScriptedEffect::create(name, scriptFile);
if (!effect) {
kDebug(1212) << "Could not initialize scripted effect: " << name;
qDebug() << "Could not initialize scripted effect: " << name;
return false;
}
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) {
if (it.value().first == name) {
kDebug(1212) << "EffectsHandler::unloadEffect : Unloading Effect : " << name;
qDebug() << "EffectsHandler::unloadEffect : Unloading Effect : " << name;
if (activeFullScreenEffect() == it.value().second) {
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)
@ -1542,9 +1542,9 @@ void EffectsHandlerImpl::effectsChanged()
{
loaded_effects.clear();
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) {
// kDebug(1212) << effect.first;
// qDebug() << effect.first;
loaded_effects.append(effect);
}
m_activeEffects.reserve(loaded_effects.count());

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

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

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

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

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

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

@ -24,8 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "xcbutils.h"
// kwin libs
#include <kwinglplatform.h>
// KDE
#include <KDE/KDebug>
// Qt
#include <QDebug>
namespace KWin
{
@ -101,7 +101,7 @@ void EglOnXBackend::init()
gs_tripleBufferNeedsDetection = false;
m_swapProfiler.init();
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) {
// check if swap interval 1 is supported
@ -109,7 +109,7 @@ void EglOnXBackend::init()
eglGetConfigAttrib(dpy, config, EGL_MAX_SWAP_INTERVAL, &val);
if (val >= 1) {
if (eglSwapInterval(dpy, 1)) {
kDebug(1212) << "Enabled v-sync";
qDebug() << "Enabled v-sync";
setSyncsToVBlank(true);
const QByteArray tripleBuffer = qgetenv("KWIN_TRIPLE_BUFFER");
if (!tripleBuffer.isEmpty()) {
@ -119,7 +119,7 @@ void EglOnXBackend::init()
gs_tripleBufferNeedsDetection = gs_tripleBufferUndetected;
}
} 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 {
// 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
* 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. */
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);
}
}
@ -150,7 +150,7 @@ bool EglOnXBackend::initRenderingContext()
eglBindAPI(EGL_OPENGL_ES_API);
#else
if (eglBindAPI(EGL_OPENGL_API) == EGL_FALSE) {
kError(1212) << "bind OpenGL API failed";
qCritical() << "bind OpenGL API failed";
return false;
}
#endif
@ -158,7 +158,7 @@ bool EglOnXBackend::initRenderingContext()
initBufferConfigs();
if (!overlayWindow()->create()) {
kError(1212) << "Could not get overlay window";
qCritical() << "Could not get overlay window";
return false;
} else {
overlayWindow()->setup(None);
@ -197,20 +197,20 @@ bool EglOnXBackend::initRenderingContext()
#endif
if (ctx == EGL_NO_CONTEXT) {
kError(1212) << "Create Context failed";
qCritical() << "Create Context failed";
return false;
}
if (eglMakeCurrent(dpy, surface, surface, ctx) == EGL_FALSE) {
kError(1212) << "Make Context Current failed";
qCritical() << "Make Context Current failed";
return false;
}
kDebug(1212) << "EGL version: " << major << "." << minor;
qDebug() << "EGL version: " << major << "." << minor;
EGLint error = eglGetError();
if (error != EGL_SUCCESS) {
kWarning(1212) << "Error occurred while creating context " << error;
qWarning() << "Error occurred while creating context " << error;
return false;
}
@ -237,13 +237,13 @@ bool EglOnXBackend::initBufferConfigs()
EGLint count;
EGLConfig configs[1024];
if (eglChooseConfig(dpy, config_attribs, configs, 1024, &count) == EGL_FALSE) {
kError(1212) << "choose config failed";
qCritical() << "choose config failed";
return false;
}
Xcb::WindowAttributes attribs(rootWindow());
if (!attribs) {
kError(1212) << "Failed to get window attributes of root window";
qCritical() << "Failed to get window attributes of root window";
return false;
}
@ -251,7 +251,7 @@ bool EglOnXBackend::initBufferConfigs()
for (int i = 0; i < count; i++) {
EGLint val;
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) {
config = configs[i];
@ -285,7 +285,7 @@ void EglOnXBackend::present()
if (qstrcmp(qgetenv("__GL_YIELD"), "USLEEP")) {
options->setGlPreferBufferSwap(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"
"Preferably, enable the TripleBuffer Option in the xorg.conf Device\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);
if (EGL_NO_IMAGE_KHR == m_image) {
kDebug(1212) << "failed to create egl image";
qDebug() << "failed to create egl image";
q->unbind();
q->discard();
return false;

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

@ -45,6 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef KWIN_BUILD_SCREENEDGES
#include "screenedge.h"
#endif
#include <QDebug>
#include <QDesktopWidget>
#include <QPainter>
#include <QVarLengthArray>
@ -126,7 +127,7 @@ void Workspace::updateClientArea(bool force)
const Screens *s = Screens::self();
int nscreens = s->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< StrutRects > new_rmoveareas(numberOfDesktops + 1);
QVector< QVector< QRect > > new_sareas(numberOfDesktops + 1);
@ -199,7 +200,7 @@ void Workspace::updateClientArea(bool force)
for (int iS = 0;
iS < nscreens;
iS ++)
kDebug(1212) << "new_sarea: " << new_sareas[ i ][ iS ];
qDebug() << "new_sarea: " << new_sareas[ i ][ iS ];
}
#endif
@ -250,7 +251,7 @@ void Workspace::updateClientArea(bool force)
oldrestrictedmovearea.clear(); // reset, no longer valid or needed
}
kDebug(1212) << "Done.";
qDebug() << "Done.";
}
void Workspace::updateClientArea()
@ -1262,8 +1263,7 @@ QSize Client::sizeForClientSize(const QSize& wsize, Sizemode mode, bool noframe)
int w = wsize.width();
int h = wsize.height();
if (w < 1 || h < 1) {
kWarning(1212) << "sizeForClientSize() with empty size!" ;
kWarning(1212) << kBacktrace() ;
qWarning() << "sizeForClientSize() with empty size!" ;
}
if (w < 1) w = 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
// 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() & MaximizeHorizontal);
@ -1635,11 +1635,11 @@ void Client::configureRequest(int value_mask, int rx, int ry, int rw, int rh, in
}
if (ignore) {
kDebug(1212) << "DENIED";
qDebug() << "DENIED";
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
gravity = xSizeHint.win_gravity;
@ -1732,8 +1732,7 @@ void Client::resizeWithChecks(int w, int h, ForceGeometry_t force)
assert(!shade_geometry_change);
if (isShade()) {
if (h == border_top + border_bottom) {
kWarning(1212) << "Shaded geometry passed for size:" ;
kWarning(1212) << kBacktrace() ;
qWarning() << "Shaded geometry passed for size:" ;
}
}
int newx = x();
@ -1890,8 +1889,7 @@ void Client::setGeometry(int x, int y, int w, int h, ForceGeometry_t force)
; // nothing
else if (isShade()) {
if (h == border_top + border_bottom) {
kDebug(1212) << "Shaded geometry passed for size:";
kDebug(1212) << kBacktrace();
qDebug() << "Shaded geometry passed for size:";
} else {
client_size = QSize(w - border_left - border_right, 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);
if (block_geometry_updates == 0 && g != rules()->checkGeometry(g)) {
kDebug(1212) << "forced geometry fail:" << g << ":" << rules()->checkGeometry(g);
kDebug(1212) << kBacktrace();
qDebug() << "forced geometry fail:" << g << ":" << rules()->checkGeometry(g);
}
if (force == NormalGeometrySet && geom == g && pending_geometry_update == PendingGeometryNone)
return;
@ -1981,8 +1978,7 @@ void Client::plainResize(int w, int h, ForceGeometry_t force)
; // nothing
else if (isShade()) {
if (h == border_top + border_bottom) {
kDebug(1212) << "Shaded geometry passed for size:";
kDebug(1212) << kBacktrace();
qDebug() << "Shaded geometry passed for size:";
} else {
client_size = QSize(w - border_left - border_right, 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);
if (block_geometry_updates == 0 && s != rules()->checkSize(s)) {
kDebug(1212) << "forced size fail:" << s << ":" << rules()->checkSize(s);
kDebug(1212) << kBacktrace();
qDebug() << "forced size fail:" << s << ":" << rules()->checkSize(s);
}
// resuming geometry updates is handled only in setGeometry()
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);
QPoint p(x, y);
if (block_geometry_updates == 0 && p != rules()->checkPosition(p)) {
kDebug(1212) << "forced position fail:" << p << ":" << rules()->checkPosition(p);
kDebug(1212) << kBacktrace();
qDebug() << "forced position fail:" << p << ":" << rules()->checkPosition(p);
}
if (force == NormalGeometrySet && geom.topLeft() == p)
return;
@ -2458,7 +2452,7 @@ void Client::updateFullscreenMonitors(NETFullscreenMonitors topology)
topology.bottom >= nscreens ||
topology.left >= 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;
}

@ -32,8 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "overlaywindow.h"
// kwin libs
#include <kwinglplatform.h>
// KDE
#include <KDE/KDebug>
// Qt
#include <QDebug>
namespace KWin
{
@ -142,7 +142,7 @@ void GlxBackend::init()
setIsDirectRendering(bool(glXIsDirect(display(), ctx)));
kDebug(1212) << "Direct rendering:" << isDirectRendering() << endl;
qDebug() << "Direct rendering:" << isDirectRendering() << endl;
}
bool GlxBackend::initRenderingContext()
@ -200,12 +200,12 @@ bool GlxBackend::initRenderingContext()
ctx = glXCreateNewContext(display(), fbconfig, GLX_RGBA_TYPE, NULL, direct);
if (!ctx) {
kDebug(1212) << "Failed to create an OpenGL context.";
qDebug() << "Failed to create an OpenGL context.";
return false;
}
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);
ctx = 0;
return false;
@ -230,14 +230,14 @@ bool GlxBackend::initBuffer()
overlayWindow()->setup(window);
XFree(visual);
} else {
kError(1212) << "Failed to create overlay window";
qCritical() << "Failed to create overlay window";
return false;
}
int vis_buffer;
glXGetFBConfigAttrib(display(), fbconfig, GLX_VISUAL_ID, &vis_buffer);
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);
return true;
@ -268,7 +268,7 @@ bool GlxBackend::initFbConfig()
}
if (fbconfig == NULL) {
kError(1212) << "Failed to find a usable framebuffer configuration";
qCritical() << "Failed to find a usable framebuffer configuration";
return false;
}
@ -296,7 +296,7 @@ bool GlxBackend::initDrawableConfigs()
GLXFBConfig *configs = glXChooseFBConfig(display(), DefaultScreen(display()), attribs, &count);
if (count < 1) {
kError(1212) << "Could not find any usable framebuffer configurations.";
qCritical() << "Could not find any usable framebuffer configurations.";
return false;
}
@ -366,12 +366,12 @@ bool GlxBackend::initDrawableConfigs()
XFree(configs);
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;
}
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;
}
@ -382,7 +382,7 @@ bool GlxBackend::initDrawableConfigs()
int vis_drawable = 0;
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;
@ -439,7 +439,7 @@ void GlxBackend::present()
if (qstrcmp(qgetenv("__GL_YIELD"), "USLEEP")) {
options->setGlPreferBufferSwap(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"
"Preferably, enable the TripleBuffer Option in the xorg.conf Device\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)
return false;
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;
return false;
}

@ -35,6 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <assert.h>
#include <kstartupinfo.h>
#include <QDebug>
#include <QX11Info>
@ -71,15 +72,15 @@ bool performTransiencyCheck()
if ((*it1)->deleting)
continue;
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;
} 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;
}
if (!(*it1)->isTransient()) {
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;
}
} else {
@ -90,8 +91,8 @@ bool performTransiencyCheck()
if (transiencyCheckNonExistent
&& !Workspace::self()->clients.contains(*it2)
&& !Workspace::self()->desktops.contains(*it2)) {
kDebug(1212) << "TC:" << *it1 << " has non-existent main client ";
kDebug(1212) << "TC2:" << *it2; // this may crash
qDebug() << "TC:" << *it1 << " has non-existent main client ";
qDebug() << "TC2:" << *it2; // this may crash
ret = false;
continue;
}
@ -108,8 +109,8 @@ bool performTransiencyCheck()
if (transiencyCheckNonExistent
&& !Workspace::self()->clients.contains(*it2)
&& !Workspace::self()->desktops.contains(*it2)) {
kDebug(1212) << "TC:" << *it1 << " has non-existent transient ";
kDebug(1212) << "TC2:" << *it2; // this may crash
qDebug() << "TC:" << *it1 << " has non-existent transient ";
qDebug() << "TC2:" << *it2; // this may crash
ret = false;
continue;
}
@ -128,7 +129,7 @@ bool performTransiencyCheck()
it2 != members.constEnd();
++it2) {
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;
}
}
@ -153,8 +154,8 @@ static void checkTransiency()
{
if (--transiencyCheck == 0) {
if (!performTransiencyCheck()) {
kDebug(1212) << "BT:" << transiencyCheckStartBt << endl;
kDebug(1212) << "CLIENT:" << transiencyCheckClient << endl;
qDebug() << "BT:" << transiencyCheckStartBt << endl;
qDebug() << "CLIENT:" << transiencyCheckClient << endl;
abort();
}
transiencyCheckNonExistent = false;
@ -268,15 +269,15 @@ void Group::addMember(Client* member_P)
{
TRANSIENCY_CHECK(member_P);
_members.append(member_P);
// kDebug(1212) << "GROUPADD:" << this << ":" << member_P;
// kDebug(1212) << kBacktrace();
// qDebug() << "GROUPADD:" << this << ":" << member_P;
// qDebug() << kBacktrace();
}
void Group::removeMember(Client* member_P)
{
TRANSIENCY_CHECK(member_P);
// kDebug(1212) << "GROUPREMOVE:" << this << ":" << member_P;
// kDebug(1212) << kBacktrace();
// qDebug() << "GROUPREMOVE:" << this << ":" << member_P;
// qDebug() << kBacktrace();
Q_ASSERT(_members.contains(member_P));
_members.removeAll(member_P);
// there are cases when automatic deleting of groups must be delayed,
@ -639,28 +640,28 @@ void Client::removeFromMainClients()
void Client::cleanGrouping()
{
TRANSIENCY_CHECK(this);
// kDebug(1212) << "CLEANGROUPING:" << this;
// qDebug() << "CLEANGROUPING:" << this;
// for ( ClientList::ConstIterator it = group()->members().begin();
// it != group()->members().end();
// ++it )
// kDebug(1212) << "CL:" << *it;
// qDebug() << "CL:" << *it;
// ClientList mains;
// mains = mainClients();
// for ( ClientList::ConstIterator it = mains.begin();
// it != mains.end();
// ++it )
// kDebug(1212) << "MN:" << *it;
// qDebug() << "MN:" << *it;
removeFromMainClients();
// kDebug(1212) << "CLEANGROUPING2:" << this;
// qDebug() << "CLEANGROUPING2:" << this;
// for ( ClientList::ConstIterator it = group()->members().begin();
// it != group()->members().end();
// ++it )
// kDebug(1212) << "CL2:" << *it;
// qDebug() << "CL2:" << *it;
// mains = mainClients();
// for ( ClientList::ConstIterator it = mains.begin();
// it != mains.end();
// ++it )
// kDebug(1212) << "MN2:" << *it;
// qDebug() << "MN2:" << *it;
for (ClientList::ConstIterator it = transients_list.constBegin();
it != transients_list.constEnd();
) {
@ -670,16 +671,16 @@ void Client::cleanGrouping()
} else
++it;
}
// kDebug(1212) << "CLEANGROUPING3:" << this;
// qDebug() << "CLEANGROUPING3:" << this;
// for ( ClientList::ConstIterator it = group()->members().begin();
// it != group()->members().end();
// ++it )
// kDebug(1212) << "CL3:" << *it;
// qDebug() << "CL3:" << *it;
// mains = mainClients();
// for ( ClientList::ConstIterator it = mains.begin();
// it != mains.end();
// ++it )
// kDebug(1212) << "MN3:" << *it;
// qDebug() << "MN3:" << *it;
// HACK
// removeFromMainClients() did remove 'this' from transient
// lists of all group members, but then made windows that
@ -692,11 +693,11 @@ void Client::cleanGrouping()
it != group_members.constEnd();
++it)
(*it)->removeTransient(this);
// kDebug(1212) << "CLEANGROUPING4:" << this;
// qDebug() << "CLEANGROUPING4:" << this;
// for ( ClientList::ConstIterator it = group_members.begin();
// it != group_members.end();
// ++it )
// kDebug(1212) << "CL4:" << *it;
// qDebug() << "CL4:" << *it;
}
// 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
// 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();
}
// 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 (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;
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;
loop_pos = pos->m_transientForId;
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();
}
}
@ -829,19 +830,19 @@ void Client::addTransient(Client* cl)
transients_list.append(cl);
if (workspace()->mostRecentlyActivatedClient() == this && cl->isModal())
check_active_modal = true;
// kDebug(1212) << "ADDTRANS:" << this << ":" << cl;
// kDebug(1212) << kBacktrace();
// qDebug() << "ADDTRANS:" << this << ":" << cl;
// qDebug() << kBacktrace();
// for ( ClientList::ConstIterator it = transients_list.begin();
// it != transients_list.end();
// ++it )
// kDebug(1212) << "AT:" << (*it);
// qDebug() << "AT:" << (*it);
}
void Client::removeTransient(Client* cl)
{
TRANSIENCY_CHECK(this);
// kDebug(1212) << "REMOVETRANS:" << this << ":" << cl;
// kDebug(1212) << kBacktrace();
// qDebug() << "REMOVETRANS:" << this << ":" << cl;
// qDebug() << kBacktrace();
transients_list.removeAll(cl);
// cl is transient for this, but this is going away
// make cl group transient

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

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

@ -37,11 +37,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KDE/KConfig>
#include <KDE/KConfigGroup>
#include <KDE/KCrash>
#include <KDE/KDebug>
#include <KDE/KGlobal>
#include <KDE/KLocalizedString>
// Qt
#include <qplatformdefs.h>
#include <QDebug>
#include <QComboBox>
#include <qcommandlineparser.h>
#include <QDialog>
@ -233,10 +233,10 @@ void Application::start()
else
::exit(1);
if (cmd.length() > 500) {
kDebug(1212) << "Command is too long, truncating";
qDebug() << "Command is too long, truncating";
cmd = cmd.left(500);
}
kDebug(1212) << "Starting" << cmd << "and exiting";
qDebug() << "Starting" << cmd << "and exiting";
char buf[1024];
sprintf(buf, "%s &", cmd.toAscii().data());
system(buf);
@ -244,7 +244,7 @@ void Application::start()
}
if (crashes >= 2) {
// 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");
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
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;
if (KWin::screen_number == 0)

@ -28,6 +28,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "decorations.h"
#include "virtualdesktops.h"
#include "workspace.h"
// Qt
#include <QDebug>
namespace KWin
{
@ -48,7 +50,7 @@ RootInfo *RootInfo::create()
ScopedCPointer<xcb_generic_error_t> error(xcb_request_check(connection(),
xcb_configure_window_checked(connection(), supportWindow, XCB_CONFIG_WINDOW_STACK_MODE, lowerValues)));
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] = {

@ -73,7 +73,7 @@ int currentRefreshRate()
vtotal *= 2;
if (modeline.htotal*vtotal) // BUG 313996
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)
@ -93,7 +93,7 @@ int currentRefreshRate()
rate = -1;
else
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
else if (rate > 1000)
rate = 1000;
kDebug(1212) << "Vertical Refresh rate " << rate << "Hz";
qDebug() << "Vertical Refresh rate " << rate << "Hz";
return rate;
}
@ -905,24 +905,24 @@ bool Options::loadCompositingConfig (bool force)
if (const char *c = getenv("KWIN_COMPOSE")) {
switch(c[0]) {
case 'O':
kDebug(1212) << "Compositing forced to OpenGL mode by environment variable";
qDebug() << "Compositing forced to OpenGL mode by environment variable";
compositingMode = OpenGLCompositing;
useCompositing = true;
break;
case 'X':
kDebug(1212) << "Compositing forced to XRender mode by environment variable";
qDebug() << "Compositing forced to XRender mode by environment variable";
compositingMode = XRenderCompositing;
useCompositing = true;
break;
case 'N':
if (getenv("KDE_FAILSAFE"))
kDebug(1212) << "Compositing disabled forcefully by KDE failsafe mode";
qDebug() << "Compositing disabled forcefully by KDE failsafe mode";
else
kDebug(1212) << "Compositing disabled forcefully by environment variable";
qDebug() << "Compositing disabled forcefully by environment variable";
compositingMode = NoCompositing;
break;
default:
kDebug(1212) << "Unknown KWIN_COMPOSE mode set, ignoring";
qDebug() << "Unknown KWIN_COMPOSE mode set, ignoring";
break;
}
}

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

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

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

@ -812,20 +812,20 @@ void WindowPixmap::create()
Xcb::WindowAttributes windowAttributes(toplevel()->frameId());
Xcb::WindowGeometry windowGeometry(toplevel()->frameId());
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);
return;
}
// check that the received pixmap is valid and actually matches what we
// know about the window (i.e. size)
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);
return;
}
if (!windowGeometry ||
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);
return;
}

@ -97,7 +97,7 @@ OpenGLBackend::~OpenGLBackend()
void OpenGLBackend::setFailed(const QString &reason)
{
kWarning(1212) << "Creating the OpenGL rendering failed: " << reason;
qWarning() << "Creating the OpenGL rendering failed: " << reason;
m_failed = true;
}
@ -128,13 +128,13 @@ SceneOpenGL::SceneOpenGL(Workspace* ws, OpenGLBackend *backend)
#ifndef KWIN_HAVE_OPENGLES
if (!hasGLExtension(QStringLiteral("GL_ARB_texture_non_power_of_two"))
&& !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;
return; // error
}
#endif
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;
return;
}
@ -183,7 +183,7 @@ SceneOpenGL *SceneOpenGL::createScene()
// check environment variable
if (qstrcmp(envOpenGLInterface, "egl") == 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;
}
#endif
@ -238,9 +238,9 @@ SceneOpenGL *SceneOpenGL::createScene()
#endif
if (!scene) {
if (GLPlatform::instance()->recommendedCompositor() == XRenderCompositing) {
kError(1212) << "OpenGL driver recommends XRender based compositing. Falling back to XRender.";
kError(1212) << "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() << "OpenGL driver recommends XRender based compositing. Falling back to XRender.";
qCritical() << "To overwrite the detection use the environment variable KWIN_COMPOSE";
qCritical() << "For more information see http://community.kde.org/KWin/Environment_Variables#KWIN_COMPOSE";
QTimer::singleShot(0, Compositor::self(), SLOT(fallbackToXRenderCompositing()));
}
delete backend;
@ -303,15 +303,15 @@ void SceneOpenGL::handleGraphicsReset(GLenum status)
{
switch (status) {
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;
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;
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;
default:
@ -325,7 +325,7 @@ void SceneOpenGL::handleGraphicsReset(GLenum status)
while (timer.elapsed() < 10000 && glGetGraphicsResetStatus() != GL_NO_ERROR)
usleep(50);
kDebug(1212) << "Attempting to reset compositing.";
qDebug() << "Attempting to reset compositing.";
QMetaObject::invokeMethod(this, "resetCompositing", Qt::QueuedConnection);
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");
if (!forceEnv.isEmpty()) {
if (qstrcmp(forceEnv, "O2") == 0) {
kDebug(1212) << "OpenGL 2 compositing enforced by environment variable";
qDebug() << "OpenGL 2 compositing enforced by environment variable";
return true;
} else {
// OpenGL 2 disabled by environment variable
@ -618,13 +618,13 @@ bool SceneOpenGL2::supported(OpenGLBackend *backend)
return false;
}
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
return false;
#endif
}
if (options->isGlLegacy()) {
kDebug(1212) << "OpenGL 2 disabled by config option";
qDebug() << "OpenGL 2 disabled by config option";
return false;
}
return true;
@ -640,14 +640,14 @@ SceneOpenGL2::SceneOpenGL2(OpenGLBackend *backend)
return;
}
// Initialize color correction before the shaders
kDebug(1212) << "Color correction:" << options->isColorCorrected();
qDebug() << "Color correction:" << options->isColorCorrected();
m_colorCorrection->setEnabled(options->isColorCorrected());
connect(m_colorCorrection, SIGNAL(changed()), Compositor::self(), SLOT(addRepaintFull()));
connect(m_colorCorrection, SIGNAL(errorOccured()), options, SLOT(setColorCorrected()), Qt::QueuedConnection);
connect(options, SIGNAL(colorCorrectedChanged()), this, SLOT(slotColorCorrectedChanged()), Qt::QueuedConnection);
if (!ShaderManager::instance()->isValid()) {
kDebug(1212) << "No Scene Shaders available";
qDebug() << "No Scene Shaders available";
init_ok = false;
return;
}
@ -655,12 +655,12 @@ SceneOpenGL2::SceneOpenGL2(OpenGLBackend *backend)
// push one shader on the stack so that one is always bound
ShaderManager::instance()->pushShader(ShaderManager::SimpleShader);
if (checkGLError("Init")) {
kError(1212) << "OpenGL 2 compositing setup failed";
qCritical() << "OpenGL 2 compositing setup failed";
init_ok = false;
return; // error
}
kDebug(1212) << "OpenGL 2 compositing successfully initialized";
qDebug() << "OpenGL 2 compositing successfully initialized";
#ifndef KWIN_HAVE_OPENGLES
// 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");
if (!forceEnv.isEmpty()) {
if (qstrcmp(forceEnv, "O1") == 0) {
kDebug(1212) << "OpenGL 1 compositing enforced by environment variable";
qDebug() << "OpenGL 1 compositing enforced by environment variable";
return true;
} else {
// OpenGL 1 disabled by environment variable
@ -782,7 +782,7 @@ bool SceneOpenGL1::supported(OpenGLBackend *backend)
}
}
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 true;
@ -799,12 +799,12 @@ SceneOpenGL1::SceneOpenGL1(OpenGLBackend *backend)
ShaderManager::disable();
setupModelViewProjectionMatrix();
if (checkGLError("Init")) {
kError(1212) << "OpenGL 1 compositing setup failed";
qCritical() << "OpenGL 1 compositing setup failed";
init_ok = false;
return; // error
}
kDebug(1212) << "OpenGL 1 compositing successfully initialized";
qDebug() << "OpenGL 1 compositing successfully initialized";
}
SceneOpenGL1::~SceneOpenGL1()
@ -1853,7 +1853,7 @@ bool OpenGLWindowPixmap::bind()
if (success)
toplevel()->resetDamage();
else
kDebug(1212) << "Failed to bind window";
qDebug() << "Failed to bind window";
return success;
}
@ -2504,7 +2504,7 @@ char SwapProfiler::end()
m_time = (10*m_time + m_timer.nsecsElapsed())/11;
if (++m_counter > 500) {
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";
return blocks ? 'd' : 't';
}

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

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

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

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

@ -28,8 +28,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KDE/KAction>
#include <KDE/KActionCollection>
#include <KDE/KDebug>
#include <KDE/KLocalizedString>
#include <QDebug>
#include <QtScript/QScriptEngine>
namespace KWin
@ -111,7 +111,7 @@ QScriptValue globalShortcut(QScriptContext *context, QScriptEngine *engine)
return engine->undefinedValue();
}
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();
}
KActionCollection* actionCollection = new KActionCollection(script);

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

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

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

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

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

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

@ -1863,7 +1863,7 @@ void Workspace::slotInvertScreen()
continue;
}
if (gamma->size) {
kDebug(1212) << "inverting screen using XRRSetCrtcGamma";
qDebug() << "inverting screen using XRRSetCrtcGamma";
const int half = gamma->size / 2 + 1;
uint16_t *red = gamma.red();
@ -1896,7 +1896,7 @@ void Workspace::slotInvertScreen()
green = new unsigned short[size];
blue = new unsigned short[size];
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;
unsigned short swap;
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
if (effects) {
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);
}
}
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";
}

@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef KCMRULES
#include <assert.h>
#include <kdebug.h>
#include <QDebug>
#include <kkeyserver.h>
#include <X11/Xlib.h>
@ -204,7 +204,7 @@ void ungrabXKeyboard()
{
if (!keyboard_grabbed) {
// 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;
xcb_ungrab_keyboard(connection(), XCB_TIME_CURRENT_TIME);

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

@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "xcbutils.h"
#include "utils.h"
// KDE
#include <KDE/KDebug>
// Qt
#include <QDebug>
// xcb
#include <xcb/composite.h>
#include <xcb/damage.h>
@ -168,7 +168,7 @@ void Extensions::init()
if (m_sync.present) {
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)
<< " render: 0x" << QString::number(m_render.version, 16)
<< " fixes: 0x" << QString::number(m_fixes.version, 16)

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

Loading…
Cancel
Save