4a1e7df599
Tabbox supports two operation modes: switching between windows and desktops. Switching between windows is more commonly used. Desktop switching is not exposed in user settings and it requires some advanced knowledge of kwin's internals to enable it. On the other hand, over the past years, we've double downed on effects like desktop grid and overview to provide graphical means to switch between virtual desktops. This change drops desktop switching because it's effectively unused to simplify the tabbox code, which can be very handy for the future refactorings of window switching.
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
/*
|
|
KWin - the KDE window manager
|
|
This file is part of the KDE project.
|
|
|
|
SPDX-FileCopyrightText: 2012 Martin Gräßlin <mgraesslin@kde.org>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
#include "../testutils.h"
|
|
#include "mock_tabboxhandler.h"
|
|
#include "tabbox/clientmodel.h"
|
|
#include <QtTest>
|
|
#include <private/qtx11extras_p.h>
|
|
|
|
using namespace KWin;
|
|
|
|
class TestTabBoxHandler : public QObject
|
|
{
|
|
Q_OBJECT
|
|
private Q_SLOTS:
|
|
void initTestCase();
|
|
/**
|
|
* Test to verify that update outline does not crash
|
|
* if the ModelIndex for which the outline should be
|
|
* shown is not valid. That is accessing the Pointer
|
|
* to the Client returns an invalid QVariant.
|
|
* BUG: 304620
|
|
*/
|
|
void testDontCrashUpdateOutlineNullClient();
|
|
};
|
|
|
|
void TestTabBoxHandler::initTestCase()
|
|
{
|
|
qApp->setProperty("x11Connection", QVariant::fromValue<void *>(QX11Info::connection()));
|
|
}
|
|
|
|
void TestTabBoxHandler::testDontCrashUpdateOutlineNullClient()
|
|
{
|
|
MockTabBoxHandler tabboxhandler;
|
|
TabBox::TabBoxConfig config;
|
|
config.setShowTabBox(false);
|
|
config.setHighlightWindows(false);
|
|
tabboxhandler.setConfig(config);
|
|
// now show the tabbox which will attempt to show the outline
|
|
tabboxhandler.show();
|
|
}
|
|
|
|
Q_CONSTRUCTOR_FUNCTION(forceXcb)
|
|
QTEST_MAIN(TestTabBoxHandler)
|
|
|
|
#include "test_tabbox_handler.moc"
|