Use #cmakedefine01 for all KWIN_BUILD_* macros
This ensures that we get a warning if the config header is not included instead of compiling the code as if it was disabled. Interestingly, some checks already used #if KWIN_BUILD_*, so those were generating -Wundef warnings when the feature is disabled. Commit886173cab
assumed that all those features were already 01, so this unbreaks the build if any of the features is disabled. Fixes:886173cab
("Reduce ifdefs in Workspace::supportInformation()")
This commit is contained in:
parent
dea33cb311
commit
d789ecc6d1
34 changed files with 123 additions and 123 deletions
|
@ -46,7 +46,7 @@ WaylandTestApplication::WaylandTestApplication(OperationMode mode, int &argc, ch
|
|||
// TODO: add a test move to kglobalaccel instead?
|
||||
QFile{QStandardPaths::locate(QStandardPaths::ConfigLocation, QStringLiteral("kglobalshortcutsrc"))}.remove();
|
||||
QIcon::setThemeName(QStringLiteral("breeze"));
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
setUseKActivities(false);
|
||||
#endif
|
||||
qputenv("KWIN_COMPOSE", QByteArrayLiteral("Q"));
|
||||
|
|
|
@ -224,7 +224,7 @@ void ModifierOnlyShortcutTest::testTrigger()
|
|||
kwinApp()->platform()->keyboardKeyReleased(modifier, timestamp++);
|
||||
QCOMPARE(triggeredSpy.count(), 2);
|
||||
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
// now try to lock the screen while modifier key is pressed
|
||||
kwinApp()->platform()->keyboardKeyPressed(modifier, timestamp++);
|
||||
QVERIFY(Test::lockScreen());
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <KWayland/Client/surface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
//screenlocker
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include <KScreenLocker/KsldApp>
|
||||
#endif
|
||||
|
||||
|
@ -258,7 +258,7 @@ void PlasmaWindowTest::testPopupWindowNoPlasmaWindow()
|
|||
|
||||
void PlasmaWindowTest::testLockScreenNoPlasmaWindow()
|
||||
{
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
// this test verifies that lock screen windows are not exposed to PlasmaWindow
|
||||
QSignalSpy plasmaWindowCreatedSpy(m_windowManagement, &PlasmaWindowManagement::windowCreated);
|
||||
QVERIFY(plasmaWindowCreatedSpy.isValid());
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
#include <config-kwin.h>
|
||||
#include "kwin_wayland_test.h"
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include "screenlockerwatcher.h"
|
||||
#endif
|
||||
#include "wayland_server.h"
|
||||
|
@ -35,7 +35,7 @@
|
|||
#include <KWaylandServer/display.h>
|
||||
|
||||
//screenlocker
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include <KScreenLocker/KsldApp>
|
||||
#endif
|
||||
|
||||
|
@ -898,7 +898,7 @@ bool waitForWindowDestroyed(AbstractClient *client)
|
|||
return destroyedSpy.wait();
|
||||
}
|
||||
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
bool lockScreen()
|
||||
{
|
||||
if (waylandServer()->isScreenLocked()) {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "abstract_output.h"
|
||||
#include "abstract_wayland_output.h"
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#endif
|
||||
#include "appmenu.h"
|
||||
|
@ -22,7 +22,7 @@
|
|||
#include "outline.h"
|
||||
#include "platform.h"
|
||||
#include "screens.h"
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
#include "tabbox.h"
|
||||
#endif
|
||||
#include "screenedge.h"
|
||||
|
@ -56,7 +56,7 @@ std::shared_ptr<Decoration::DecorationPalette> AbstractClient::s_defaultPalette;
|
|||
|
||||
AbstractClient::AbstractClient()
|
||||
: Toplevel()
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
, m_tabBoxClient(QSharedPointer<TabBox::TabBoxClientImpl>(new TabBox::TabBoxClientImpl(this)))
|
||||
#endif
|
||||
, m_colorScheme(QStringLiteral("kdeglobals"))
|
||||
|
@ -2801,7 +2801,7 @@ QStringList AbstractClient::activities() const
|
|||
*/
|
||||
void AbstractClient::setOnActivity(const QString &activity, bool enable)
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!Activities::self()) {
|
||||
return;
|
||||
}
|
||||
|
@ -2832,7 +2832,7 @@ void AbstractClient::setOnActivity(const QString &activity, bool enable)
|
|||
*/
|
||||
void AbstractClient::setOnActivities(const QStringList &newActivitiesList)
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!Activities::self()) {
|
||||
return;
|
||||
}
|
||||
|
@ -2874,7 +2874,7 @@ void AbstractClient::setOnActivities(const QStringList &newActivitiesList)
|
|||
*/
|
||||
void AbstractClient::setOnAllActivities(bool all)
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (all == isOnAllActivities()) {
|
||||
return;
|
||||
}
|
||||
|
@ -3732,7 +3732,7 @@ void AbstractClient::setFullscreenGeometryRestore(const QRect &geom)
|
|||
|
||||
void AbstractClient::cleanTabBox()
|
||||
{
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
TabBox::TabBox *tabBox = TabBox::TabBox::self();
|
||||
if (tabBox && tabBox->isDisplayed() && tabBox->currentClient() == this) {
|
||||
tabBox->nextPrev(true);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "netinfo.h"
|
||||
#include "platform.h"
|
||||
#include "workspace.h"
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#endif
|
||||
#include "virtualdesktops.h"
|
||||
|
@ -293,7 +293,7 @@ void Workspace::activateClient(AbstractClient* c, bool force)
|
|||
VirtualDesktopManager::self()->setCurrent(c->desktops().constLast());
|
||||
--block_focus;
|
||||
}
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!c->isOnCurrentActivity()) {
|
||||
++block_focus;
|
||||
//DBUS!
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#define KWIN_PLUGIN_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}"
|
||||
|
||||
#cmakedefine KWIN_BUILD_DECORATIONS 1
|
||||
#cmakedefine KWIN_BUILD_SCREENLOCKER 1
|
||||
#cmakedefine KWIN_BUILD_TABBOX 1
|
||||
#cmakedefine KWIN_BUILD_ACTIVITIES 1
|
||||
#cmakedefine KWIN_BUILD_CMS 1
|
||||
#cmakedefine01 KWIN_BUILD_DECORATIONS
|
||||
#cmakedefine01 KWIN_BUILD_SCREENLOCKER
|
||||
#cmakedefine01 KWIN_BUILD_TABBOX
|
||||
#cmakedefine01 KWIN_BUILD_ACTIVITIES
|
||||
#cmakedefine01 KWIN_BUILD_CMS
|
||||
#define KWIN_NAME "${KWIN_NAME}"
|
||||
#define KWIN_INTERNAL_NAME_X11 "${KWIN_INTERNAL_NAME_X11}"
|
||||
#define KWIN_CONFIG "${KWIN_NAME}rc"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "unmanaged.h"
|
||||
#include "workspace.h"
|
||||
#include "virtualdesktops.h"
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#endif
|
||||
|
||||
|
@ -131,7 +131,7 @@ WRAP(QString, supportInformation)
|
|||
|
||||
bool DBusInterface::startActivity(const QString &in0)
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!Activities::self()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ bool DBusInterface::startActivity(const QString &in0)
|
|||
|
||||
bool DBusInterface::stopActivity(const QString &in0)
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!Activities::self()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ QVariantMap clientToVariantMap(const AbstractClient *c)
|
|||
{QStringLiteral("skipSwitcher"), c->skipSwitcher()},
|
||||
{QStringLiteral("maximizeHorizontal"), c->maximizeMode() & MaximizeHorizontal},
|
||||
{QStringLiteral("maximizeVertical"), c->maximizeMode() & MaximizeVertical},
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
{QStringLiteral("activities"), c->activities()},
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "abstract_output.h"
|
||||
#include "effectsadaptor.h"
|
||||
#include "effectloader.h"
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#endif
|
||||
#include "deleted.h"
|
||||
|
@ -28,13 +28,13 @@
|
|||
#include "renderbackend.h"
|
||||
#include "unmanaged.h"
|
||||
#include "input_event.h"
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
#include "tabbox.h"
|
||||
#endif
|
||||
#include "screenedge.h"
|
||||
#include "scripting/scriptedeffect.h"
|
||||
#include "screens.h"
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include "screenlockerwatcher.h"
|
||||
#endif
|
||||
#include "virtualdesktops.h"
|
||||
|
@ -197,7 +197,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
|||
connect(Cursors::self()->mouse(), &Cursor::mouseChanged, this, &EffectsHandler::mouseChanged);
|
||||
connect(Screens::self(), &Screens::sizeChanged, this, &EffectsHandler::virtualScreenSizeChanged);
|
||||
connect(Screens::self(), &Screens::geometryChanged, this, &EffectsHandler::virtualScreenGeometryChanged);
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (Activities *activities = Activities::self()) {
|
||||
connect(activities, &Activities::added, this, &EffectsHandler::activityAdded);
|
||||
connect(activities, &Activities::removed, this, &EffectsHandler::activityRemoved);
|
||||
|
@ -205,7 +205,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
|||
}
|
||||
#endif
|
||||
connect(ws, &Workspace::stackingOrderChanged, this, &EffectsHandler::stackingOrderChanged);
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
TabBox::TabBox *tabBox = TabBox::TabBox::self();
|
||||
connect(tabBox, &TabBox::TabBox::tabBoxAdded, this, &EffectsHandler::tabBoxAdded);
|
||||
connect(tabBox, &TabBox::TabBox::tabBoxUpdated, this, &EffectsHandler::tabBoxUpdated);
|
||||
|
@ -213,7 +213,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
|||
connect(tabBox, &TabBox::TabBox::tabBoxKeyEvent, this, &EffectsHandler::tabBoxKeyEvent);
|
||||
#endif
|
||||
connect(ScreenEdges::self(), &ScreenEdges::approaching, this, &EffectsHandler::screenEdgeApproaching);
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
connect(ScreenLockerWatcher::self(), &ScreenLockerWatcher::locked, this, &EffectsHandler::screenLockingChanged);
|
||||
connect(ScreenLockerWatcher::self(), &ScreenLockerWatcher::aboutToLock, this, &EffectsHandler::screenAboutToLock);
|
||||
#endif
|
||||
|
@ -986,7 +986,7 @@ void EffectsHandlerImpl::setShowingDesktop(bool showing)
|
|||
|
||||
QString EffectsHandlerImpl::currentActivity() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!Activities::self()) {
|
||||
return QString();
|
||||
}
|
||||
|
@ -1157,7 +1157,7 @@ void EffectsHandlerImpl::setElevatedWindow(KWin::EffectWindow* w, bool set)
|
|||
|
||||
void EffectsHandlerImpl::setTabBoxWindow(EffectWindow* w)
|
||||
{
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
if (auto c = qobject_cast<AbstractClient *>(static_cast<EffectWindowImpl *>(w)->window())) {
|
||||
TabBox::TabBox::self()->setCurrentClient(c);
|
||||
}
|
||||
|
@ -1168,7 +1168,7 @@ void EffectsHandlerImpl::setTabBoxWindow(EffectWindow* w)
|
|||
|
||||
void EffectsHandlerImpl::setTabBoxDesktop(int desktop)
|
||||
{
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
TabBox::TabBox::self()->setCurrentDesktop(desktop);
|
||||
#else
|
||||
Q_UNUSED(desktop)
|
||||
|
@ -1177,7 +1177,7 @@ void EffectsHandlerImpl::setTabBoxDesktop(int desktop)
|
|||
|
||||
EffectWindowList EffectsHandlerImpl::currentTabBoxWindowList() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
const auto clients = TabBox::TabBox::self()->currentClientList();
|
||||
EffectWindowList ret;
|
||||
ret.reserve(clients.size());
|
||||
|
@ -1192,28 +1192,28 @@ EffectWindowList EffectsHandlerImpl::currentTabBoxWindowList() const
|
|||
|
||||
void EffectsHandlerImpl::refTabBox()
|
||||
{
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
TabBox::TabBox::self()->reference();
|
||||
#endif
|
||||
}
|
||||
|
||||
void EffectsHandlerImpl::unrefTabBox()
|
||||
{
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
TabBox::TabBox::self()->unreference();
|
||||
#endif
|
||||
}
|
||||
|
||||
void EffectsHandlerImpl::closeTabBox()
|
||||
{
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
TabBox::TabBox::self()->close();
|
||||
#endif
|
||||
}
|
||||
|
||||
QList< int > EffectsHandlerImpl::currentTabBoxDesktopList() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
return TabBox::TabBox::self()->currentDesktopList();
|
||||
#else
|
||||
return QList< int >();
|
||||
|
@ -1222,7 +1222,7 @@ QList< int > EffectsHandlerImpl::currentTabBoxDesktopList() const
|
|||
|
||||
int EffectsHandlerImpl::currentTabBoxDesktop() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
return TabBox::TabBox::self()->currentDesktop();
|
||||
#else
|
||||
return -1;
|
||||
|
@ -1231,7 +1231,7 @@ int EffectsHandlerImpl::currentTabBoxDesktop() const
|
|||
|
||||
EffectWindow* EffectsHandlerImpl::currentTabBoxWindow() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
if (auto c = TabBox::TabBox::self()->currentClient())
|
||||
return c->effectWindow();
|
||||
#endif
|
||||
|
@ -1613,7 +1613,7 @@ QString EffectsHandlerImpl::supportInformation(const QString &name) const
|
|||
|
||||
bool EffectsHandlerImpl::isScreenLocked() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
return ScreenLockerWatcher::self()->isLocked();
|
||||
#else
|
||||
return false;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "netinfo.h"
|
||||
#include "workspace.h"
|
||||
#include "atoms.h"
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
#include "tabbox.h"
|
||||
#endif
|
||||
#include "group.h"
|
||||
|
@ -789,7 +789,7 @@ void X11Client::updateMouseGrab()
|
|||
|
||||
xcb_ungrab_button(kwinApp()->x11Connection(), XCB_BUTTON_INDEX_ANY, m_wrapper, XCB_MOD_MASK_ANY);
|
||||
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
if (TabBox::TabBox::self()->forcedGlobalMouseGrab()) { // see TabBox::establishTabBoxGrab()
|
||||
m_wrapper.grabButton(XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC);
|
||||
return;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "hide_cursor_spy.h"
|
||||
#include "touch_input.h"
|
||||
#include "x11client.h"
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
#include "tabbox/tabbox.h"
|
||||
#endif
|
||||
#include "internal_client.h"
|
||||
|
@ -54,7 +54,7 @@
|
|||
#include <decorations/decoratedclient.h>
|
||||
|
||||
//screenlocker
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include <KScreenLocker/KsldApp>
|
||||
#endif
|
||||
// Qt
|
||||
|
@ -384,7 +384,7 @@ public:
|
|||
// send event to KSldApp for global accel
|
||||
// if event is set to accepted it means a whitelisted shortcut was triggered
|
||||
// in that case we filter it out and don't process it further
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
event->setAccepted(false);
|
||||
QCoreApplication::sendEvent(ScreenLocker::KSldApp::self(), event);
|
||||
if (event->isAccepted()) {
|
||||
|
@ -1383,7 +1383,7 @@ private:
|
|||
QPointF m_lastLocalTouchPos;
|
||||
};
|
||||
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
class TabBoxInputFilter : public InputEventFilter
|
||||
{
|
||||
public:
|
||||
|
@ -2516,7 +2516,7 @@ void InputRedirection::setupInputFilters()
|
|||
}
|
||||
installInputEventFilter(new EffectsFilter);
|
||||
installInputEventFilter(new MoveResizeFilter);
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
installInputEventFilter(new TabBoxInputFilter);
|
||||
#endif
|
||||
if (hasGlobalShortcutSupport) {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "screens.h"
|
||||
#include "wayland_server.h"
|
||||
#include "workspace.h"
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include "screenlockerwatcher.h"
|
||||
#endif
|
||||
#include "deleted.h"
|
||||
|
@ -79,7 +79,7 @@ void InputMethod::init()
|
|||
connect(&m_inputMethodCrashTimer, &QTimer::timeout, this, [this] {
|
||||
m_inputMethodCrashes = 0;
|
||||
});
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
connect(ScreenLockerWatcher::self(), &ScreenLockerWatcher::aboutToLock, this, &InputMethod::hide);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "rulesmodel.h"
|
||||
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#endif
|
||||
|
||||
|
@ -455,7 +455,7 @@ void RulesModel::populateRuleList()
|
|||
|
||||
updateVirtualDesktops();
|
||||
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
m_activities = new KActivities::Consumer(this);
|
||||
|
||||
auto activity = addRule(new RuleItem(QLatin1String("activity"),
|
||||
|
@ -699,7 +699,7 @@ void RulesModel::setSuggestedProperties(const QVariantMap &info)
|
|||
m_rules["wmclass"]->setSuggestedValue(wmsimpleclass);
|
||||
m_rules["wmclasshelper"]->setSuggestedValue(wmcompleteclass);
|
||||
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
const QStringList activities = info.value("activities").toStringList();
|
||||
m_rules["activity"]->setSuggestedValue(activities.isEmpty() ? QStringList{ Activities::nullUuid() }
|
||||
: activities);
|
||||
|
@ -755,7 +755,7 @@ QList<OptionsModel::Data> RulesModel::virtualDesktopsModelData() const
|
|||
|
||||
QList<OptionsModel::Data> RulesModel::activitiesModelData() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
QList<OptionsModel::Data> modelData;
|
||||
|
||||
modelData << OptionsModel::Data{
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <QSortFilterProxyModel>
|
||||
#include <QObject>
|
||||
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include <KActivities/Consumer>
|
||||
#endif
|
||||
|
||||
|
@ -112,7 +112,7 @@ private:
|
|||
QList<RuleItem *> m_ruleList;
|
||||
QHash<QString, RuleItem *> m_rules;
|
||||
DBusDesktopDataVector m_virtualDesktops;
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
KActivities::Consumer *m_activities;
|
||||
#endif
|
||||
RuleSettings *m_settings;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <KWaylandServer/keyboard_interface.h>
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
//screenlocker
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include <KScreenLocker/KsldApp>
|
||||
#endif
|
||||
// Frameworks
|
||||
|
@ -143,7 +143,7 @@ void KeyboardInputRedirection::init()
|
|||
update();
|
||||
}
|
||||
);
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
if (waylandServer()->hasScreenLockerIntegration()) {
|
||||
connect(ScreenLocker::KSldApp::self(), &ScreenLocker::KSldApp::lockStateChanged, this, &KeyboardInputRedirection::update);
|
||||
}
|
||||
|
|
10
src/main.cpp
10
src/main.cpp
|
@ -13,7 +13,7 @@
|
|||
// kwin
|
||||
#include "platform.h"
|
||||
#include "atoms.h"
|
||||
#ifdef KWIN_BUILD_CMS
|
||||
#if KWIN_BUILD_CMS
|
||||
#include "colormanager.h"
|
||||
#endif
|
||||
#include "composite.h"
|
||||
|
@ -23,7 +23,7 @@
|
|||
#include "options.h"
|
||||
#include "pluginmanager.h"
|
||||
#include "screens.h"
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include "screenlockerwatcher.h"
|
||||
#endif
|
||||
#include "sm.h"
|
||||
|
@ -287,7 +287,7 @@ void Application::createWorkspace()
|
|||
|
||||
void Application::createInput()
|
||||
{
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
ScreenLockerWatcher::create(this);
|
||||
#endif
|
||||
auto input = InputRedirection::create(this);
|
||||
|
@ -321,7 +321,7 @@ void Application::createPlugins()
|
|||
|
||||
void Application::createColorManager()
|
||||
{
|
||||
#ifdef KWIN_BUILD_CMS
|
||||
#if KWIN_BUILD_CMS
|
||||
ColorManager::create(this);
|
||||
#endif
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ void Application::destroyPlugins()
|
|||
|
||||
void Application::destroyColorManager()
|
||||
{
|
||||
#ifdef KWIN_BUILD_CMS
|
||||
#if KWIN_BUILD_CMS
|
||||
delete ColorManager::self();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ public:
|
|||
return m_isClosingX11Connection;
|
||||
}
|
||||
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
bool usesKActivities() const {
|
||||
return m_useKActivities;
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ private:
|
|||
xcb_window_t m_rootWindow = XCB_WINDOW_NONE;
|
||||
xcb_connection_t *m_connection = nullptr;
|
||||
xcb_screen_t *m_defaultScreen = nullptr;
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
bool m_useKActivities = true;
|
||||
#endif
|
||||
Platform *m_platform = nullptr;
|
||||
|
|
|
@ -506,7 +506,7 @@ int main(int argc, char * argv[])
|
|||
i18n("List all available backends and quit."));
|
||||
parser.addOption(listBackendsOption);
|
||||
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
QCommandLineOption screenLockerOption(QStringLiteral("lockscreen"),
|
||||
i18n("Starts the session in locked mode."));
|
||||
parser.addOption(screenLockerOption);
|
||||
|
@ -520,7 +520,7 @@ int main(int argc, char * argv[])
|
|||
i18n("Starts the session without global shortcuts support."));
|
||||
parser.addOption(noGlobalShortcutsOption);
|
||||
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
QCommandLineOption noActivitiesOption(QStringLiteral("no-kactivities"),
|
||||
i18n("Disable KActivities integration."));
|
||||
parser.addOption(noActivitiesOption);
|
||||
|
@ -538,7 +538,7 @@ int main(int argc, char * argv[])
|
|||
parser.process(a);
|
||||
a.processCommandLine(&parser);
|
||||
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (parser.isSet(noActivitiesOption)) {
|
||||
a.setUseKActivities(false);
|
||||
}
|
||||
|
@ -636,7 +636,7 @@ int main(int argc, char * argv[])
|
|||
KWin::WaylandServer *server = KWin::WaylandServer::create(&a);
|
||||
|
||||
KWin::WaylandServer::InitializationFlags flags;
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
if (parser.isSet(screenLockerOption)) {
|
||||
flags = KWin::WaylandServer::InitializationFlag::LockScreen;
|
||||
} else if (parser.isSet(noScreenLockerOption)) {
|
||||
|
|
|
@ -437,7 +437,7 @@ int main(int argc, char * argv[])
|
|||
QCommandLineParser parser;
|
||||
a.setupCommandLine(&parser);
|
||||
parser.addOption(replaceOption);
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
QCommandLineOption noActivitiesOption(QStringLiteral("no-kactivities"),
|
||||
i18n("Disable KActivities integration."));
|
||||
parser.addOption(noActivitiesOption);
|
||||
|
@ -446,7 +446,7 @@ int main(int argc, char * argv[])
|
|||
parser.process(a);
|
||||
a.processCommandLine(&parser);
|
||||
a.setReplace(parser.isSet(replaceOption));
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (parser.isSet(noActivitiesOption)) {
|
||||
a.setUseKActivities(false);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "modifier_only_shortcuts.h"
|
||||
#include "input_event.h"
|
||||
#include "options.h"
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include "screenlockerwatcher.h"
|
||||
#endif
|
||||
#include "wayland_server.h"
|
||||
|
@ -27,7 +27,7 @@ ModifierOnlyShortcuts::ModifierOnlyShortcuts()
|
|||
: QObject()
|
||||
, InputEventSpy()
|
||||
{
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
connect(ScreenLockerWatcher::self(), &ScreenLockerWatcher::locked, this, &ModifierOnlyShortcuts::reset);
|
||||
#endif
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ void ModifierOnlyShortcuts::keyEvent(KeyEvent *event)
|
|||
const bool wasEmpty = m_pressedKeys.isEmpty();
|
||||
m_pressedKeys.insert(event->nativeScanCode());
|
||||
if (wasEmpty && m_pressedKeys.size() == 1 &&
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
!ScreenLockerWatcher::self()->isLocked() &&
|
||||
#endif
|
||||
m_pressedButtons == Qt::NoButton &&
|
||||
|
|
|
@ -101,7 +101,7 @@ RootInfo *RootInfo::create()
|
|||
NET::WM2KDEShadow |
|
||||
NET::WM2OpaqueRegion |
|
||||
NET::WM2GTKFrameExtents;
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
properties2 |= NET::WM2Activities;
|
||||
#endif
|
||||
const NET::Actions actions = NET::ActionMove |
|
||||
|
|
|
@ -766,7 +766,7 @@ void Options::syncFromKcfgc()
|
|||
setXwaylandCrashPolicy(m_settings->xwaylandCrashPolicy());
|
||||
setXwaylandMaxCrashCount(m_settings->xwaylandMaxCrashCount());
|
||||
|
||||
#ifdef KWIN_BUILD_DECORATIONS
|
||||
#if KWIN_BUILD_DECORATIONS
|
||||
setPlacement(m_settings->placement());
|
||||
#else
|
||||
setPlacement(Placement::Maximizing);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <KWaylandServer/seat_interface.h>
|
||||
#include <KWaylandServer/surface_interface.h>
|
||||
// screenlocker
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include <KScreenLocker/KsldApp>
|
||||
#endif
|
||||
|
||||
|
@ -143,7 +143,7 @@ void PointerInputRedirection::init()
|
|||
Q_EMIT m_cursor->changed();
|
||||
|
||||
connect(screens(), &Screens::changed, this, &PointerInputRedirection::updateAfterScreenChange);
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
if (waylandServer()->hasScreenLockerIntegration()) {
|
||||
connect(ScreenLocker::KSldApp::self(), &ScreenLocker::KSldApp::lockStateChanged, this,
|
||||
[this] {
|
||||
|
@ -960,7 +960,7 @@ CursorImage::CursorImage(PointerInputRedirection *parent)
|
|||
reevaluteSource();
|
||||
}
|
||||
);
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
if (waylandServer()->hasScreenLockerIntegration()) {
|
||||
connect(ScreenLocker::KSldApp::self(), &ScreenLocker::KSldApp::lockStateChanged, this, &CursorImage::reevaluteSource);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <workspace.h>
|
||||
#include "virtualdesktops.h"
|
||||
// DBus generated
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include "screenlocker_interface.h"
|
||||
#endif
|
||||
// frameworks
|
||||
|
@ -333,7 +333,7 @@ bool Edge::handleAction(ElectricBorderAction action)
|
|||
return true;
|
||||
}
|
||||
case ElectricActionLockScreen: { // Lock the screen
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
OrgFreedesktopScreenSaverInterface interface(QStringLiteral("org.freedesktop.ScreenSaver"),
|
||||
QStringLiteral("/ScreenSaver"),
|
||||
QDBusConnection::sessionBus());
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "desktopbackgrounditem.h"
|
||||
#include "abstract_client.h"
|
||||
#include "abstract_output.h"
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#endif
|
||||
#include "main.h"
|
||||
|
@ -100,7 +100,7 @@ void DesktopBackgroundItem::updateWindow()
|
|||
|
||||
QString activity = m_activity;
|
||||
if (activity.isEmpty()) {
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
activity = Activities::self()->current();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "clientmodel.h"
|
||||
#include <config-kwin.h>
|
||||
#include "abstract_client.h"
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#endif
|
||||
#include "screens.h"
|
||||
|
@ -302,7 +302,7 @@ AbstractLevel *AbstractLevel::create(const QList< ClientModel::LevelRestriction
|
|||
}
|
||||
switch (restriction) {
|
||||
case ClientModel::ActivityRestriction: {
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (Activities::self()) {
|
||||
const QStringList &activities = Activities::self()->all();
|
||||
for (QStringList::const_iterator it = activities.begin(); it != activities.end(); ++it) {
|
||||
|
@ -395,7 +395,7 @@ ForkLevel::ForkLevel(const QList<ClientModel::LevelRestriction> &childRestrictio
|
|||
{
|
||||
connect(VirtualDesktopManager::self(), &VirtualDesktopManager::countChanged, this, &ForkLevel::desktopCountChanged);
|
||||
connect(screens(), &Screens::countChanged, this, &ForkLevel::screenCountChanged);
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (Activities *activities = Activities::self()) {
|
||||
connect(activities, &Activities::added, this, &ForkLevel::activityAdded);
|
||||
connect(activities, &Activities::removed, this, &ForkLevel::activityRemoved);
|
||||
|
@ -472,7 +472,7 @@ void ForkLevel::screenCountChanged(int previousCount, int newCount)
|
|||
|
||||
void ForkLevel::activityAdded(const QString &activityId)
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (restriction() != ClientModel::ClientModel::ActivityRestriction) {
|
||||
return;
|
||||
}
|
||||
|
@ -499,7 +499,7 @@ void ForkLevel::activityAdded(const QString &activityId)
|
|||
|
||||
void ForkLevel::activityRemoved(const QString &activityId)
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (restriction() != ClientModel::ClientModel::ActivityRestriction) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "screens.h"
|
||||
#include "virtualdesktops.h"
|
||||
#include "workspace.h"
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#endif
|
||||
|
||||
|
@ -38,7 +38,7 @@ WorkspaceWrapper::WorkspaceWrapper(QObject* parent) : QObject(parent)
|
|||
connect(vds, &VirtualDesktopManager::layoutChanged, this, &WorkspaceWrapper::desktopLayoutChanged);
|
||||
connect(vds, &VirtualDesktopManager::currentChanged, this, &WorkspaceWrapper::currentVirtualDesktopChanged);
|
||||
connect(ws, &Workspace::clientDemandsAttentionChanged, this, &WorkspaceWrapper::clientDemandsAttentionChanged);
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (KWin::Activities *activities = KWin::Activities::self()) {
|
||||
connect(activities, &Activities::currentChanged, this, &WorkspaceWrapper::currentActivityChanged);
|
||||
connect(activities, &Activities::added, this, &WorkspaceWrapper::activitiesChanged);
|
||||
|
@ -101,7 +101,7 @@ AbstractClient *WorkspaceWrapper::activeClient() const
|
|||
|
||||
QString WorkspaceWrapper::currentActivity() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!Activities::self()) {
|
||||
return QString();
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ QString WorkspaceWrapper::currentActivity() const
|
|||
|
||||
void WorkspaceWrapper::setCurrentActivity(QString activity)
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (Activities::self()) {
|
||||
Activities::self()->setCurrent(activity);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ void WorkspaceWrapper::setCurrentActivity(QString activity)
|
|||
|
||||
QStringList WorkspaceWrapper::activityList() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!Activities::self()) {
|
||||
return QStringList();
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "tabbox/tabbox_logging.h"
|
||||
#include "tabbox/x11_filter.h"
|
||||
// kwin
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#endif
|
||||
#include "composite.h"
|
||||
|
@ -69,7 +69,7 @@ TabBoxHandlerImpl::TabBoxHandlerImpl(TabBox* tabBox)
|
|||
VirtualDesktopManager *vds = VirtualDesktopManager::self();
|
||||
connect(vds, &VirtualDesktopManager::countChanged, m_desktopFocusChain, &DesktopChainManager::resize);
|
||||
connect(vds, &VirtualDesktopManager::currentChanged, m_desktopFocusChain, &DesktopChainManager::addDesktop);
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (Activities::self()) {
|
||||
connect(Activities::self(), &Activities::currentChanged, m_desktopFocusChain, &DesktopChainManager::useChain);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "abstract_client.h"
|
||||
#include "abstract_output.h"
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#endif
|
||||
#include "atoms.h"
|
||||
|
@ -531,7 +531,7 @@ bool Toplevel::isDeleted() const
|
|||
|
||||
bool Toplevel::isOnCurrentActivity() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!Activities::self()) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
// KWayland
|
||||
#include <KWaylandServer/seat_interface.h>
|
||||
// screenlocker
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include <KScreenLocker/KsldApp>
|
||||
#endif
|
||||
// Qt
|
||||
|
@ -48,7 +48,7 @@ void TouchInputRedirection::init()
|
|||
setInited(true);
|
||||
InputDeviceHandler::init();
|
||||
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
if (waylandServer()->hasScreenLockerIntegration()) {
|
||||
connect(ScreenLocker::KSldApp::self(), &ScreenLocker::KSldApp::lockStateChanged, this,
|
||||
[this] {
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include "virtualdesktops.h"
|
||||
#include "scripting/scripting.h"
|
||||
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#include <kactivities/info.h>
|
||||
#endif
|
||||
|
@ -57,7 +57,7 @@
|
|||
#include <kauthorized.h>
|
||||
|
||||
#include "killwindow.h"
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
#include "tabbox.h"
|
||||
#endif
|
||||
|
||||
|
@ -206,7 +206,7 @@ QStringList configModules(bool controlCenter)
|
|||
else if (KAuthorized::authorizeControlModule(QStringLiteral("kde-kwinoptions.desktop")))
|
||||
args << QStringLiteral("kwinactions") << QStringLiteral("kwinfocus") << QStringLiteral("kwinmoving") << QStringLiteral("kwinadvanced")
|
||||
<< QStringLiteral("kwinrules") << QStringLiteral("kwincompositing") << QStringLiteral("kwineffects")
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
<< QStringLiteral("kwintabbox")
|
||||
#endif
|
||||
<< QStringLiteral("kwinscreenedges")
|
||||
|
@ -419,7 +419,7 @@ void UserActionsMenu::menuAboutToShow()
|
|||
|
||||
void UserActionsMenu::showHideActivityMenu()
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!Activities::self()) {
|
||||
return;
|
||||
}
|
||||
|
@ -693,7 +693,7 @@ void UserActionsMenu::activityPopupAboutToShow()
|
|||
if (!m_activityMenu)
|
||||
return;
|
||||
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!Activities::self()) {
|
||||
return;
|
||||
}
|
||||
|
@ -768,7 +768,7 @@ void UserActionsMenu::slotWindowOperation(QAction *action)
|
|||
|
||||
void UserActionsMenu::slotToggleOnActivity(QAction *action)
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!Activities::self()) {
|
||||
return;
|
||||
}
|
||||
|
@ -1093,7 +1093,7 @@ void Workspace::initShortcuts()
|
|||
#undef DEF4
|
||||
#undef DEF5
|
||||
#undef DEF6
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
TabBox::TabBox::self()->initShortcuts();
|
||||
#endif
|
||||
vds->initShortcuts();
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
//screenlocker
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
#include <KScreenLocker/KsldApp>
|
||||
#endif
|
||||
|
||||
|
@ -590,7 +590,7 @@ void WaylandServer::initWorkspace()
|
|||
|
||||
void WaylandServer::initScreenLocker()
|
||||
{
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
auto *screenLockerApp = ScreenLocker::KSldApp::self();
|
||||
|
||||
ScreenLocker::KSldApp::self()->setGreeterEnvironment(kwinApp()->processStartupEnvironment());
|
||||
|
@ -751,7 +751,7 @@ XdgSurfaceClient *WaylandServer::findXdgSurfaceClient(SurfaceInterface *surface)
|
|||
|
||||
bool WaylandServer::isScreenLocked() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
if (!hasScreenLockerIntegration()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -764,7 +764,7 @@ bool WaylandServer::isScreenLocked() const
|
|||
|
||||
bool WaylandServer::hasScreenLockerIntegration() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_SCREENLOCKER
|
||||
#if KWIN_BUILD_SCREENLOCKER
|
||||
return !m_initFlags.testFlag(InitializationFlag::NoLockScreenIntegration);
|
||||
#else
|
||||
return false;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <kwinglplatform.h>
|
||||
// kwin
|
||||
#include "abstract_wayland_output.h"
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#endif
|
||||
#include "appmenu.h"
|
||||
|
@ -41,7 +41,7 @@
|
|||
#include "platform.h"
|
||||
#include "scripting/scripting.h"
|
||||
#include "syncalarmx11filter.h"
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
#include "tabbox.h"
|
||||
#endif
|
||||
#include "unmanaged.h"
|
||||
|
@ -135,7 +135,7 @@ Workspace::Workspace()
|
|||
|
||||
_self = this;
|
||||
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
Activities *activities = nullptr;
|
||||
if (kwinApp()->usesKActivities()) {
|
||||
activities = Activities::create(this);
|
||||
|
@ -168,7 +168,7 @@ Workspace::Workspace()
|
|||
//dbus interface
|
||||
new VirtualDesktopManagerDBusInterface(VirtualDesktopManager::self());
|
||||
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
// need to create the tabbox before compositing scene is setup
|
||||
TabBox::TabBox::create(this);
|
||||
#endif
|
||||
|
@ -1116,7 +1116,7 @@ AbstractClient *Workspace::findClientToActivateOnDesktop(VirtualDesktop *desktop
|
|||
|
||||
void Workspace::updateCurrentActivity(const QString &new_activity)
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (!Activities::self()) {
|
||||
return;
|
||||
}
|
||||
|
@ -1882,7 +1882,7 @@ void Workspace::setWasUserInteraction()
|
|||
|
||||
void Workspace::updateTabbox()
|
||||
{
|
||||
#ifdef KWIN_BUILD_TABBOX
|
||||
#if KWIN_BUILD_TABBOX
|
||||
TabBox::TabBox *tabBox = TabBox::TabBox::self();
|
||||
if (tabBox->isDisplayed()) {
|
||||
tabBox->reset(true);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "x11client.h"
|
||||
// kwin
|
||||
#include "abstract_output.h"
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
#include "activities.h"
|
||||
#endif
|
||||
#include "atoms.h"
|
||||
|
@ -566,7 +566,7 @@ bool X11Client::manage(xcb_window_t w, bool isMapped)
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (Activities::self() && !isMapped && !skipTaskbar() && isNormalWindow() && !activitiesDefined) {
|
||||
//a new, regular window, when we're not recovering from a crash,
|
||||
//and it hasn't got an activity. let's try giving it the current one.
|
||||
|
@ -1916,7 +1916,7 @@ void X11Client::doSetDemandsAttention()
|
|||
|
||||
void X11Client::doSetOnActivities(const QStringList &activityList)
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
if (activityList.isEmpty()) {
|
||||
const QByteArray nullUuid = Activities::nullUuid().toUtf8();
|
||||
m_client.changeProperty(atoms->activities, XCB_ATOM_STRING, 8, nullUuid.length(), nullUuid.constData());
|
||||
|
@ -2401,7 +2401,7 @@ void X11Client::updateAllowedActions(bool force)
|
|||
|
||||
Xcb::StringProperty X11Client::fetchActivities() const
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
return Xcb::StringProperty(window(), atoms->activities);
|
||||
#else
|
||||
return Xcb::StringProperty();
|
||||
|
@ -2410,7 +2410,7 @@ Xcb::StringProperty X11Client::fetchActivities() const
|
|||
|
||||
void X11Client::readActivities(Xcb::StringProperty &property)
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
QStringList newActivitiesList;
|
||||
QString prop = QString::fromUtf8(property);
|
||||
activitiesDefined = !prop.isEmpty();
|
||||
|
@ -2465,7 +2465,7 @@ void X11Client::readActivities(Xcb::StringProperty &property)
|
|||
|
||||
void X11Client::checkActivities()
|
||||
{
|
||||
#ifdef KWIN_BUILD_ACTIVITIES
|
||||
#if KWIN_BUILD_ACTIVITIES
|
||||
Xcb::StringProperty property = fetchActivities();
|
||||
readActivities(property);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue