Introduce categorized logging for kwin core
Done by Daniel Pastushchak for KDE during GCI-2014.
This commit is contained in:
parent
7da6d3a41e
commit
0d997b1093
46 changed files with 265 additions and 239 deletions
|
@ -380,7 +380,7 @@ void Workspace::takeActivity(Client* c, ActivityFlags flags)
|
|||
if (c->tabGroup() && c->tabGroup()->current() != c)
|
||||
c->tabGroup()->setCurrent(c);
|
||||
if (!c->isShown(true)) { // shouldn't happen, call activateClient() if needed
|
||||
qWarning() << "takeActivity: not shown" ;
|
||||
qCWarning(KWIN_CORE) << "takeActivity: not shown" ;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -565,18 +565,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()) {
|
||||
qDebug() << "Activation: No client active, allowing";
|
||||
qCDebug(KWIN_CORE) << "Activation: No client active, allowing";
|
||||
return true; // no active client -> always allow
|
||||
}
|
||||
// TODO window urgency -> return true?
|
||||
if (Client::belongToSameApplication(c, ac, true)) {
|
||||
qDebug() << "Activation: Belongs to active application";
|
||||
qCDebug(KWIN_CORE) << "Activation: Belongs to active application";
|
||||
return true;
|
||||
}
|
||||
if (level == 3) // high
|
||||
return false;
|
||||
if (time == -1U) { // no time known
|
||||
qDebug() << "Activation: No timestamp at all";
|
||||
qCDebug(KWIN_CORE) << "Activation: No timestamp at all";
|
||||
if (level == 1) // low
|
||||
return true;
|
||||
// no timestamp at all, don't activate - because there's also creation timestamp
|
||||
|
@ -586,7 +586,7 @@ bool Workspace::allowClientActivation(const KWin::Client *c, xcb_timestamp_t tim
|
|||
}
|
||||
// level == 2 // normal
|
||||
Time user_time = ac->userTime();
|
||||
qDebug() << "Activation, compared:" << c << ":" << time << ":" << user_time
|
||||
qCDebug(KWIN_CORE) << "Activation, compared:" << c << ":" << time << ":" << user_time
|
||||
<< ":" << (NET::timestampCompare(time, user_time) >= 0) << endl;
|
||||
return NET::timestampCompare(time, user_time) >= 0; // time >= user_time
|
||||
}
|
||||
|
@ -607,18 +607,18 @@ bool Workspace::allowFullClientRaising(const KWin::Client *c, xcb_timestamp_t ti
|
|||
if (level == 4) // extreme
|
||||
return false;
|
||||
if (ac == NULL || ac->isDesktop()) {
|
||||
qDebug() << "Raising: No client active, allowing";
|
||||
qCDebug(KWIN_CORE) << "Raising: No client active, allowing";
|
||||
return true; // no active client -> always allow
|
||||
}
|
||||
// TODO window urgency -> return true?
|
||||
if (Client::belongToSameApplication(c, ac, true)) {
|
||||
qDebug() << "Raising: Belongs to active application";
|
||||
qCDebug(KWIN_CORE) << "Raising: Belongs to active application";
|
||||
return true;
|
||||
}
|
||||
if (level == 3) // high
|
||||
return false;
|
||||
xcb_timestamp_t user_time = ac->userTime();
|
||||
qDebug() << "Raising, compared:" << time << ":" << user_time
|
||||
qCDebug(KWIN_CORE) << "Raising, compared:" << time << ":" << user_time
|
||||
<< ":" << (NET::timestampCompare(time, user_time) >= 0) << endl;
|
||||
return NET::timestampCompare(time, user_time) >= 0; // time >= user_time
|
||||
}
|
||||
|
@ -707,7 +707,7 @@ xcb_timestamp_t Client::readUserTimeMapTimestamp(const KStartupInfoId *asn_id, c
|
|||
time = asn_id->timestamp();
|
||||
}
|
||||
}
|
||||
qDebug() << "User timestamp, ASN:" << time;
|
||||
qCDebug(KWIN_CORE) << "User timestamp, ASN:" << time;
|
||||
if (time == -1U) {
|
||||
// The window doesn't have any timestamp.
|
||||
// If it's the first window for its application
|
||||
|
@ -740,7 +740,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) {
|
||||
qDebug() << "User timestamp, already exists:" << 0;
|
||||
qCDebug(KWIN_CORE) << "User timestamp, already exists:" << 0;
|
||||
return 0; // refuse activation
|
||||
}
|
||||
}
|
||||
|
@ -757,7 +757,7 @@ xcb_timestamp_t Client::readUserTimeMapTimestamp(const KStartupInfoId *asn_id, c
|
|||
return -1U;
|
||||
time = readUserCreationTime();
|
||||
}
|
||||
qDebug() << "User timestamp, final:" << this << ":" << time;
|
||||
qCDebug(KWIN_CORE) << "User timestamp, final:" << this << ":" << time;
|
||||
return time;
|
||||
}
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ bool Activities::start(const QString &id)
|
|||
if (ksmserver.isValid()) {
|
||||
ksmserver.asyncCall("restoreSubSession", id);
|
||||
} else {
|
||||
qDebug() << "couldn't get ksmserver interface";
|
||||
qCDebug(KWIN_CORE) << "couldn't get ksmserver interface";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -150,7 +150,7 @@ void Activities::reallyStop(const QString &id)
|
|||
if (ws->sessionSaving())
|
||||
return; //ksmserver doesn't queue requests (yet)
|
||||
|
||||
qDebug() << id;
|
||||
qCDebug(KWIN_CORE) << id;
|
||||
|
||||
QSet<QByteArray> saveSessionIds;
|
||||
QSet<QByteArray> dontCloseSessionIds;
|
||||
|
@ -194,14 +194,14 @@ void Activities::reallyStop(const QString &id)
|
|||
}
|
||||
}
|
||||
|
||||
qDebug() << "saveActivity" << id << saveAndClose << saveOnly;
|
||||
qCDebug(KWIN_CORE) << "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 {
|
||||
qDebug() << "couldn't get ksmserver interface";
|
||||
qCDebug(KWIN_CORE) << "couldn't get ksmserver interface";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ Q_DECLARE_METATYPE(KWin::LoadEffectFlags)
|
|||
Q_DECLARE_METATYPE(KWin::BuiltInEffect)
|
||||
Q_DECLARE_METATYPE(KWin::Effect*)
|
||||
|
||||
Q_LOGGING_CATEGORY(KWIN_CORE, "kwin_core")
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
|
||||
Q_LOGGING_CATEGORY(KWIN_CORE, "kwin_core")
|
||||
|
||||
using namespace KWin;
|
||||
|
||||
class TestClientMachine : public QObject
|
||||
|
|
|
@ -32,6 +32,8 @@ Q_DECLARE_METATYPE(KWin::LoadEffectFlag)
|
|||
Q_DECLARE_METATYPE(KWin::LoadEffectFlags)
|
||||
Q_DECLARE_METATYPE(KWin::Effect*)
|
||||
|
||||
Q_LOGGING_CATEGORY(KWIN_CORE, "kwin_core")
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ Q_DECLARE_METATYPE(KWin::LoadEffectFlag)
|
|||
Q_DECLARE_METATYPE(KWin::LoadEffectFlags)
|
||||
Q_DECLARE_METATYPE(KWin::Effect*)
|
||||
|
||||
Q_LOGGING_CATEGORY(KWIN_CORE, "kwin_core")
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
ScreenEdges *ScreenEdges::s_self = nullptr;
|
||||
|
|
|
@ -24,6 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// Qt
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
Q_LOGGING_CATEGORY(KWIN_CORE, "kwin_core")
|
||||
|
||||
// mocking
|
||||
namespace KWin
|
||||
{
|
||||
|
|
10
client.cpp
10
client.cpp
|
@ -1278,7 +1278,7 @@ void Client::closeWindow()
|
|||
*/
|
||||
void Client::killWindow()
|
||||
{
|
||||
qDebug() << "Client::killWindow():" << caption();
|
||||
qCDebug(KWIN_CORE) << "Client::killWindow():" << caption();
|
||||
killProcess(false);
|
||||
m_client.kill(); // Always kill this client at the server
|
||||
destroyClient();
|
||||
|
@ -1299,7 +1299,7 @@ void Client::pingWindow()
|
|||
ping_timer = new QTimer(this);
|
||||
connect(ping_timer, &QTimer::timeout, this,
|
||||
[this]() {
|
||||
qDebug() << "Ping timeout:" << caption();
|
||||
qCDebug(KWIN_CORE) << "Ping timeout:" << caption();
|
||||
ping_timer->deleteLater();
|
||||
ping_timer = nullptr;
|
||||
killProcess(true, m_pingTimestamp);
|
||||
|
@ -1332,7 +1332,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;
|
||||
qDebug() << "Kill process:" << pid << "(" << clientMachine()->hostName() << ")";
|
||||
qCDebug(KWIN_CORE) << "Kill process:" << pid << "(" << clientMachine()->hostName() << ")";
|
||||
if (!ask) {
|
||||
if (!clientMachine()->isLocal()) {
|
||||
QStringList lst;
|
||||
|
@ -2249,13 +2249,13 @@ void Client::checkActivities()
|
|||
//otherwise, somebody else changed it. we need to validate before reacting
|
||||
QStringList allActivities = Activities::self()->all();
|
||||
if (allActivities.isEmpty()) {
|
||||
qDebug() << "no activities!?!?";
|
||||
qCDebug(KWIN_CORE) << "no activities!?!?";
|
||||
//don't touch anything, there's probably something bad going on and we don't wanna make it worse
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < newActivitiesList.size(); ++i) {
|
||||
if (! allActivities.contains(newActivitiesList.at(i))) {
|
||||
qDebug() << "invalid:" << newActivitiesList.at(i);
|
||||
qCDebug(KWIN_CORE) << "invalid:" << newActivitiesList.at(i);
|
||||
newActivitiesList.removeAt(i--);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*********************************************************************/
|
||||
// own
|
||||
#include "client_machine.h"
|
||||
#include "utils.h"
|
||||
// KF5
|
||||
#include <KWindowInfo>
|
||||
// Qt
|
||||
|
@ -120,7 +121,7 @@ bool GetAddrInfo::resolved(QFutureWatcher< int >* watcher)
|
|||
return false;
|
||||
}
|
||||
if (watcher->result() != 0) {
|
||||
qDebug() << "getaddrinfo failed with error:" << gai_strerror(watcher->result());
|
||||
qCDebug(KWIN_CORE) << "getaddrinfo failed with error:" << gai_strerror(watcher->result());
|
||||
// call failed;
|
||||
deleteLater();
|
||||
return false;
|
||||
|
|
|
@ -156,10 +156,10 @@ void Compositor::setup()
|
|||
if (m_suspended & ScriptSuspend) {
|
||||
reasons << QStringLiteral("Disabled by Script");
|
||||
}
|
||||
qDebug() << "Compositing is suspended, reason:" << reasons;
|
||||
qCDebug(KWIN_CORE) << "Compositing is suspended, reason:" << reasons;
|
||||
return;
|
||||
} else if (!CompositingPrefs::compositingPossible()) {
|
||||
qCritical() << "Compositing is not possible";
|
||||
qCCritical(KWIN_CORE) << "Compositing is not possible";
|
||||
return;
|
||||
}
|
||||
m_starting = true;
|
||||
|
@ -195,14 +195,14 @@ void Compositor::slotCompositingOptionsInitialized()
|
|||
|
||||
switch(options->compositingMode()) {
|
||||
case OpenGLCompositing: {
|
||||
qDebug() << "Initializing OpenGL compositing";
|
||||
qCDebug(KWIN_CORE) << "Initializing OpenGL compositing";
|
||||
|
||||
// Some broken drivers crash on glXQuery() so to prevent constant KWin crashes:
|
||||
KSharedConfigPtr unsafeConfigPtr = KSharedConfig::openConfig();
|
||||
KConfigGroup unsafeConfig(unsafeConfigPtr, "Compositing");
|
||||
const QString openGLIsUnsafe = QStringLiteral("OpenGLIsUnsafe") + (is_multihead ? QString::number(screen_number) : QString());
|
||||
if (unsafeConfig.readEntry(openGLIsUnsafe, false))
|
||||
qWarning() << "KWin has detected that your OpenGL library is unsafe to use";
|
||||
qCWarning(KWIN_CORE) << "KWin has detected that your OpenGL library is unsafe to use";
|
||||
else {
|
||||
unsafeConfig.writeEntry(openGLIsUnsafe, true);
|
||||
unsafeConfig.sync();
|
||||
|
@ -210,7 +210,7 @@ void Compositor::slotCompositingOptionsInitialized()
|
|||
if (!CompositingPrefs::hasGlx()) {
|
||||
unsafeConfig.writeEntry(openGLIsUnsafe, false);
|
||||
unsafeConfig.sync();
|
||||
qDebug() << "No glx extensions available";
|
||||
qCDebug(KWIN_CORE) << "No glx extensions available";
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@ -234,36 +234,36 @@ void Compositor::slotCompositingOptionsInitialized()
|
|||
}
|
||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||
case XRenderCompositing:
|
||||
qDebug() << "Initializing XRender compositing";
|
||||
qCDebug(KWIN_CORE) << "Initializing XRender compositing";
|
||||
m_scene = SceneXrender::createScene();
|
||||
break;
|
||||
#endif
|
||||
case QPainterCompositing:
|
||||
qDebug() << "Initializing QPainter compositing";
|
||||
qCDebug(KWIN_CORE) << "Initializing QPainter compositing";
|
||||
m_scene = SceneQPainter::createScene();
|
||||
break;
|
||||
default:
|
||||
qDebug() << "No compositing enabled";
|
||||
qCDebug(KWIN_CORE) << "No compositing enabled";
|
||||
m_starting = false;
|
||||
cm_selection->owning = false;
|
||||
cm_selection->release();
|
||||
if (kwinApp()->requiresCompositing()) {
|
||||
qCritical() << "The used windowing system requires compositing";
|
||||
qCritical() << "We are going to quit KWin now as it is broken";
|
||||
qCCritical(KWIN_CORE) << "The used windowing system requires compositing";
|
||||
qCCritical(KWIN_CORE) << "We are going to quit KWin now as it is broken";
|
||||
qApp->quit();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (m_scene == NULL || m_scene->initFailed()) {
|
||||
qCritical() << "Failed to initialize compositing, compositing disabled";
|
||||
qCCritical(KWIN_CORE) << "Failed to initialize compositing, compositing disabled";
|
||||
delete m_scene;
|
||||
m_scene = NULL;
|
||||
m_starting = false;
|
||||
cm_selection->owning = false;
|
||||
cm_selection->release();
|
||||
if (kwinApp()->requiresCompositing()) {
|
||||
qCritical() << "The used windowing system requires compositing";
|
||||
qCritical() << "We are going to quit KWin now as it is broken";
|
||||
qCCritical(KWIN_CORE) << "The used windowing system requires compositing";
|
||||
qCCritical(KWIN_CORE) << "We are going to quit KWin now as it is broken";
|
||||
qApp->quit();
|
||||
}
|
||||
return;
|
||||
|
@ -371,7 +371,7 @@ void Compositor::releaseCompositorSelection()
|
|||
m_releaseSelectionTimer.start();
|
||||
return;
|
||||
}
|
||||
qDebug() << "Releasing compositor selection";
|
||||
qCDebug(KWIN_CORE) << "Releasing compositor selection";
|
||||
cm_selection->owning = false;
|
||||
cm_selection->release();
|
||||
}
|
||||
|
@ -1105,10 +1105,10 @@ bool Toplevel::updateUnredirectedState()
|
|||
lastUnredirect.start();
|
||||
unredirect = should;
|
||||
if (unredirect) {
|
||||
qDebug() << "Unredirecting:" << this;
|
||||
qCDebug(KWIN_CORE) << "Unredirecting:" << this;
|
||||
xcb_composite_unredirect_window(connection(), frameId(), XCB_COMPOSITE_REDIRECT_MANUAL);
|
||||
} else {
|
||||
qDebug() << "Redirecting:" << this;
|
||||
qCDebug(KWIN_CORE) << "Redirecting:" << this;
|
||||
xcb_composite_redirect_window(connection(), frameId(), XCB_COMPOSITE_REDIRECT_MANUAL);
|
||||
discardWindowPixmap();
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "main.h"
|
||||
#include "xcbutils.h"
|
||||
#include "kwinglplatform.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <kconfiggroup.h>
|
||||
#include <KLocalizedString>
|
||||
|
@ -68,11 +69,11 @@ bool CompositingPrefs::compositingPossible()
|
|||
}
|
||||
|
||||
if (!Xcb::Extensions::self()->isCompositeAvailable()) {
|
||||
qDebug() << "No composite extension available";
|
||||
qCDebug(KWIN_CORE) << "No composite extension available";
|
||||
return false;
|
||||
}
|
||||
if (!Xcb::Extensions::self()->isDamageAvailable()) {
|
||||
qDebug() << "No damage extension available";
|
||||
qCDebug(KWIN_CORE) << "No damage extension available";
|
||||
return false;
|
||||
}
|
||||
if (hasGlx())
|
||||
|
@ -84,7 +85,7 @@ bool CompositingPrefs::compositingPossible()
|
|||
#ifdef KWIN_HAVE_OPENGLES
|
||||
return true;
|
||||
#endif
|
||||
qDebug() << "No OpenGL or XRender/XFixes support";
|
||||
qCDebug(KWIN_CORE) << "No OpenGL or XRender/XFixes support";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ Deleted::Deleted()
|
|||
Deleted::~Deleted()
|
||||
{
|
||||
if (delete_refcount != 0)
|
||||
qCritical() << "Deleted client has non-zero reference count (" << delete_refcount << ")";
|
||||
qCCritical(KWIN_CORE) << "Deleted client has non-zero reference count (" << delete_refcount << ")";
|
||||
assert(delete_refcount == 0);
|
||||
workspace()->removeDeleted(this);
|
||||
deleteEffectWindow();
|
||||
|
|
|
@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <kwineffects.h>
|
||||
#include "effects/effect_builtins.h"
|
||||
#include "scripting/scriptedeffect.h"
|
||||
#include "utils.h"
|
||||
// KDE
|
||||
#include <KConfigGroup>
|
||||
#include <KPluginTrader>
|
||||
|
@ -129,7 +130,7 @@ bool BuiltInEffectLoader::loadEffect(const QString &name, BuiltInEffect effect,
|
|||
return false;
|
||||
}
|
||||
if (!flags.testFlag(LoadEffectFlag::Load)) {
|
||||
qDebug() << "Loading flags disable effect: " << name;
|
||||
qCDebug(KWIN_CORE) << "Loading flags disable effect: " << name;
|
||||
return false;
|
||||
}
|
||||
// check that it is not already loaded
|
||||
|
@ -142,13 +143,13 @@ bool BuiltInEffectLoader::loadEffect(const QString &name, BuiltInEffect effect,
|
|||
effects->makeOpenGLContextCurrent();
|
||||
#endif
|
||||
if (!BuiltInEffects::supported(effect)) {
|
||||
qDebug() << "Effect is not supported: " << name;
|
||||
qCDebug(KWIN_CORE) << "Effect is not supported: " << name;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (flags.testFlag(LoadEffectFlag::CheckDefaultFunction)) {
|
||||
if (!BuiltInEffects::checkEnabledByDefault(effect)) {
|
||||
qDebug() << "Enabled by default function disables effect: " << name;
|
||||
qCDebug(KWIN_CORE) << "Enabled by default function disables effect: " << name;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +157,7 @@ bool BuiltInEffectLoader::loadEffect(const QString &name, BuiltInEffect effect,
|
|||
// ok, now we can try to create the Effect
|
||||
Effect *e = BuiltInEffects::create(effect);
|
||||
if (!e) {
|
||||
qDebug() << "Failed to create effect: " << name;
|
||||
qCDebug(KWIN_CORE) << "Failed to create effect: " << name;
|
||||
return false;
|
||||
}
|
||||
// insert in our loaded effects
|
||||
|
@ -166,7 +167,7 @@ bool BuiltInEffectLoader::loadEffect(const QString &name, BuiltInEffect effect,
|
|||
m_loadedEffects.remove(effect);
|
||||
}
|
||||
);
|
||||
qDebug() << "Successfully loaded built-in effect: " << name;
|
||||
qCDebug(KWIN_CORE) << "Successfully loaded built-in effect: " << name;
|
||||
emit effectLoaded(e, name);
|
||||
return true;
|
||||
}
|
||||
|
@ -224,17 +225,17 @@ bool ScriptedEffectLoader::loadEffect(KService::Ptr effect, LoadEffectFlags flag
|
|||
{
|
||||
const QString name = effect->property(s_nameProperty).toString();
|
||||
if (!flags.testFlag(LoadEffectFlag::Load)) {
|
||||
qDebug() << "Loading flags disable effect: " << name;
|
||||
qCDebug(KWIN_CORE) << "Loading flags disable effect: " << name;
|
||||
return false;
|
||||
}
|
||||
if (m_loadedEffects.contains(name)) {
|
||||
qDebug() << name << "already loaded";
|
||||
qCDebug(KWIN_CORE) << name << "already loaded";
|
||||
return false;
|
||||
}
|
||||
|
||||
ScriptedEffect *e = ScriptedEffect::create(effect);
|
||||
if (!e) {
|
||||
qDebug() << "Could not initialize scripted effect: " << name;
|
||||
qCDebug(KWIN_CORE) << "Could not initialize scripted effect: " << name;
|
||||
return false;
|
||||
}
|
||||
connect(e, &ScriptedEffect::destroyed, this,
|
||||
|
@ -243,7 +244,7 @@ bool ScriptedEffectLoader::loadEffect(KService::Ptr effect, LoadEffectFlags flag
|
|||
}
|
||||
);
|
||||
|
||||
qDebug() << "Successfully loaded scripted effect: " << name;
|
||||
qCDebug(KWIN_CORE) << "Successfully loaded scripted effect: " << name;
|
||||
emit effectLoaded(e, name);
|
||||
m_loadedEffects << name;
|
||||
return true;
|
||||
|
@ -328,12 +329,12 @@ EffectPluginFactory *PluginEffectLoader::factory(const KPluginInfo &info) const
|
|||
}
|
||||
KPluginLoader loader(info.libraryPath());
|
||||
if (loader.pluginVersion() != KWIN_EFFECT_API_VERSION) {
|
||||
qDebug() << info.pluginName() << " has not matching plugin version, expected " << KWIN_EFFECT_API_VERSION << "got " << loader.pluginVersion();
|
||||
qCDebug(KWIN_CORE) << info.pluginName() << " has not matching plugin version, expected " << KWIN_EFFECT_API_VERSION << "got " << loader.pluginVersion();
|
||||
return nullptr;
|
||||
}
|
||||
KPluginFactory *factory = loader.factory();
|
||||
if (!factory) {
|
||||
qDebug() << "Did not get KPluginFactory for " << info.pluginName();
|
||||
qCDebug(KWIN_CORE) << "Did not get KPluginFactory for " << info.pluginName();
|
||||
return nullptr;
|
||||
}
|
||||
return dynamic_cast< EffectPluginFactory* >(factory);
|
||||
|
@ -361,21 +362,21 @@ bool PluginEffectLoader::loadEffect(const QString &name)
|
|||
bool PluginEffectLoader::loadEffect(const KPluginInfo &info, LoadEffectFlags flags)
|
||||
{
|
||||
if (!info.isValid()) {
|
||||
qDebug() << "Plugin info is not valid";
|
||||
qCDebug(KWIN_CORE) << "Plugin info is not valid";
|
||||
return false;
|
||||
}
|
||||
const QString name = info.pluginName();
|
||||
if (!flags.testFlag(LoadEffectFlag::Load)) {
|
||||
qDebug() << "Loading flags disable effect: " << name;
|
||||
qCDebug(KWIN_CORE) << "Loading flags disable effect: " << name;
|
||||
return false;
|
||||
}
|
||||
if (m_loadedEffects.contains(name)) {
|
||||
qDebug() << name << " already loaded";
|
||||
qCDebug(KWIN_CORE) << name << " already loaded";
|
||||
return false;
|
||||
}
|
||||
EffectPluginFactory *effectFactory = factory(info);
|
||||
if (!effectFactory) {
|
||||
qDebug() << "Couldn't get an EffectPluginFactory for: " << name;
|
||||
qCDebug(KWIN_CORE) << "Couldn't get an EffectPluginFactory for: " << name;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -383,13 +384,13 @@ bool PluginEffectLoader::loadEffect(const KPluginInfo &info, LoadEffectFlags fla
|
|||
effects->makeOpenGLContextCurrent();
|
||||
#endif
|
||||
if (!effectFactory->isSupported()) {
|
||||
qDebug() << "Effect is not supported: " << name;
|
||||
qCDebug(KWIN_CORE) << "Effect is not supported: " << name;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (flags.testFlag(LoadEffectFlag::CheckDefaultFunction)) {
|
||||
if (!effectFactory->enabledByDefault()) {
|
||||
qDebug() << "Enabled by default function disables effect: " << name;
|
||||
qCDebug(KWIN_CORE) << "Enabled by default function disables effect: " << name;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -397,7 +398,7 @@ bool PluginEffectLoader::loadEffect(const KPluginInfo &info, LoadEffectFlags fla
|
|||
// ok, now we can try to create the Effect
|
||||
Effect *e = effectFactory->createEffect();
|
||||
if (!e) {
|
||||
qDebug() << "Failed to create effect: " << name;
|
||||
qCDebug(KWIN_CORE) << "Failed to create effect: " << name;
|
||||
return false;
|
||||
}
|
||||
// insert in our loaded effects
|
||||
|
@ -407,7 +408,7 @@ bool PluginEffectLoader::loadEffect(const KPluginInfo &info, LoadEffectFlags fla
|
|||
m_loadedEffects.removeAll(name);
|
||||
}
|
||||
);
|
||||
qDebug() << "Successfully loaded plugin effect: " << name;
|
||||
qCDebug(KWIN_CORE) << "Successfully loaded plugin effect: " << name;
|
||||
emit effectLoaded(e, name);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1307,7 +1307,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) {
|
||||
qDebug() << "EffectsHandler::unloadEffect : Unloading Effect : " << name;
|
||||
qCDebug(KWIN_CORE) << "EffectsHandler::unloadEffect : Unloading Effect : " << name;
|
||||
if (activeFullScreenEffect() == it.value().second) {
|
||||
setActiveFullScreenEffect(0);
|
||||
}
|
||||
|
@ -1324,7 +1324,7 @@ void EffectsHandlerImpl::unloadEffect(const QString& name)
|
|||
}
|
||||
}
|
||||
|
||||
qDebug() << "EffectsHandler::unloadEffect : Effect not loaded : " << name;
|
||||
qCDebug(KWIN_CORE) << "EffectsHandler::unloadEffect : Effect not loaded : " << name;
|
||||
}
|
||||
|
||||
void EffectsHandlerImpl::reconfigureEffect(const QString& name)
|
||||
|
|
|
@ -46,7 +46,7 @@ EglWaylandBackend::EglWaylandBackend()
|
|||
setFailed("Wayland Backend has not been created");
|
||||
return;
|
||||
}
|
||||
qDebug() << "Connected to Wayland display?" << (m_wayland->display() ? "yes" : "no" );
|
||||
qCDebug(KWIN_CORE) << "Connected to Wayland display?" << (m_wayland->display() ? "yes" : "no" );
|
||||
if (!m_wayland->display()) {
|
||||
setFailed("Could not connect to Wayland compositor");
|
||||
return;
|
||||
|
@ -57,9 +57,9 @@ EglWaylandBackend::EglWaylandBackend()
|
|||
// Egl is always direct rendering
|
||||
setIsDirectRendering(true);
|
||||
|
||||
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!";
|
||||
qCWarning(KWIN_CORE) << "Using Wayland rendering backend";
|
||||
qCWarning(KWIN_CORE) << "This is a highly experimental backend, do not use for productive usage!";
|
||||
qCWarning(KWIN_CORE) << "Please do not report any issues you might encounter when using this backend!";
|
||||
}
|
||||
|
||||
EglWaylandBackend::~EglWaylandBackend()
|
||||
|
@ -108,20 +108,20 @@ bool EglWaylandBackend::initializeEgl()
|
|||
return false;
|
||||
EGLint error = eglGetError();
|
||||
if (error != EGL_SUCCESS) {
|
||||
qWarning() << "Error during eglInitialize " << error;
|
||||
qCWarning(KWIN_CORE) << "Error during eglInitialize " << error;
|
||||
return false;
|
||||
}
|
||||
qDebug() << "Egl Initialize succeeded";
|
||||
qCDebug(KWIN_CORE) << "Egl Initialize succeeded";
|
||||
|
||||
#ifdef KWIN_HAVE_OPENGLES
|
||||
eglBindAPI(EGL_OPENGL_ES_API);
|
||||
#else
|
||||
if (eglBindAPI(EGL_OPENGL_API) == EGL_FALSE) {
|
||||
qCritical() << "bind OpenGL API failed";
|
||||
qCCritical(KWIN_CORE) << "bind OpenGL API failed";
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
qDebug() << "EGL version: " << major << "." << minor;
|
||||
qCDebug(KWIN_CORE) << "EGL version: " << major << "." << minor;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ bool EglWaylandBackend::initRenderingContext()
|
|||
#endif
|
||||
|
||||
if (m_context == EGL_NO_CONTEXT) {
|
||||
qCritical() << "Create Context failed";
|
||||
qCCritical(KWIN_CORE) << "Create Context failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ bool EglWaylandBackend::initRenderingContext()
|
|||
connect(s, &KWayland::Client::Surface::frameRendered, Compositor::self(), &Compositor::bufferSwapComplete);
|
||||
m_overlay = wl_egl_window_create(*s, size.width(), size.height());
|
||||
if (!m_overlay) {
|
||||
qCritical() << "Creating Wayland Egl window failed";
|
||||
qCCritical(KWIN_CORE) << "Creating Wayland Egl window failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ bool EglWaylandBackend::initRenderingContext()
|
|||
m_surface = eglCreateWindowSurface(m_display, m_config, m_overlay, nullptr);
|
||||
|
||||
if (m_surface == EGL_NO_SURFACE) {
|
||||
qCritical() << "Create Window Surface failed";
|
||||
qCCritical(KWIN_CORE) << "Create Window Surface failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -216,13 +216,13 @@ bool EglWaylandBackend::initRenderingContext()
|
|||
bool EglWaylandBackend::makeContextCurrent()
|
||||
{
|
||||
if (eglMakeCurrent(m_display, m_surface, m_surface, m_context) == EGL_FALSE) {
|
||||
qCritical() << "Make Context Current failed";
|
||||
qCCritical(KWIN_CORE) << "Make Context Current failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
EGLint error = eglGetError();
|
||||
if (error != EGL_SUCCESS) {
|
||||
qWarning() << "Error occurred while creating context " << error;
|
||||
qCWarning(KWIN_CORE) << "Error occurred while creating context " << error;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -248,11 +248,11 @@ bool EglWaylandBackend::initBufferConfigs()
|
|||
EGLint count;
|
||||
EGLConfig configs[1024];
|
||||
if (eglChooseConfig(m_display, config_attribs, configs, 1, &count) == EGL_FALSE) {
|
||||
qCritical() << "choose config failed";
|
||||
qCCritical(KWIN_CORE) << "choose config failed";
|
||||
return false;
|
||||
}
|
||||
if (count != 1) {
|
||||
qCritical() << "choose config did not return a config" << count;
|
||||
qCCritical(KWIN_CORE) << "choose config did not return a config" << count;
|
||||
return false;
|
||||
}
|
||||
m_config = configs[0];
|
||||
|
|
|
@ -122,7 +122,7 @@ void EglOnXBackend::init()
|
|||
gs_tripleBufferNeedsDetection = false;
|
||||
m_swapProfiler.init();
|
||||
if (surfaceHasSubPost) {
|
||||
qDebug() << "EGL implementation and surface support eglPostSubBufferNV, let's use it";
|
||||
qCDebug(KWIN_CORE) << "EGL implementation and surface support eglPostSubBufferNV, let's use it";
|
||||
|
||||
if (options->glPreferBufferSwap() != Options::NoSwapEncourage) {
|
||||
// check if swap interval 1 is supported
|
||||
|
@ -130,7 +130,7 @@ void EglOnXBackend::init()
|
|||
eglGetConfigAttrib(dpy, config, EGL_MAX_SWAP_INTERVAL, &val);
|
||||
if (val >= 1) {
|
||||
if (eglSwapInterval(dpy, 1)) {
|
||||
qDebug() << "Enabled v-sync";
|
||||
qCDebug(KWIN_CORE) << "Enabled v-sync";
|
||||
setSyncsToVBlank(true);
|
||||
const QByteArray tripleBuffer = qgetenv("KWIN_TRIPLE_BUFFER");
|
||||
if (!tripleBuffer.isEmpty()) {
|
||||
|
@ -140,7 +140,7 @@ void EglOnXBackend::init()
|
|||
gs_tripleBufferNeedsDetection = gs_tripleBufferUndetected;
|
||||
}
|
||||
} else {
|
||||
qWarning() << "Cannot enable v-sync as max. swap interval is" << val;
|
||||
qCWarning(KWIN_CORE) << "Cannot enable v-sync as max. swap interval is" << val;
|
||||
}
|
||||
} else {
|
||||
// disable v-sync
|
||||
|
@ -152,7 +152,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. */
|
||||
qWarning() << "eglPostSubBufferNV not supported, have to enable buffer preservation - which breaks v-sync and performance";
|
||||
qCWarning(KWIN_CORE) << "eglPostSubBufferNV not supported, have to enable buffer preservation - which breaks v-sync and performance";
|
||||
eglSurfaceAttrib(dpy, surface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
|
||||
}
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ bool EglOnXBackend::initRenderingContext()
|
|||
eglBindAPI(EGL_OPENGL_ES_API);
|
||||
#else
|
||||
if (eglBindAPI(EGL_OPENGL_API) == EGL_FALSE) {
|
||||
qCritical() << "bind OpenGL API failed";
|
||||
qCCritical(KWIN_CORE) << "bind OpenGL API failed";
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -206,7 +206,7 @@ bool EglOnXBackend::initRenderingContext()
|
|||
initBufferConfigs();
|
||||
|
||||
if (!overlayWindow()->create()) {
|
||||
qCritical() << "Could not get overlay window";
|
||||
qCCritical(KWIN_CORE) << "Could not get overlay window";
|
||||
return false;
|
||||
} else {
|
||||
overlayWindow()->setup(None);
|
||||
|
@ -253,20 +253,20 @@ bool EglOnXBackend::initRenderingContext()
|
|||
#endif
|
||||
|
||||
if (ctx == EGL_NO_CONTEXT) {
|
||||
qCritical() << "Create Context failed";
|
||||
qCCritical(KWIN_CORE) << "Create Context failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (eglMakeCurrent(dpy, surface, surface, ctx) == EGL_FALSE) {
|
||||
qCritical() << "Make Context Current failed";
|
||||
qCCritical(KWIN_CORE) << "Make Context Current failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
qDebug() << "EGL version: " << major << "." << minor;
|
||||
qCDebug(KWIN_CORE) << "EGL version: " << major << "." << minor;
|
||||
|
||||
EGLint error = eglGetError();
|
||||
if (error != EGL_SUCCESS) {
|
||||
qWarning() << "Error occurred while creating context " << error;
|
||||
qCWarning(KWIN_CORE) << "Error occurred while creating context " << error;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -293,13 +293,13 @@ bool EglOnXBackend::initBufferConfigs()
|
|||
EGLint count;
|
||||
EGLConfig configs[1024];
|
||||
if (eglChooseConfig(dpy, config_attribs, configs, 1024, &count) == EGL_FALSE) {
|
||||
qCritical() << "choose config failed";
|
||||
qCCritical(KWIN_CORE) << "choose config failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
Xcb::WindowAttributes attribs(rootWindow());
|
||||
if (!attribs) {
|
||||
qCritical() << "Failed to get window attributes of root window";
|
||||
qCCritical(KWIN_CORE) << "Failed to get window attributes of root window";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,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) {
|
||||
qCritical() << "egl get config attrib failed";
|
||||
qCCritical(KWIN_CORE) << "egl get config attrib failed";
|
||||
}
|
||||
if (uint32_t(val) == attribs->visual) {
|
||||
config = configs[i];
|
||||
|
@ -341,7 +341,7 @@ void EglOnXBackend::present()
|
|||
if (qstrcmp(qgetenv("__GL_YIELD"), "USLEEP")) {
|
||||
options->setGlPreferBufferSwap(0);
|
||||
eglSwapInterval(dpy, 0);
|
||||
qWarning() << "\nIt seems you are using the nvidia driver without triple buffering\n"
|
||||
qCWarning(KWIN_CORE) << "\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"
|
||||
|
@ -515,7 +515,7 @@ bool EglTexture::loadTexture(xcb_pixmap_t pix, const QSize &size, xcb_visualid_t
|
|||
(EGLClientBuffer)pix, attribs);
|
||||
|
||||
if (EGL_NO_IMAGE_KHR == m_image) {
|
||||
qDebug() << "failed to create egl image";
|
||||
qCDebug(KWIN_CORE) << "failed to create egl image";
|
||||
q->unbind();
|
||||
q->discard();
|
||||
return false;
|
||||
|
|
|
@ -218,7 +218,7 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e)
|
|||
if (errorName.isEmpty()) {
|
||||
errorName = QByteArrayLiteral("Unknown");
|
||||
}
|
||||
qWarning("XCB error: %d (%s), sequence: %d, resource id: %d, major code: %d (%s), minor code: %d (%s)",
|
||||
qCWarning(KWIN_CORE, "XCB error: %d (%s), sequence: %d, resource id: %d, major code: %d (%s), minor code: %d (%s)",
|
||||
int(error->error_code), errorName.constData(),
|
||||
int(error->sequence), int(error->resource_id),
|
||||
int(error->major_code), extension.name.constData(),
|
||||
|
|
28
geometry.cpp
28
geometry.cpp
|
@ -114,7 +114,7 @@ void Workspace::updateClientArea(bool force)
|
|||
const Screens *s = Screens::self();
|
||||
int nscreens = s->count();
|
||||
const int numberOfDesktops = VirtualDesktopManager::self()->count();
|
||||
qDebug() << "screens: " << nscreens << "desktops: " << numberOfDesktops;
|
||||
qCDebug(KWIN_CORE) << "screens: " << nscreens << "desktops: " << numberOfDesktops;
|
||||
QVector< QRect > new_wareas(numberOfDesktops + 1);
|
||||
QVector< StrutRects > new_rmoveareas(numberOfDesktops + 1);
|
||||
QVector< QVector< QRect > > new_sareas(numberOfDesktops + 1);
|
||||
|
@ -187,7 +187,7 @@ void Workspace::updateClientArea(bool force)
|
|||
for (int iS = 0;
|
||||
iS < nscreens;
|
||||
iS ++)
|
||||
qDebug() << "new_sarea: " << new_sareas[ i ][ iS ];
|
||||
qCDebug(KWIN_CORE) << "new_sarea: " << new_sareas[ i ][ iS ];
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -238,7 +238,7 @@ void Workspace::updateClientArea(bool force)
|
|||
oldrestrictedmovearea.clear(); // reset, no longer valid or needed
|
||||
}
|
||||
|
||||
qDebug() << "Done.";
|
||||
qCDebug(KWIN_CORE) << "Done.";
|
||||
}
|
||||
|
||||
void Workspace::updateClientArea()
|
||||
|
@ -1260,7 +1260,7 @@ QSize Client::sizeForClientSize(const QSize& wsize, Sizemode mode, bool noframe)
|
|||
int w = wsize.width();
|
||||
int h = wsize.height();
|
||||
if (w < 1 || h < 1) {
|
||||
qWarning() << "sizeForClientSize() with empty size!" ;
|
||||
qCWarning(KWIN_CORE) << "sizeForClientSize() with empty size!" ;
|
||||
}
|
||||
if (w < 1) w = 1;
|
||||
if (h < 1) h = 1;
|
||||
|
@ -1606,7 +1606,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
|
||||
qDebug() << this << bool(value_mask & (CWX|CWWidth|CWY|CWHeight)) <<
|
||||
qCDebug(KWIN_CORE) << this << bool(value_mask & (CWX|CWWidth|CWY|CWHeight)) <<
|
||||
bool(maximizeMode() & MaximizeVertical) <<
|
||||
bool(maximizeMode() & MaximizeHorizontal);
|
||||
|
||||
|
@ -1638,11 +1638,11 @@ void Client::configureRequest(int value_mask, int rx, int ry, int rw, int rh, in
|
|||
}
|
||||
|
||||
if (ignore) {
|
||||
qDebug() << "DENIED";
|
||||
qCDebug(KWIN_CORE) << "DENIED";
|
||||
return; // nothing to (left) to do for use - bugs #158974, #252314, #321491
|
||||
}
|
||||
|
||||
qDebug() << "PERMITTED" << this << bool(value_mask & (CWX|CWWidth|CWY|CWHeight));
|
||||
qCDebug(KWIN_CORE) << "PERMITTED" << this << bool(value_mask & (CWX|CWWidth|CWY|CWHeight));
|
||||
|
||||
if (gravity == 0) // default (nonsense) value for the argument
|
||||
gravity = xSizeHint.win_gravity;
|
||||
|
@ -1735,7 +1735,7 @@ void Client::resizeWithChecks(int w, int h, ForceGeometry_t force)
|
|||
assert(!shade_geometry_change);
|
||||
if (isShade()) {
|
||||
if (h == borderTop() + borderBottom()) {
|
||||
qWarning() << "Shaded geometry passed for size:" ;
|
||||
qCWarning(KWIN_CORE) << "Shaded geometry passed for size:" ;
|
||||
}
|
||||
}
|
||||
int newx = x();
|
||||
|
@ -1887,7 +1887,7 @@ void Client::setGeometry(int x, int y, int w, int h, ForceGeometry_t force)
|
|||
; // nothing
|
||||
else if (isShade()) {
|
||||
if (h == borderTop() + borderBottom()) {
|
||||
qDebug() << "Shaded geometry passed for size:";
|
||||
qCDebug(KWIN_CORE) << "Shaded geometry passed for size:";
|
||||
} else {
|
||||
client_size = QSize(w - borderLeft() - borderRight(), h - borderTop() - borderBottom());
|
||||
h = borderTop() + borderBottom();
|
||||
|
@ -1897,7 +1897,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)) {
|
||||
qDebug() << "forced geometry fail:" << g << ":" << rules()->checkGeometry(g);
|
||||
qCDebug(KWIN_CORE) << "forced geometry fail:" << g << ":" << rules()->checkGeometry(g);
|
||||
}
|
||||
if (force == NormalGeometrySet && geom == g && pending_geometry_update == PendingGeometryNone)
|
||||
return;
|
||||
|
@ -1975,7 +1975,7 @@ void Client::plainResize(int w, int h, ForceGeometry_t force)
|
|||
; // nothing
|
||||
else if (isShade()) {
|
||||
if (h == borderTop() + borderBottom()) {
|
||||
qDebug() << "Shaded geometry passed for size:";
|
||||
qCDebug(KWIN_CORE) << "Shaded geometry passed for size:";
|
||||
} else {
|
||||
client_size = QSize(w - borderLeft() - borderRight(), h - borderTop() - borderBottom());
|
||||
h = borderTop() + borderBottom();
|
||||
|
@ -1985,7 +1985,7 @@ void Client::plainResize(int w, int h, ForceGeometry_t force)
|
|||
}
|
||||
QSize s(w, h);
|
||||
if (block_geometry_updates == 0 && s != rules()->checkSize(s)) {
|
||||
qDebug() << "forced size fail:" << s << ":" << rules()->checkSize(s);
|
||||
qCDebug(KWIN_CORE) << "forced size fail:" << s << ":" << rules()->checkSize(s);
|
||||
}
|
||||
// resuming geometry updates is handled only in setGeometry()
|
||||
assert(pending_geometry_update == PendingGeometryNone || block_geometry_updates > 0);
|
||||
|
@ -2039,7 +2039,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)) {
|
||||
qDebug() << "forced position fail:" << p << ":" << rules()->checkPosition(p);
|
||||
qCDebug(KWIN_CORE) << "forced position fail:" << p << ":" << rules()->checkPosition(p);
|
||||
}
|
||||
if (force == NormalGeometrySet && geom.topLeft() == p)
|
||||
return;
|
||||
|
@ -2457,7 +2457,7 @@ void Client::updateFullscreenMonitors(NETFullscreenMonitors topology)
|
|||
topology.bottom >= nscreens ||
|
||||
topology.left >= nscreens ||
|
||||
topology.right >= nscreens) {
|
||||
qWarning() << "fullscreenMonitors update failed. request higher than number of screens.";
|
||||
qCWarning(KWIN_CORE) << "fullscreenMonitors update failed. request higher than number of screens.";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -222,9 +222,9 @@ void GlxBackend::init()
|
|||
setBlocksForRetrace(true);
|
||||
haveWaitSync = true;
|
||||
} else
|
||||
qWarning() << "NO VSYNC! glXSwapInterval is not supported, glXWaitVideoSync is supported but broken";
|
||||
qCWarning(KWIN_CORE) << "NO VSYNC! glXSwapInterval is not supported, glXWaitVideoSync is supported but broken";
|
||||
} else
|
||||
qWarning() << "NO VSYNC! neither glSwapInterval nor glXWaitVideoSync are supported";
|
||||
qCWarning(KWIN_CORE) << "NO VSYNC! neither glSwapInterval nor glXWaitVideoSync are supported";
|
||||
} else {
|
||||
// disable v-sync (if possible)
|
||||
setSwapInterval(0);
|
||||
|
@ -320,7 +320,7 @@ bool GlxBackend::initBuffer()
|
|||
// Try to create double-buffered window in the overlay
|
||||
XVisualInfo* visual = glXGetVisualFromFBConfig(display(), fbconfig);
|
||||
if (!visual) {
|
||||
qCritical() << "Failed to get visual from fbconfig";
|
||||
qCCritical(KWIN_CORE) << "Failed to get visual from fbconfig";
|
||||
return false;
|
||||
}
|
||||
XSetWindowAttributes attrs;
|
||||
|
@ -332,7 +332,7 @@ bool GlxBackend::initBuffer()
|
|||
overlayWindow()->setup(window);
|
||||
XFree(visual);
|
||||
} else {
|
||||
qCritical() << "Failed to create overlay window";
|
||||
qCCritical(KWIN_CORE) << "Failed to create overlay window";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -371,7 +371,7 @@ bool GlxBackend::initFbConfig()
|
|||
}
|
||||
|
||||
if (fbconfig == NULL) {
|
||||
qCritical() << "Failed to find a usable framebuffer configuration";
|
||||
qCCritical(KWIN_CORE) << "Failed to find a usable framebuffer configuration";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -416,7 +416,7 @@ FBConfigInfo *GlxBackend::infoForVisual(xcb_visualid_t visual)
|
|||
const xcb_render_directformat_t *direct = XRenderUtils::findPictFormatInfo(format);
|
||||
|
||||
if (!direct) {
|
||||
qCritical().nospace() << "Could not find a picture format for visual 0x" << hex << visual;
|
||||
qCCritical(KWIN_CORE).nospace() << "Could not find a picture format for visual 0x" << hex << visual;
|
||||
return info;
|
||||
}
|
||||
|
||||
|
@ -449,7 +449,7 @@ FBConfigInfo *GlxBackend::infoForVisual(xcb_visualid_t visual)
|
|||
GLXFBConfig *configs = glXChooseFBConfig(display(), DefaultScreen(display()), attribs, &count);
|
||||
|
||||
if (count < 1) {
|
||||
qCritical().nospace() << "Could not find a framebuffer configuration for visual 0x" << hex << visual;
|
||||
qCCritical(KWIN_CORE).nospace() << "Could not find a framebuffer configuration for visual 0x" << hex << visual;
|
||||
return info;
|
||||
}
|
||||
|
||||
|
@ -564,7 +564,7 @@ void GlxBackend::present()
|
|||
if (qstrcmp(qgetenv("__GL_YIELD"), "USLEEP")) {
|
||||
options->setGlPreferBufferSwap(0);
|
||||
setSwapInterval(0);
|
||||
qWarning() << "\nIt seems you are using the nvidia driver without triple buffering\n"
|
||||
qCWarning(KWIN_CORE) << "\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"
|
||||
|
|
26
group.cpp
26
group.cpp
|
@ -73,15 +73,15 @@ bool performTransiencyCheck()
|
|||
if ((*it1)->deleting)
|
||||
continue;
|
||||
if ((*it1)->in_group == NULL) {
|
||||
qDebug() << "TC: " << *it1 << " in not in a group" << endl;
|
||||
qCDebug(KWIN_CORE) << "TC: " << *it1 << " in not in a group" << endl;
|
||||
ret = false;
|
||||
} else if (!(*it1)->in_group->members().contains(*it1)) {
|
||||
qDebug() << "TC: " << *it1 << " has a group " << (*it1)->in_group << " but group does not contain it" << endl;
|
||||
qCDebug(KWIN_CORE) << "TC: " << *it1 << " has a group " << (*it1)->in_group << " but group does not contain it" << endl;
|
||||
ret = false;
|
||||
}
|
||||
if (!(*it1)->isTransient()) {
|
||||
if (!(*it1)->mainClients().isEmpty()) {
|
||||
qDebug() << "TC: " << *it1 << " is not transient, has main clients:" << (*it1)->mainClients() << endl;
|
||||
qCDebug(KWIN_CORE) << "TC: " << *it1 << " is not transient, has main clients:" << (*it1)->mainClients() << endl;
|
||||
ret = false;
|
||||
}
|
||||
} else {
|
||||
|
@ -92,8 +92,8 @@ bool performTransiencyCheck()
|
|||
if (transiencyCheckNonExistent
|
||||
&& !Workspace::self()->clients.contains(*it2)
|
||||
&& !Workspace::self()->desktops.contains(*it2)) {
|
||||
qDebug() << "TC:" << *it1 << " has non-existent main client ";
|
||||
qDebug() << "TC2:" << *it2; // this may crash
|
||||
qCDebug(KWIN_CORE) << "TC:" << *it1 << " has non-existent main client ";
|
||||
qCDebug(KWIN_CORE) << "TC2:" << *it2; // this may crash
|
||||
ret = false;
|
||||
continue;
|
||||
}
|
||||
|
@ -110,8 +110,8 @@ bool performTransiencyCheck()
|
|||
if (transiencyCheckNonExistent
|
||||
&& !Workspace::self()->clients.contains(*it2)
|
||||
&& !Workspace::self()->desktops.contains(*it2)) {
|
||||
qDebug() << "TC:" << *it1 << " has non-existent transient ";
|
||||
qDebug() << "TC2:" << *it2; // this may crash
|
||||
qCDebug(KWIN_CORE) << "TC:" << *it1 << " has non-existent transient ";
|
||||
qCDebug(KWIN_CORE) << "TC2:" << *it2; // this may crash
|
||||
ret = false;
|
||||
continue;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ bool performTransiencyCheck()
|
|||
it2 != members.constEnd();
|
||||
++it2) {
|
||||
if ((*it2)->in_group != *it1) {
|
||||
qDebug() << "TC: Group " << *it1 << " contains client " << *it2 << " but client is not in that group" << endl;
|
||||
qCDebug(KWIN_CORE) << "TC: Group " << *it1 << " contains client " << *it2 << " but client is not in that group" << endl;
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
|
@ -155,8 +155,8 @@ static void checkTransiency()
|
|||
{
|
||||
if (--transiencyCheck == 0) {
|
||||
if (!performTransiencyCheck()) {
|
||||
qDebug() << "BT:" << transiencyCheckStartBt << endl;
|
||||
qDebug() << "CLIENT:" << transiencyCheckClient << endl;
|
||||
qCDebug(KWIN_CORE) << "BT:" << transiencyCheckStartBt << endl;
|
||||
qCDebug(KWIN_CORE) << "CLIENT:" << transiencyCheckClient << endl;
|
||||
abort();
|
||||
}
|
||||
transiencyCheckNonExistent = false;
|
||||
|
@ -736,7 +736,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
|
||||
qWarning() << "Client " << this << " has WM_TRANSIENT_FOR poiting to itself." ;
|
||||
qCWarning(KWIN_CORE) << "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,
|
||||
|
@ -754,7 +754,7 @@ xcb_window_t Client::verifyTransientFor(xcb_window_t new_transient_for, bool set
|
|||
}
|
||||
if (Client* new_transient_for_client = workspace()->findClient(Predicate::WindowMatch, new_transient_for)) {
|
||||
if (new_transient_for != before_search) {
|
||||
qDebug() << "Client " << this << " has WM_TRANSIENT_FOR poiting to non-toplevel window "
|
||||
qCDebug(KWIN_CORE) << "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
|
||||
}
|
||||
|
@ -771,7 +771,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) {
|
||||
qWarning() << "Client " << this << " caused WM_TRANSIENT_FOR loop." ;
|
||||
qCWarning(KWIN_CORE) << "Client " << this << " caused WM_TRANSIENT_FOR loop." ;
|
||||
new_transient_for = rootWindow();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ Xkb::Xkb()
|
|||
, m_modifiers(Qt::NoModifier)
|
||||
{
|
||||
if (!m_context) {
|
||||
qDebug() << "Could not create xkb context";
|
||||
qCDebug(KWIN_CORE) << "Could not create xkb context";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,12 +84,12 @@ void Xkb::installKeymap(int fd, uint32_t size)
|
|||
xkb_keymap *keymap = xkb_keymap_new_from_string(m_context, map, XKB_KEYMAP_FORMAT_TEXT_V1, XKB_MAP_COMPILE_PLACEHOLDER);
|
||||
munmap(map, size);
|
||||
if (!keymap) {
|
||||
qDebug() << "Could not map keymap from file";
|
||||
qCDebug(KWIN_CORE) << "Could not map keymap from file";
|
||||
return;
|
||||
}
|
||||
xkb_state *state = xkb_state_new(keymap);
|
||||
if (!state) {
|
||||
qDebug() << "Could not create XKB state";
|
||||
qCDebug(KWIN_CORE) << "Could not create XKB state";
|
||||
xkb_keymap_unref(keymap);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ void LanczosFilter::init()
|
|||
m_inited = true;
|
||||
const bool force = (qstrcmp(qgetenv("KWIN_FORCE_LANCZOS"), "1") == 0);
|
||||
if (force) {
|
||||
qWarning() << "Lanczos Filter forced on by environment variable";
|
||||
qCWarning(KWIN_CORE) << "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 {
|
||||
qDebug() << "Shader is not valid";
|
||||
qCDebug(KWIN_CORE) << "Shader is not valid";
|
||||
m_shader.reset();
|
||||
}
|
||||
}
|
||||
|
|
18
layers.cpp
18
layers.cpp
|
@ -119,12 +119,12 @@ void Workspace::updateStackingOrder(bool propagate_new_clients)
|
|||
force_restacking = false;
|
||||
stacking_order = new_stacking_order;
|
||||
#if 0
|
||||
qDebug() << "stacking:" << changed;
|
||||
qCDebug(KWIN_CORE) << "stacking:" << changed;
|
||||
if (changed || propagate_new_clients) {
|
||||
for (ClientList::ConstIterator it = stacking_order.begin();
|
||||
it != stacking_order.end();
|
||||
++it)
|
||||
qDebug() << (void*)(*it) << *it << ":" << (*it)->layer();
|
||||
qCDebug(KWIN_CORE) << (void*)(*it) << *it << ":" << (*it)->layer();
|
||||
}
|
||||
#endif
|
||||
if (changed || propagate_new_clients) {
|
||||
|
@ -491,11 +491,11 @@ ToplevelList Workspace::constrainedStackingOrder()
|
|||
ToplevelList layer[ NumLayers ];
|
||||
|
||||
#if 0
|
||||
qDebug() << "stacking1:";
|
||||
qCDebug(KWIN_CORE) << "stacking1:";
|
||||
for (ClientList::ConstIterator it = unconstrained_stacking_order.begin();
|
||||
it != unconstrained_stacking_order.end();
|
||||
++it)
|
||||
qDebug() << (void*)(*it) << *it << ":" << (*it)->layer();
|
||||
qCDebug(KWIN_CORE) << (void*)(*it) << *it << ":" << (*it)->layer();
|
||||
#endif
|
||||
// build the order from layers
|
||||
QVector< QMap<Group*, Layer> > minimum_layer(screens()->count());
|
||||
|
@ -524,11 +524,11 @@ ToplevelList Workspace::constrainedStackingOrder()
|
|||
++lay)
|
||||
stacking += layer[ lay ];
|
||||
#if 0
|
||||
qDebug() << "stacking2:";
|
||||
qCDebug(KWIN_CORE) << "stacking2:";
|
||||
for (ClientList::ConstIterator it = stacking.begin();
|
||||
it != stacking.end();
|
||||
++it)
|
||||
qDebug() << (void*)(*it) << *it << ":" << (*it)->layer();
|
||||
qCDebug(KWIN_CORE) << (void*)(*it) << *it << ":" << (*it)->layer();
|
||||
#endif
|
||||
// now keep transients above their mainwindows
|
||||
// TODO this could(?) use some optimization
|
||||
|
@ -590,12 +590,12 @@ ToplevelList Workspace::constrainedStackingOrder()
|
|||
stacking.insert(i2, current);
|
||||
}
|
||||
#if 0
|
||||
qDebug() << "stacking3:";
|
||||
qCDebug(KWIN_CORE) << "stacking3:";
|
||||
for (ClientList::ConstIterator it = stacking.begin();
|
||||
it != stacking.end();
|
||||
++it)
|
||||
qDebug() << (void*)(*it) << *it << ":" << (*it)->layer();
|
||||
qDebug() << "\n\n";
|
||||
qCDebug(KWIN_CORE) << (void*)(*it) << *it << ":" << (*it)->layer();
|
||||
qCDebug(KWIN_CORE) << "\n\n";
|
||||
#endif
|
||||
return stacking;
|
||||
}
|
||||
|
|
17
logind.cpp
17
logind.cpp
|
@ -29,6 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include "utils.h"
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -116,11 +117,11 @@ void LogindIntegration::logindServiceRegistered()
|
|||
return;
|
||||
}
|
||||
if (!reply.isValid()) {
|
||||
qDebug() << "The session is not registered with logind" << reply.error().message();
|
||||
qCDebug(KWIN_CORE) << "The session is not registered with logind" << reply.error().message();
|
||||
return;
|
||||
}
|
||||
m_sessionPath = reply.value().path();
|
||||
qDebug() << "Session path:" << m_sessionPath;
|
||||
qCDebug(KWIN_CORE) << "Session path:" << m_sessionPath;
|
||||
m_connected = true;
|
||||
connectSessionPropertiesChanged();
|
||||
getSessionActive();
|
||||
|
@ -157,7 +158,7 @@ void LogindIntegration::getSessionActive()
|
|||
QDBusPendingReply<QVariant> reply = *self;
|
||||
self->deleteLater();
|
||||
if (!reply.isValid()) {
|
||||
qDebug() << "Failed to get Active Property of logind session:" << reply.error().message();
|
||||
qCDebug(KWIN_CORE) << "Failed to get Active Property of logind session:" << reply.error().message();
|
||||
return;
|
||||
}
|
||||
const bool active = reply.value().toBool();
|
||||
|
@ -187,11 +188,11 @@ void LogindIntegration::takeControl()
|
|||
QDBusPendingReply<void> reply = *self;
|
||||
self->deleteLater();
|
||||
if (!reply.isValid()) {
|
||||
qDebug() << "Failed to get session control" << reply.error().message();
|
||||
qCDebug(KWIN_CORE) << "Failed to get session control" << reply.error().message();
|
||||
emit hasSessionControlChanged(false);
|
||||
return;
|
||||
}
|
||||
qDebug() << "Gained session control";
|
||||
qCDebug(KWIN_CORE) << "Gained session control";
|
||||
m_sessionControl = true;
|
||||
emit hasSessionControlChanged(true);
|
||||
}
|
||||
|
@ -217,7 +218,7 @@ int LogindIntegration::takeDevice(const char *path)
|
|||
{
|
||||
struct stat st;
|
||||
if (stat(path, &st) < 0) {
|
||||
qDebug() << "Could not stat the path";
|
||||
qCDebug(KWIN_CORE) << "Could not stat the path";
|
||||
return -1;
|
||||
}
|
||||
QDBusMessage message = QDBusMessage::createMethodCall(s_login1Service,
|
||||
|
@ -228,7 +229,7 @@ int LogindIntegration::takeDevice(const char *path)
|
|||
// intended to be a blocking call
|
||||
QDBusMessage reply = m_bus.call(message);
|
||||
if (reply.type() == QDBusMessage::ErrorMessage) {
|
||||
qDebug() << "Could not take device" << path << ", cause: " << reply.errorMessage();
|
||||
qCDebug(KWIN_CORE) << "Could not take device" << path << ", cause: " << reply.errorMessage();
|
||||
return -1;
|
||||
}
|
||||
return dup(reply.arguments().first().value<QDBusUnixFileDescriptor>().fileDescriptor());
|
||||
|
@ -238,7 +239,7 @@ void LogindIntegration::releaseDevice(int fd)
|
|||
{
|
||||
struct stat st;
|
||||
if (fstat(fd, &st) < 0) {
|
||||
qDebug() << "Could not stat the file descriptor";
|
||||
qCDebug(KWIN_CORE) << "Could not stat the file descriptor";
|
||||
return;
|
||||
}
|
||||
QDBusMessage message = QDBusMessage::createMethodCall(s_login1Service,
|
||||
|
|
9
main.cpp
9
main.cpp
|
@ -202,10 +202,10 @@ void Application::crashChecking()
|
|||
else
|
||||
::exit(1);
|
||||
if (cmd.length() > 500) {
|
||||
qDebug() << "Command is too long, truncating";
|
||||
qCDebug(KWIN_CORE) << "Command is too long, truncating";
|
||||
cmd = cmd.left(500);
|
||||
}
|
||||
qDebug() << "Starting" << cmd << "and exiting";
|
||||
qCDebug(KWIN_CORE) << "Starting" << cmd << "and exiting";
|
||||
char buf[1024];
|
||||
sprintf(buf, "%s &", cmd.toAscii().data());
|
||||
system(buf);
|
||||
|
@ -213,7 +213,7 @@ void Application::crashChecking()
|
|||
}
|
||||
if (crashes >= 2) {
|
||||
// Disable compositing if we have had too many crashes
|
||||
qDebug() << "Too many crashes recently, disabling compositing";
|
||||
qCDebug(KWIN_CORE) << "Too many crashes recently, disabling compositing";
|
||||
KConfigGroup compgroup(KSharedConfig::openConfig(), "Compositing");
|
||||
compgroup.writeEntry("Enabled", false);
|
||||
}
|
||||
|
@ -343,7 +343,8 @@ void Application::setupLocalizedString()
|
|||
void Application::setupLoggingCategoryFilters()
|
||||
{
|
||||
QLoggingCategory::setFilterRules(QStringLiteral("aurorae.debug = true\n") +
|
||||
QStringLiteral("kwineffects.debug = true"));
|
||||
QStringLiteral("kwineffects.debug = true\n") +
|
||||
QStringLiteral("kwin_core.debug = true"));
|
||||
}
|
||||
|
||||
void Application::notifyKSplash()
|
||||
|
|
|
@ -47,7 +47,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()) {
|
||||
qDebug() << "Error occurred while lowering support window: " << error->error_code;
|
||||
qCDebug(KWIN_CORE) << "Error occurred while lowering support window: " << error->error_code;
|
||||
}
|
||||
|
||||
const NET::Properties properties = NET::Supported |
|
||||
|
|
29
options.cpp
29
options.cpp
|
@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include "options.h"
|
||||
#include "config-kwin.h"
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef KCMRULES
|
||||
|
||||
|
@ -65,7 +66,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?
|
||||
qDebug() << "Vertical Refresh Rate (as detected by XF86VM): " << rate << "Hz";
|
||||
qCDebug(KWIN_CORE) << "Vertical Refresh Rate (as detected by XF86VM): " << rate << "Hz";
|
||||
}
|
||||
}
|
||||
if (rate < 1)
|
||||
|
@ -85,7 +86,7 @@ int currentRefreshRate()
|
|||
rate = -1;
|
||||
else
|
||||
rate = qRound(frate);
|
||||
qDebug() << "Vertical Refresh Rate (as detected by nvidia-settings): " << rate << "Hz";
|
||||
qCDebug(KWIN_CORE) << "Vertical Refresh Rate (as detected by nvidia-settings): " << rate << "Hz";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +103,7 @@ int currentRefreshRate()
|
|||
// however, additional throttling prevents very high rates from taking place anyway
|
||||
else if (rate > 1000)
|
||||
rate = 1000;
|
||||
qDebug() << "Vertical Refresh rate " << rate << "Hz";
|
||||
qCDebug(KWIN_CORE) << "Vertical Refresh rate " << rate << "Hz";
|
||||
return rate;
|
||||
}
|
||||
|
||||
|
@ -784,24 +785,24 @@ void Options::setGlPlatformInterface(OpenGLPlatformInterface interface)
|
|||
const QByteArray envOpenGLInterface(qgetenv("KWIN_OPENGL_INTERFACE"));
|
||||
if (!envOpenGLInterface.isEmpty()) {
|
||||
if (qstrcmp(envOpenGLInterface, "egl") == 0) {
|
||||
qDebug() << "Forcing EGL native interface through environment variable";
|
||||
qCDebug(KWIN_CORE) << "Forcing EGL native interface through environment variable";
|
||||
interface = EglPlatformInterface;
|
||||
} else if (qstrcmp(envOpenGLInterface, "glx") == 0) {
|
||||
qDebug() << "Forcing GLX native interface through environment variable";
|
||||
qCDebug(KWIN_CORE) << "Forcing GLX native interface through environment variable";
|
||||
interface = GlxPlatformInterface;
|
||||
}
|
||||
}
|
||||
if (kwinApp()->shouldUseWaylandForCompositing() && interface == GlxPlatformInterface) {
|
||||
// Glx is impossible on Wayland, enforce egl
|
||||
qDebug() << "Forcing EGL native interface for Wayland mode";
|
||||
qCDebug(KWIN_CORE) << "Forcing EGL native interface for Wayland mode";
|
||||
interface = EglPlatformInterface;
|
||||
}
|
||||
#ifdef KWIN_HAVE_OPENGLES
|
||||
qDebug() << "Forcing EGL native interface as compiled against OpenGL ES";
|
||||
qCDebug(KWIN_CORE) << "Forcing EGL native interface as compiled against OpenGL ES";
|
||||
interface = EglPlatformInterface;
|
||||
#else
|
||||
#ifndef KWIN_HAVE_EGL
|
||||
qDebug() << "Forcing GLX native interface as compiled without EGL support";
|
||||
qCDebug(KWIN_CORE) << "Forcing GLX native interface as compiled without EGL support";
|
||||
interface = GlxPlatformInterface;
|
||||
#endif
|
||||
#endif
|
||||
|
@ -934,29 +935,29 @@ bool Options::loadCompositingConfig (bool force)
|
|||
if (const char *c = getenv("KWIN_COMPOSE")) {
|
||||
switch(c[0]) {
|
||||
case 'O':
|
||||
qDebug() << "Compositing forced to OpenGL mode by environment variable";
|
||||
qCDebug(KWIN_CORE) << "Compositing forced to OpenGL mode by environment variable";
|
||||
compositingMode = OpenGLCompositing;
|
||||
useCompositing = true;
|
||||
break;
|
||||
case 'X':
|
||||
qDebug() << "Compositing forced to XRender mode by environment variable";
|
||||
qCDebug(KWIN_CORE) << "Compositing forced to XRender mode by environment variable";
|
||||
compositingMode = XRenderCompositing;
|
||||
useCompositing = true;
|
||||
break;
|
||||
case 'Q':
|
||||
qDebug() << "Compositing forced to QPainter mode by environment variable";
|
||||
qCDebug(KWIN_CORE) << "Compositing forced to QPainter mode by environment variable";
|
||||
compositingMode = QPainterCompositing;
|
||||
useCompositing = true;
|
||||
break;
|
||||
case 'N':
|
||||
if (getenv("KDE_FAILSAFE"))
|
||||
qDebug() << "Compositing disabled forcefully by KDE failsafe mode";
|
||||
qCDebug(KWIN_CORE) << "Compositing disabled forcefully by KDE failsafe mode";
|
||||
else
|
||||
qDebug() << "Compositing disabled forcefully by environment variable";
|
||||
qCDebug(KWIN_CORE) << "Compositing disabled forcefully by environment variable";
|
||||
compositingMode = NoCompositing;
|
||||
break;
|
||||
default:
|
||||
qDebug() << "Unknown KWIN_COMPOSE mode set, ignoring";
|
||||
qCDebug(KWIN_CORE) << "Unknown KWIN_COMPOSE mode set, ignoring";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -153,12 +153,12 @@ void CompositedOutlineVisual::show()
|
|||
// TODO: fileName should be configurable
|
||||
const QString fileName = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(KWIN_NAME) + QStringLiteral("/outline/plasma/outline.qml"));
|
||||
if (fileName.isEmpty()) {
|
||||
qDebug() << "Could not locate outline.qml";
|
||||
qCDebug(KWIN_CORE) << "Could not locate outline.qml";
|
||||
return;
|
||||
}
|
||||
m_qmlComponent->loadUrl(QUrl::fromLocalFile(fileName));
|
||||
if (m_qmlComponent->isError()) {
|
||||
qDebug() << "Component failed to load: " << m_qmlComponent->errors();
|
||||
qCDebug(KWIN_CORE) << "Component failed to load: " << m_qmlComponent->errors();
|
||||
} else {
|
||||
m_mainItem.reset(m_qmlComponent->create(m_qmlContext.data()));
|
||||
}
|
||||
|
|
|
@ -975,7 +975,7 @@ WindowRules RuleBook::find(const Client* c, bool ignore_temporary)
|
|||
}
|
||||
if ((*it)->match(c)) {
|
||||
Rules* rule = *it;
|
||||
qDebug() << "Rule found:" << rule << ":" << c;
|
||||
qCDebug(KWIN_CORE) << "Rule found:" << rule << ":" << c;
|
||||
if (rule->isTemporary())
|
||||
it = m_rules.erase(it);
|
||||
else
|
||||
|
|
|
@ -944,20 +944,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)) {
|
||||
qDebug() << "Creating window pixmap failed: " << error->error_code;
|
||||
qCDebug(KWIN_CORE) << "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) {
|
||||
qDebug() << "Creating window pixmap failed: " << this;
|
||||
qCDebug(KWIN_CORE) << "Creating window pixmap failed: " << this;
|
||||
xcb_free_pixmap(connection(), pix);
|
||||
return;
|
||||
}
|
||||
if (!windowGeometry ||
|
||||
windowGeometry->width != toplevel()->width() || windowGeometry->height != toplevel()->height()) {
|
||||
qDebug() << "Creating window pixmap failed: " << this;
|
||||
qCDebug(KWIN_CORE) << "Creating window pixmap failed: " << this;
|
||||
xcb_free_pixmap(connection(), pix);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -162,18 +162,18 @@ bool SyncObject::finish()
|
|||
glGetSynciv(m_sync, GL_SYNC_STATUS, 1, nullptr, &value);
|
||||
|
||||
if (value != GL_SIGNALED) {
|
||||
qDebug() << "Waiting for X fence to finish";
|
||||
qCDebug(KWIN_CORE) << "Waiting for X fence to finish";
|
||||
|
||||
// Wait for the fence to become signaled with a one second timeout
|
||||
const GLenum result = glClientWaitSync(m_sync, 0, 1000000000);
|
||||
|
||||
switch (result) {
|
||||
case GL_TIMEOUT_EXPIRED:
|
||||
qWarning() << "Timeout while waiting for X fence";
|
||||
qCWarning(KWIN_CORE) << "Timeout while waiting for X fence";
|
||||
return false;
|
||||
|
||||
case GL_WAIT_FAILED:
|
||||
qWarning() << "glClientWaitSync() failed";
|
||||
qCWarning(KWIN_CORE) << "glClientWaitSync() failed";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ OpenGLBackend::~OpenGLBackend()
|
|||
|
||||
void OpenGLBackend::setFailed(const QString &reason)
|
||||
{
|
||||
qWarning() << "Creating the OpenGL rendering failed: " << reason;
|
||||
qCWarning(KWIN_CORE) << "Creating the OpenGL rendering failed: " << reason;
|
||||
m_failed = true;
|
||||
}
|
||||
|
||||
|
@ -368,13 +368,13 @@ SceneOpenGL::SceneOpenGL(Workspace* ws, OpenGLBackend *backend)
|
|||
#ifndef KWIN_HAVE_OPENGLES
|
||||
if (!hasGLExtension(QByteArrayLiteral("GL_ARB_texture_non_power_of_two"))
|
||||
&& !hasGLExtension(QByteArrayLiteral("GL_ARB_texture_rectangle"))) {
|
||||
qCritical() << "GL_ARB_texture_non_power_of_two and GL_ARB_texture_rectangle missing";
|
||||
qCCritical(KWIN_CORE) << "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)) {
|
||||
qCritical() << "KWin requires at least Mesa 8.0 for OpenGL compositing.";
|
||||
qCCritical(KWIN_CORE) << "KWin requires at least Mesa 8.0 for OpenGL compositing.";
|
||||
init_ok = false;
|
||||
return;
|
||||
}
|
||||
|
@ -398,10 +398,10 @@ SceneOpenGL::SceneOpenGL(Workspace* ws, OpenGLBackend *backend)
|
|||
const QByteArray useExplicitSync = qgetenv("KWIN_EXPLICIT_SYNC");
|
||||
|
||||
if (useExplicitSync != "0") {
|
||||
qDebug() << "Initializing fences for synchronization with the X command stream";
|
||||
qCDebug(KWIN_CORE) << "Initializing fences for synchronization with the X command stream";
|
||||
m_syncManager = new SyncManager;
|
||||
} else {
|
||||
qDebug() << "Explicit synchronization with the X command stream disabled by environment variable";
|
||||
qCDebug(KWIN_CORE) << "Explicit synchronization with the X command stream disabled by environment variable";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -436,7 +436,7 @@ void SceneOpenGL::initDebugOutput()
|
|||
switch (type) {
|
||||
case GL_DEBUG_TYPE_ERROR:
|
||||
case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR:
|
||||
qWarning("%#x: %.*s", id, length, message);
|
||||
qCWarning(KWIN_CORE, "%#x: %.*s", id, length, message);
|
||||
break;
|
||||
|
||||
case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
|
||||
|
@ -444,7 +444,7 @@ void SceneOpenGL::initDebugOutput()
|
|||
case GL_DEBUG_TYPE_PERFORMANCE:
|
||||
case GL_DEBUG_TYPE_OTHER:
|
||||
default:
|
||||
qDebug("%#x: %.*s", id, length, message);
|
||||
qCDebug(KWIN_CORE, "%#x: %.*s", id, length, message);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
@ -515,9 +515,9 @@ SceneOpenGL *SceneOpenGL::createScene()
|
|||
}
|
||||
if (!scene) {
|
||||
if (GLPlatform::instance()->recommendedCompositor() == XRenderCompositing) {
|
||||
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";
|
||||
qCCritical(KWIN_CORE) << "OpenGL driver recommends XRender based compositing. Falling back to XRender.";
|
||||
qCCritical(KWIN_CORE) << "To overwrite the detection use the environment variable KWIN_COMPOSE";
|
||||
qCCritical(KWIN_CORE) << "For more information see http://community.kde.org/KWin/Environment_Variables#KWIN_COMPOSE";
|
||||
QTimer::singleShot(0, Compositor::self(), SLOT(fallbackToXRenderCompositing()));
|
||||
}
|
||||
delete backend;
|
||||
|
@ -581,15 +581,15 @@ void SceneOpenGL::handleGraphicsReset(GLenum status)
|
|||
{
|
||||
switch (status) {
|
||||
case GL_GUILTY_CONTEXT_RESET_KWIN:
|
||||
qDebug() << "A graphics reset attributable to the current GL context occurred.";
|
||||
qCDebug(KWIN_CORE) << "A graphics reset attributable to the current GL context occurred.";
|
||||
break;
|
||||
|
||||
case GL_INNOCENT_CONTEXT_RESET_KWIN:
|
||||
qDebug() << "A graphics reset not attributable to the current GL context occurred.";
|
||||
qCDebug(KWIN_CORE) << "A graphics reset not attributable to the current GL context occurred.";
|
||||
break;
|
||||
|
||||
case GL_UNKNOWN_CONTEXT_RESET_KWIN:
|
||||
qDebug() << "A graphics reset of an unknown cause occurred.";
|
||||
qCDebug(KWIN_CORE) << "A graphics reset of an unknown cause occurred.";
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -603,7 +603,7 @@ void SceneOpenGL::handleGraphicsReset(GLenum status)
|
|||
while (timer.elapsed() < 10000 && glGetGraphicsResetStatus() != GL_NO_ERROR)
|
||||
usleep(50);
|
||||
|
||||
qDebug() << "Attempting to reset compositing.";
|
||||
qCDebug(KWIN_CORE) << "Attempting to reset compositing.";
|
||||
QMetaObject::invokeMethod(this, "resetCompositing", Qt::QueuedConnection);
|
||||
|
||||
KNotification::event(QStringLiteral("graphicsreset"), i18n("Desktop effects were restarted due to a graphics reset"));
|
||||
|
@ -672,8 +672,8 @@ qint64 SceneOpenGL::paint(QRegion damage, ToplevelList toplevels)
|
|||
|
||||
if (m_currentFence) {
|
||||
if (!m_syncManager->updateFences()) {
|
||||
qDebug() << "Aborting explicit synchronization with the X command stream.";
|
||||
qDebug() << "Future frames will be rendered unsynchronized.";
|
||||
qCDebug(KWIN_CORE) << "Aborting explicit synchronization with the X command stream.";
|
||||
qCDebug(KWIN_CORE) << "Future frames will be rendered unsynchronized.";
|
||||
delete m_syncManager;
|
||||
m_syncManager = nullptr;
|
||||
}
|
||||
|
@ -884,7 +884,7 @@ bool SceneOpenGL2::supported(OpenGLBackend *backend)
|
|||
const QByteArray forceEnv = qgetenv("KWIN_COMPOSE");
|
||||
if (!forceEnv.isEmpty()) {
|
||||
if (qstrcmp(forceEnv, "O2") == 0) {
|
||||
qDebug() << "OpenGL 2 compositing enforced by environment variable";
|
||||
qCDebug(KWIN_CORE) << "OpenGL 2 compositing enforced by environment variable";
|
||||
return true;
|
||||
} else {
|
||||
// OpenGL 2 disabled by environment variable
|
||||
|
@ -895,7 +895,7 @@ bool SceneOpenGL2::supported(OpenGLBackend *backend)
|
|||
return false;
|
||||
}
|
||||
if (GLPlatform::instance()->recommendedCompositor() < OpenGL2Compositing) {
|
||||
qDebug() << "Driver does not recommend OpenGL 2 compositing";
|
||||
qCDebug(KWIN_CORE) << "Driver does not recommend OpenGL 2 compositing";
|
||||
#ifndef KWIN_HAVE_OPENGLES
|
||||
return false;
|
||||
#endif
|
||||
|
@ -921,7 +921,7 @@ SceneOpenGL2::SceneOpenGL2(OpenGLBackend *backend)
|
|||
GLRenderTarget::setVirtualScreenSize(s);
|
||||
GLVertexBuffer::setVirtualScreenSize(s);
|
||||
if (!ShaderManager::instance()->isValid()) {
|
||||
qDebug() << "No Scene Shaders available";
|
||||
qCDebug(KWIN_CORE) << "No Scene Shaders available";
|
||||
init_ok = false;
|
||||
return;
|
||||
}
|
||||
|
@ -929,7 +929,7 @@ SceneOpenGL2::SceneOpenGL2(OpenGLBackend *backend)
|
|||
// push one shader on the stack so that one is always bound
|
||||
ShaderManager::instance()->pushShader(ShaderTrait::MapTexture);
|
||||
if (checkGLError("Init")) {
|
||||
qCritical() << "OpenGL 2 compositing setup failed";
|
||||
qCCritical(KWIN_CORE) << "OpenGL 2 compositing setup failed";
|
||||
init_ok = false;
|
||||
return; // error
|
||||
}
|
||||
|
@ -943,12 +943,12 @@ SceneOpenGL2::SceneOpenGL2(OpenGLBackend *backend)
|
|||
#endif
|
||||
|
||||
if (!ShaderManager::instance()->selfTest()) {
|
||||
qCritical() << "ShaderManager self test failed";
|
||||
qCCritical(KWIN_CORE) << "ShaderManager self test failed";
|
||||
init_ok = false;
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug() << "OpenGL 2 compositing successfully initialized";
|
||||
qCDebug(KWIN_CORE) << "OpenGL 2 compositing successfully initialized";
|
||||
init_ok = true;
|
||||
}
|
||||
|
||||
|
@ -1087,7 +1087,7 @@ ColorCorrection *SceneOpenGL2::colorCorrection()
|
|||
|
||||
void SceneOpenGL2::slotColorCorrectedChanged(bool recreateShaders)
|
||||
{
|
||||
qDebug() << "Color correction:" << options->isColorCorrected();
|
||||
qCDebug(KWIN_CORE) << "Color correction:" << options->isColorCorrected();
|
||||
if (options->isColorCorrected() && m_colorCorrection.isNull()) {
|
||||
m_colorCorrection.reset(new ColorCorrection(this));
|
||||
if (!m_colorCorrection->setEnabled(true)) {
|
||||
|
@ -1585,7 +1585,7 @@ bool OpenGLWindowPixmap::bind()
|
|||
if (success)
|
||||
toplevel()->resetDamage();
|
||||
else
|
||||
qDebug() << "Failed to bind window";
|
||||
qCDebug(KWIN_CORE) << "Failed to bind window";
|
||||
return success;
|
||||
}
|
||||
|
||||
|
@ -2271,7 +2271,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...
|
||||
qDebug() << "Triple buffering detection:" << QString(blocks ? QStringLiteral("NOT available") : QStringLiteral("Available")) <<
|
||||
qCDebug(KWIN_CORE) << "Triple buffering detection:" << QString(blocks ? QStringLiteral("NOT available") : QStringLiteral("Available")) <<
|
||||
" - Mean block time:" << m_time/(1000.0*1000.0) << "ms";
|
||||
return blocks ? 'd' : 't';
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ void QPainterBackend::screenGeometryChanged(const QSize &size)
|
|||
|
||||
void QPainterBackend::setFailed(const QString &reason)
|
||||
{
|
||||
qWarning() << "Creating the XRender backend failed: " << reason;
|
||||
qCWarning(KWIN_CORE) << "Creating the XRender backend failed: " << reason;
|
||||
m_failed = true;
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ void WaylandQPainterBackend::prepareRenderingFrame()
|
|||
const QSize size(Wayland::WaylandBackend::self()->shellSurfaceSize());
|
||||
m_buffer = Wayland::WaylandBackend::self()->shmPool()->getBuffer(size, size.width() * 4);
|
||||
if (!m_buffer) {
|
||||
qDebug() << "Did not get a new Buffer from Shm Pool";
|
||||
qCDebug(KWIN_CORE) << "Did not get a new Buffer from Shm Pool";
|
||||
m_backBuffer = QImage();
|
||||
return;
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ void WaylandQPainterBackend::prepareRenderingFrame()
|
|||
m_backBuffer = QImage(b->address(), size.width(), size.height(), QImage::Format_RGB32);
|
||||
m_backBuffer.fill(Qt::transparent);
|
||||
m_needsFullRepaint = true;
|
||||
qDebug() << "Created a new back buffer";
|
||||
qCDebug(KWIN_CORE) << "Created a new back buffer";
|
||||
}
|
||||
|
||||
void WaylandQPainterBackend::remapBuffer()
|
||||
|
@ -173,7 +173,7 @@ void WaylandQPainterBackend::remapBuffer()
|
|||
}
|
||||
const QSize size = m_backBuffer.size();
|
||||
m_backBuffer = QImage(b->address(), size.width(), size.height(), QImage::Format_RGB32);
|
||||
qDebug() << "Remapped our back buffer";
|
||||
qCDebug(KWIN_CORE) << "Remapped our back buffer";
|
||||
}
|
||||
|
||||
bool WaylandQPainterBackend::needsFullRepaint() const
|
||||
|
|
|
@ -21,6 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*********************************************************************/
|
||||
#include "scene_xrender.h"
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
|
||||
|
||||
#include "toplevel.h"
|
||||
|
@ -98,7 +100,7 @@ void XRenderBackend::setBuffer(xcb_render_picture_t buffer)
|
|||
|
||||
void XRenderBackend::setFailed(const QString& reason)
|
||||
{
|
||||
qCritical() << "Creating the XRender backend failed: " << reason;
|
||||
qCCritical(KWIN_CORE) << "Creating the XRender backend failed: " << reason;
|
||||
m_failed = true;
|
||||
}
|
||||
|
||||
|
@ -270,7 +272,7 @@ void WaylandXRenderBackend::createBuffer()
|
|||
xcb_free_pixmap(connection(), pixmap); // The picture owns the pixmap now
|
||||
setBuffer(b);
|
||||
|
||||
qDebug() << "Offscreen shm pixmap created";
|
||||
qCDebug(KWIN_CORE) << "Offscreen shm pixmap created";
|
||||
}
|
||||
|
||||
void WaylandXRenderBackend::present(int mask, const QRegion &damage)
|
||||
|
@ -285,7 +287,7 @@ void WaylandXRenderBackend::present(int mask, const QRegion &damage)
|
|||
const QSize &size = wl->shellSurfaceSize();
|
||||
auto buffer = wl->shmPool()->createBuffer(size, size.width() * 4, m_shm->buffer());
|
||||
if (!buffer) {
|
||||
qDebug() << "Did not get a buffer";
|
||||
qCDebug(KWIN_CORE) << "Did not get a buffer";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include "wayland_backend.h"
|
||||
#include <KWayland/Client/output.h>
|
||||
#include "utils.h"
|
||||
#include "xcbutils.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
@ -115,7 +116,7 @@ static bool setNewScreenSize(const QSize &size)
|
|||
auto c = xcb_randr_set_screen_size_checked(connection(), rootWindow(), size.width(), size.height(), 1, 1);
|
||||
ScopedCPointer<xcb_generic_error_t> error(xcb_request_check(connection(), c));
|
||||
if (!error.isNull()) {
|
||||
qDebug() << "Error setting screen size: " << error->error_code;
|
||||
qCDebug(KWIN_CORE) << "Error setting screen size: " << error->error_code;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -124,7 +125,7 @@ static bool setNewScreenSize(const QSize &size)
|
|||
static xcb_randr_crtc_t getCrtc(const xcb_randr_get_screen_resources_current_reply_t* r)
|
||||
{
|
||||
if (xcb_randr_get_screen_resources_current_crtcs_length(r) == 0) {
|
||||
qDebug() << "No CRTCs";
|
||||
qCDebug(KWIN_CORE) << "No CRTCs";
|
||||
return XCB_NONE;
|
||||
}
|
||||
return xcb_randr_get_screen_resources_current_crtcs(r)[0];
|
||||
|
@ -143,7 +144,7 @@ static xcb_randr_output_t getOutputForCrtc(xcb_randr_crtc_t crtc)
|
|||
static xcb_randr_mode_t createNewMode(const QSize &size)
|
||||
{
|
||||
// need to create the new mode
|
||||
qDebug() << "Creating a new mode";
|
||||
qCDebug(KWIN_CORE) << "Creating a new mode";
|
||||
QString name(QString::number(size.width()));
|
||||
name.append('x');
|
||||
name.append(QString::number(size.height()));
|
||||
|
@ -177,7 +178,7 @@ static xcb_randr_mode_t getModeForSize(const QSize &size, const xcb_randr_get_sc
|
|||
for (int i = 0; i < modeInfoLength; ++i) {
|
||||
xcb_randr_mode_info_t modeInfo = infos[i];
|
||||
if (modeInfo.width == size.width() && modeInfo.height == size.height()) {
|
||||
qDebug() << "Found our required mode";
|
||||
qCDebug(KWIN_CORE) << "Found our required mode";
|
||||
return modeInfo.id;
|
||||
}
|
||||
}
|
||||
|
@ -195,11 +196,11 @@ static bool addModeToOutput(xcb_randr_output_t output, xcb_randr_mode_t mode)
|
|||
return true;
|
||||
}
|
||||
}
|
||||
qDebug() << "Need to add the mode to output";
|
||||
qCDebug(KWIN_CORE) << "Need to add the mode to output";
|
||||
auto c = xcb_randr_add_output_mode_checked(connection(), output, mode);
|
||||
ScopedCPointer<xcb_generic_error_t> error(xcb_request_check(connection(), c));
|
||||
if (!error.isNull()) {
|
||||
qDebug() << "Error while adding mode to output: " << error->error_code;
|
||||
qCDebug(KWIN_CORE) << "Error while adding mode to output: " << error->error_code;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -208,7 +209,7 @@ static bool addModeToOutput(xcb_randr_output_t output, xcb_randr_mode_t mode)
|
|||
void WaylandScreens::updateXRandr()
|
||||
{
|
||||
if (!Xcb::Extensions::self()->isRandrAvailable()) {
|
||||
qDebug() << "No RandR extension available, cannot sync with X";
|
||||
qCDebug(KWIN_CORE) << "No RandR extension available, cannot sync with X";
|
||||
return;
|
||||
}
|
||||
QRegion screens;
|
||||
|
|
2
sm.cpp
2
sm.cpp
|
@ -178,7 +178,7 @@ void Workspace::storeSubSession(const QString &name, QSet<QByteArray> sessionIds
|
|||
if (!sessionIds.contains(sessionId))
|
||||
continue;
|
||||
|
||||
qDebug() << "storing" << sessionId;
|
||||
qCDebug(KWIN_CORE) << "storing" << sessionId;
|
||||
count++;
|
||||
if (c->isActive())
|
||||
active_client = count;
|
||||
|
|
|
@ -243,7 +243,7 @@ void TabGroup::setCurrent(Client* c, bool force)
|
|||
void TabGroup::sync(const char *property, Client *c)
|
||||
{
|
||||
if (c->metaObject()->indexOfProperty(property) > -1) {
|
||||
qWarning("caught attempt to sync non dynamic property: %s", property);
|
||||
qCWarning(KWIN_CORE, "caught attempt to sync non dynamic property: %s", property);
|
||||
return;
|
||||
}
|
||||
QVariant v = c->property(property);
|
||||
|
@ -286,7 +286,7 @@ void TabGroup::blockStateUpdates(bool more) {
|
|||
more ? ++m_stateUpdatesBlocked : --m_stateUpdatesBlocked;
|
||||
if (m_stateUpdatesBlocked < 0) {
|
||||
m_stateUpdatesBlocked = 0;
|
||||
qWarning("TabGroup: Something is messed up with TabGroup::blockStateUpdates() invocation\nReleased more than blocked!");
|
||||
qCWarning(KWIN_CORE, "TabGroup: Something is messed up with TabGroup::blockStateUpdates() invocation\nReleased more than blocked!");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,5 +27,5 @@ if (HAVE_INPUT)
|
|||
${KWIN_SOURCE_DIR}/logind.cpp
|
||||
)
|
||||
add_executable(libinputtest ${libinputtest_SRCS})
|
||||
target_link_libraries(libinputtest Qt5::Core Qt5::DBus Libinput::Libinput ${UDEV_LIBS})
|
||||
target_link_libraries(libinputtest Qt5::Core Qt5::DBus Libinput::Libinput ${UDEV_LIBS} KF5::WindowSystem)
|
||||
endif()
|
||||
|
|
|
@ -22,11 +22,14 @@
|
|||
#include "../logind.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
Q_LOGGING_CATEGORY(KWIN_CORE, "kwin_core")
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
using namespace KWin::LibInput;
|
||||
|
|
|
@ -73,7 +73,7 @@ void AbstractThumbnailItem::findParentEffectWindow()
|
|||
if (effects) {
|
||||
QQuickWindow *qw = window();
|
||||
if (!qw) {
|
||||
qDebug() << "No QQuickWindow assigned yet";
|
||||
qCDebug(KWIN_CORE) << "No QQuickWindow assigned yet";
|
||||
return;
|
||||
}
|
||||
if (auto *w = static_cast<EffectWindowImpl*>(effects->findWindow(qw->winId()))) {
|
||||
|
|
|
@ -382,7 +382,7 @@ void Toplevel::getWmOpaqueRegion()
|
|||
}
|
||||
XFree(data);
|
||||
} else {
|
||||
qWarning() << "XGetWindowProperty failed";
|
||||
qCWarning(KWIN_CORE) << "XGetWindowProperty failed";
|
||||
break;
|
||||
}
|
||||
} while (bytes_after_return > 0);
|
||||
|
|
|
@ -317,7 +317,7 @@ void UserActionsMenu::init()
|
|||
args << QStringLiteral("--icon") << QStringLiteral("preferences-system-windows") << configModules(false);
|
||||
QString error;
|
||||
if (KToolInvocation::kdeinitExec(QStringLiteral("kcmshell5"), args, &error) != 0) {
|
||||
qDebug() << "Failed to start kcmshell5: " << error;
|
||||
qCDebug(KWIN_CORE) << "Failed to start kcmshell5: " << error;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -441,7 +441,7 @@ void UserActionsMenu::showHideActivityMenu()
|
|||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
const QStringList &openActivities_ = Activities::self()->running();
|
||||
qDebug() << "activities:" << openActivities_.size();
|
||||
qCDebug(KWIN_CORE) << "activities:" << openActivities_.size();
|
||||
if (openActivities_.size() < 2) {
|
||||
delete m_activityMenu;
|
||||
m_activityMenu = 0;
|
||||
|
@ -1839,7 +1839,7 @@ void Workspace::slotInvertScreen()
|
|||
continue;
|
||||
}
|
||||
if (gamma->size) {
|
||||
qDebug() << "inverting screen using XRRSetCrtcGamma";
|
||||
qCDebug(KWIN_CORE) << "inverting screen using XRRSetCrtcGamma";
|
||||
const int half = gamma->size / 2 + 1;
|
||||
|
||||
uint16_t *red = gamma.red();
|
||||
|
@ -1872,7 +1872,7 @@ void Workspace::slotInvertScreen()
|
|||
green = new unsigned short[size];
|
||||
blue = new unsigned short[size];
|
||||
if (XF86VidModeGetGammaRamp(display(), scrn, size, red, green, blue)) {
|
||||
qDebug() << "inverting screen using XF86VidModeSetGammaRamp";
|
||||
qCDebug(KWIN_CORE) << "inverting screen using XF86VidModeSetGammaRamp";
|
||||
const int half = size / 2 + 1;
|
||||
unsigned short swap;
|
||||
for (int i = 0; i < half; ++i) {
|
||||
|
@ -1895,13 +1895,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)) {
|
||||
qDebug() << "inverting screen using Effect plugin";
|
||||
qCDebug(KWIN_CORE) << "inverting screen using Effect plugin";
|
||||
QMetaObject::invokeMethod(inverter, "toggleScreenInversion", Qt::DirectConnection);
|
||||
}
|
||||
}
|
||||
|
||||
if (!succeeded)
|
||||
qDebug() << "sorry - neither Xrandr, nor XF86VidModeSetGammaRamp worked and there's no inversion supplying effect plugin either";
|
||||
qCDebug(KWIN_CORE) << "sorry - neither Xrandr, nor XF86VidModeSetGammaRamp worked and there's no inversion supplying effect plugin either";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#endif
|
||||
|
||||
Q_LOGGING_CATEGORY(KWIN_CORE, "kwin_core")
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
|
@ -135,7 +136,7 @@ void ungrabXKeyboard()
|
|||
{
|
||||
if (!keyboard_grabbed) {
|
||||
// grabXKeyboard() may fail sometimes, so don't fail, but at least warn anyway
|
||||
qDebug() << "ungrabXKeyboard() called but keyboard not grabbed!";
|
||||
qCDebug(KWIN_CORE) << "ungrabXKeyboard() called but keyboard not grabbed!";
|
||||
}
|
||||
keyboard_grabbed = false;
|
||||
xcb_ungrab_keyboard(connection(), XCB_TIME_CURRENT_TIME);
|
||||
|
|
3
utils.h
3
utils.h
|
@ -30,13 +30,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// KDE
|
||||
#include <netwm_def.h>
|
||||
// Qt
|
||||
#include <QLoggingCategory>
|
||||
#include <QList>
|
||||
#include <QPoint>
|
||||
#include <QRect>
|
||||
#include <QScopedPointer>
|
||||
// system
|
||||
#include <limits.h>
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(KWIN_CORE)
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "cursor.h"
|
||||
#include "input.h"
|
||||
#include "main.h"
|
||||
#include "utils.h"
|
||||
#include <KWayland/Client/buffer.h>
|
||||
#include <KWayland/Client/compositor.h>
|
||||
#include <KWayland/Client/connection_thread.h>
|
||||
|
@ -520,7 +521,7 @@ WaylandBackend::~WaylandBackend()
|
|||
m_connectionThread->quit();
|
||||
m_connectionThread->wait();
|
||||
|
||||
qDebug() << "Destroyed Wayland display";
|
||||
qCDebug(KWIN_CORE) << "Destroyed Wayland display";
|
||||
s_self = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -766,7 +766,7 @@ bool Workspace::waitForCompositingSetup()
|
|||
|
||||
void Workspace::slotReconfigure()
|
||||
{
|
||||
qDebug() << "Workspace::slotReconfigure()";
|
||||
qCDebug(KWIN_CORE) << "Workspace::slotReconfigure()";
|
||||
reconfigureTimer.stop();
|
||||
|
||||
bool borderlessMaximizedWindows = options->borderlessMaximizedWindows();
|
||||
|
|
13
xcbutils.cpp
13
xcbutils.cpp
|
@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "xcbutils.h"
|
||||
#include "utils.h"
|
||||
// Qt
|
||||
#include <QDebug>
|
||||
// xcb
|
||||
|
@ -467,7 +468,7 @@ void Extensions::init()
|
|||
if (m_sync.present) {
|
||||
initVersion<xcb_sync_initialize_reply_t>(syncVersion, &xcb_sync_initialize_reply, &m_sync);
|
||||
}
|
||||
qDebug() << "Extensions: shape: 0x" << QString::number(m_shape.version, 16)
|
||||
qCDebug(KWIN_CORE) << "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)
|
||||
|
@ -579,25 +580,25 @@ bool Shm::init()
|
|||
{
|
||||
const xcb_query_extension_reply_t *ext = xcb_get_extension_data(connection(), &xcb_shm_id);
|
||||
if (!ext || !ext->present) {
|
||||
qDebug() << "SHM extension not available";
|
||||
qCDebug(KWIN_CORE) << "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()) {
|
||||
qDebug() << "Failed to get SHM extension version information";
|
||||
qCDebug(KWIN_CORE) << "Failed to get SHM extension version information";
|
||||
return false;
|
||||
}
|
||||
m_pixmapFormat = version->pixmap_format;
|
||||
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) {
|
||||
qDebug() << "Failed to allocate SHM segment";
|
||||
qCDebug(KWIN_CORE) << "Failed to allocate SHM segment";
|
||||
return false;
|
||||
}
|
||||
m_buffer = shmat(m_shmId, NULL, 0 /*read/write*/);
|
||||
if (-1 == reinterpret_cast<long>(m_buffer)) {
|
||||
qDebug() << "Failed to attach SHM segment";
|
||||
qCDebug(KWIN_CORE) << "Failed to attach SHM segment";
|
||||
shmctl(m_shmId, IPC_RMID, NULL);
|
||||
return false;
|
||||
}
|
||||
|
@ -607,7 +608,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()) {
|
||||
qDebug() << "xcb_shm_attach error: " << error->error_code;
|
||||
qCDebug(KWIN_CORE) << "xcb_shm_attach error: " << error->error_code;
|
||||
shmdt(m_buffer);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue