Revert "Update logging"

This reverts commit e4dbcdaee7.
This commit is contained in:
wheaney 2025-08-21 13:50:53 -07:00
parent 471523fb31
commit 37ecb879dd
4 changed files with 25 additions and 4 deletions

View File

@ -68,6 +68,7 @@ namespace KWin
BreezyDesktopEffect::BreezyDesktopEffect() BreezyDesktopEffect::BreezyDesktopEffect()
: m_shutdownTimer(new QTimer(this)) : m_shutdownTimer(new QTimer(this))
{ {
qCCritical(KWIN_XR) << "\t\t\tBreezy - constructor";
qmlRegisterUncreatableType<BreezyDesktopEffect>("org.kde.kwin.effect.breezy_desktop_effect", 1, 0, "BreezyDesktopEffect", QStringLiteral("BreezyDesktop cannot be created in QML")); qmlRegisterUncreatableType<BreezyDesktopEffect>("org.kde.kwin.effect.breezy_desktop_effect", 1, 0, "BreezyDesktopEffect", QStringLiteral("BreezyDesktop cannot be created in QML"));
m_shutdownTimer->setSingleShot(true); m_shutdownTimer->setSingleShot(true);
@ -157,16 +158,18 @@ int BreezyDesktopEffect::requestedEffectChainPosition() const
void BreezyDesktopEffect::toggle() void BreezyDesktopEffect::toggle()
{ {
if (isRunning()) { if (isRunning()) {
qCInfo(KWIN_XR) << "\t\t\tBreezy - toggle - deactivating"; qCCritical(KWIN_XR) << "\t\t\tBreezy - toggle - deactivating";
deactivate(); deactivate();
} else { } else {
qCInfo(KWIN_XR) << "\t\t\tBreezy - toggle - activating"; qCCritical(KWIN_XR) << "\t\t\tBreezy - toggle - activating";
activate(); activate();
} }
} }
void BreezyDesktopEffect::activate() void BreezyDesktopEffect::activate()
{ {
qCCritical(KWIN_XR) << "\t\t\tBreezy - activate";
if (!isRunning()) setRunning(true); if (!isRunning()) setRunning(true);
connect(effects, &EffectsHandler::cursorShapeChanged, this, &BreezyDesktopEffect::updateCursorImage); connect(effects, &EffectsHandler::cursorShapeChanged, this, &BreezyDesktopEffect::updateCursorImage);
@ -174,6 +177,7 @@ void BreezyDesktopEffect::activate()
// QuickSceneEffect grabs the keyboard and mouse input, which pulls focus away from the active window // QuickSceneEffect grabs the keyboard and mouse input, which pulls focus away from the active window
// and doesn't allow for interaction with anything on the desktop. These two calls fix that. // and doesn't allow for interaction with anything on the desktop. These two calls fix that.
// TODO - move away from QuickSceneEffect
effects->ungrabKeyboard(); effects->ungrabKeyboard();
effects->stopMouseInterception(this); effects->stopMouseInterception(this);
@ -186,6 +190,7 @@ void BreezyDesktopEffect::deactivate()
return; return;
} }
qCCritical(KWIN_XR) << "\t\t\tBreezy - deactivate";
disconnect(effects, &EffectsHandler::cursorShapeChanged, this, &BreezyDesktopEffect::updateCursorImage); disconnect(effects, &EffectsHandler::cursorShapeChanged, this, &BreezyDesktopEffect::updateCursorImage);
m_cursorUpdateTimer->stop(); m_cursorUpdateTimer->stop();
showCursor(); showCursor();
@ -202,6 +207,7 @@ void BreezyDesktopEffect::deactivate()
void BreezyDesktopEffect::realDeactivate() void BreezyDesktopEffect::realDeactivate()
{ {
qCCritical(KWIN_XR) << "\t\t\tBreezy - realDeactivate";
setRunning(false); setRunning(false);
} }
@ -399,7 +405,7 @@ void BreezyDesktopEffect::updateImuRotation() {
if (!enabled) { if (!enabled) {
// give a grace period after enabling the effect // give a grace period after enabling the effect
if (wasEnabled && (currentTimeMs - activatedAt > 1000)) { if (wasEnabled && (currentTimeMs - activatedAt > 1000)) {
qCInfo(KWIN_XR) << "\t\t\tBreezy - disabling effect; currentTimeMs:" << currentTimeMs qCCritical(KWIN_XR) << "\t\t\tBreezy - disabling effect; currentTimeMs:" << currentTimeMs
<< "imuDateMs:" << imuDateMs << "imuDateMs:" << imuDateMs
<< "enabledFlag:" << enabledFlag << "enabledFlag:" << enabledFlag
<< "version:" << version << "version:" << version
@ -410,7 +416,7 @@ void BreezyDesktopEffect::updateImuRotation() {
return; return;
} }
} else if (!wasEnabled) { } else if (!wasEnabled) {
qCInfo(KWIN_XR) << "\t\t\tBreezy - enabling effect; currentTimeMs:" << currentTimeMs qCCritical(KWIN_XR) << "\t\t\tBreezy - enabling effect; currentTimeMs:" << currentTimeMs
<< "imuDateMs:" << imuDateMs << "imuDateMs:" << imuDateMs
<< "enabledFlag:" << enabledFlag << "enabledFlag:" << enabledFlag
<< "version:" << version << "version:" << version

View File

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
#
# SPDX-License-Identifier: BSD-3-Clause
set(breezy_desktop_config_SOURCES breezydesktopeffectkcm.cpp) set(breezy_desktop_config_SOURCES breezydesktopeffectkcm.cpp)
ki18n_wrap_ui(breezy_desktop_config_SOURCES breezydesktopeffectkcm.ui) ki18n_wrap_ui(breezy_desktop_config_SOURCES breezydesktopeffectkcm.ui)
qt_add_dbus_interface(breezy_desktop_config_SOURCES ${KWIN_EFFECTS_INTERFACE} kwineffects_interface) qt_add_dbus_interface(breezy_desktop_config_SOURCES ${KWIN_EFFECTS_INTERFACE} kwineffects_interface)

View File

@ -1,3 +1,9 @@
/*
SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once #pragma once
#include <KCModule> #include <KCModule>

View File

@ -1,4 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
-->
<ui version="4.0"> <ui version="4.0">
<class>BreezyDesktopEffectConfig</class> <class>BreezyDesktopEffectConfig</class>
<widget class="QWidget" name="BreezyDesktopEffectConfig"> <widget class="QWidget" name="BreezyDesktopEffectConfig">