Run clazy with qt-keywords fixit
In C++20, there will be emit() class member, which can conflict with the emit keyword. Given that, there are plans to enable QT_NO_KEYWORDS by default in the future. See also https://lists.qt-project.org/pipermail/development/2020-February/038812.html
This commit is contained in:
parent
b5a58f83ee
commit
1b2c7b248b
168 changed files with 1006 additions and 1006 deletions
|
@ -695,9 +695,9 @@ public:
|
||||||
{
|
{
|
||||||
Q_UNUSED(watched)
|
Q_UNUSED(watched)
|
||||||
if (event->type() == QEvent::HoverMove) {
|
if (event->type() == QEvent::HoverMove) {
|
||||||
emit hoverMove();
|
Q_EMIT hoverMove();
|
||||||
} else if (event->type() == QEvent::HoverLeave) {
|
} else if (event->type() == QEvent::HoverLeave) {
|
||||||
emit hoverLeave();
|
Q_EMIT hoverLeave();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ void DontCrashCursorPhysicalSizeEmpty::testMoveCursorOverDeco()
|
||||||
auto output = display->outputs().first();
|
auto output = display->outputs().first();
|
||||||
output->setPhysicalSize(QSize(0, 0));
|
output->setPhysicalSize(QSize(0, 0));
|
||||||
// and fake a cursor theme change, so that the theme gets recreated
|
// and fake a cursor theme change, so that the theme gets recreated
|
||||||
emit KWin::Cursors::self()->mouse()->themeChanged();
|
Q_EMIT KWin::Cursors::self()->mouse()->themeChanged();
|
||||||
|
|
||||||
KWin::Cursors::self()->mouse()->setPos(QPoint(c->frameGeometry().center().x(), c->clientPos().y() / 2));
|
KWin::Cursors::self()->mouse()->setPos(QPoint(c->frameGeometry().center().x(), c->clientPos().y() / 2));
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,13 +81,13 @@ public:
|
||||||
using AnimationEffect::state;
|
using AnimationEffect::state;
|
||||||
Q_INVOKABLE void sendTestResponse(const QString &out); //proxies triggers out from the tests
|
Q_INVOKABLE void sendTestResponse(const QString &out); //proxies triggers out from the tests
|
||||||
QList<QAction*> actions(); //returns any QActions owned by the ScriptEngine
|
QList<QAction*> actions(); //returns any QActions owned by the ScriptEngine
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void testOutput(const QString &data);
|
void testOutput(const QString &data);
|
||||||
};
|
};
|
||||||
|
|
||||||
void ScriptedEffectWithDebugSpy::sendTestResponse(const QString &out)
|
void ScriptedEffectWithDebugSpy::sendTestResponse(const QString &out)
|
||||||
{
|
{
|
||||||
emit testOutput(out);
|
Q_EMIT testOutput(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QAction *> ScriptedEffectWithDebugSpy::actions()
|
QList<QAction *> ScriptedEffectWithDebugSpy::actions()
|
||||||
|
|
|
@ -126,10 +126,10 @@ void HelperWindow::paintEvent(QPaintEvent *event)
|
||||||
bool HelperWindow::event(QEvent *event)
|
bool HelperWindow::event(QEvent *event)
|
||||||
{
|
{
|
||||||
if (event->type() == QEvent::Enter) {
|
if (event->type() == QEvent::Enter) {
|
||||||
emit entered();
|
Q_EMIT entered();
|
||||||
}
|
}
|
||||||
if (event->type() == QEvent::Leave) {
|
if (event->type() == QEvent::Leave) {
|
||||||
emit left();
|
Q_EMIT left();
|
||||||
}
|
}
|
||||||
return QRasterWindow::event(event);
|
return QRasterWindow::event(event);
|
||||||
}
|
}
|
||||||
|
@ -137,39 +137,39 @@ bool HelperWindow::event(QEvent *event)
|
||||||
void HelperWindow::mouseMoveEvent(QMouseEvent *event)
|
void HelperWindow::mouseMoveEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
m_latestGlobalMousePos = event->globalPos();
|
m_latestGlobalMousePos = event->globalPos();
|
||||||
emit mouseMoved(event->globalPos());
|
Q_EMIT mouseMoved(event->globalPos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void HelperWindow::mousePressEvent(QMouseEvent *event)
|
void HelperWindow::mousePressEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
m_latestGlobalMousePos = event->globalPos();
|
m_latestGlobalMousePos = event->globalPos();
|
||||||
m_pressedButtons = event->buttons();
|
m_pressedButtons = event->buttons();
|
||||||
emit mousePressed();
|
Q_EMIT mousePressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HelperWindow::mouseReleaseEvent(QMouseEvent *event)
|
void HelperWindow::mouseReleaseEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
m_latestGlobalMousePos = event->globalPos();
|
m_latestGlobalMousePos = event->globalPos();
|
||||||
m_pressedButtons = event->buttons();
|
m_pressedButtons = event->buttons();
|
||||||
emit mouseReleased();
|
Q_EMIT mouseReleased();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HelperWindow::wheelEvent(QWheelEvent *event)
|
void HelperWindow::wheelEvent(QWheelEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
Q_UNUSED(event)
|
||||||
emit wheel();
|
Q_EMIT wheel();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HelperWindow::keyPressEvent(QKeyEvent *event)
|
void HelperWindow::keyPressEvent(QKeyEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
Q_UNUSED(event)
|
||||||
emit keyPressed();
|
Q_EMIT keyPressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HelperWindow::keyReleaseEvent(QKeyEvent *event)
|
void HelperWindow::keyReleaseEvent(QKeyEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
Q_UNUSED(event)
|
||||||
emit keyReleased();
|
Q_EMIT keyReleased();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InternalWindowTest::initTestCase()
|
void InternalWindowTest::initTestCase()
|
||||||
|
|
|
@ -84,10 +84,10 @@ public:
|
||||||
~HelperEffect() override {}
|
~HelperEffect() override {}
|
||||||
|
|
||||||
void windowInputMouseEvent(QEvent*) override {
|
void windowInputMouseEvent(QEvent*) override {
|
||||||
emit inputEvent();
|
Q_EMIT inputEvent();
|
||||||
}
|
}
|
||||||
void grabbedKeyboardEvent(QKeyEvent *e) override {
|
void grabbedKeyboardEvent(QKeyEvent *e) override {
|
||||||
emit keyEvent(e->text());
|
Q_EMIT keyEvent(e->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
|
|
|
@ -74,7 +74,7 @@ Target::~Target()
|
||||||
|
|
||||||
void Target::shortcut()
|
void Target::shortcut()
|
||||||
{
|
{
|
||||||
emit shortcutTriggered();
|
Q_EMIT shortcutTriggered();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModifierOnlyShortcutTest::initTestCase()
|
void ModifierOnlyShortcutTest::initTestCase()
|
||||||
|
|
|
@ -83,7 +83,7 @@ Target::~Target()
|
||||||
|
|
||||||
void Target::shortcut()
|
void Target::shortcut()
|
||||||
{
|
{
|
||||||
emit shortcutTriggered();
|
Q_EMIT shortcutTriggered();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoGlobalShortcutsTest::initTestCase()
|
void NoGlobalShortcutsTest::initTestCase()
|
||||||
|
|
|
@ -64,12 +64,12 @@ LayerSurfaceV1::~LayerSurfaceV1()
|
||||||
|
|
||||||
void LayerSurfaceV1::zwlr_layer_surface_v1_configure(uint32_t serial, uint32_t width, uint32_t height)
|
void LayerSurfaceV1::zwlr_layer_surface_v1_configure(uint32_t serial, uint32_t width, uint32_t height)
|
||||||
{
|
{
|
||||||
emit configureRequested(serial, QSize(width, height));
|
Q_EMIT configureRequested(serial, QSize(width, height));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LayerSurfaceV1::zwlr_layer_surface_v1_closed()
|
void LayerSurfaceV1::zwlr_layer_surface_v1_closed()
|
||||||
{
|
{
|
||||||
emit closeRequested();
|
Q_EMIT closeRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
XdgShell::~XdgShell()
|
XdgShell::~XdgShell()
|
||||||
|
@ -96,7 +96,7 @@ Surface *XdgSurface::surface() const
|
||||||
|
|
||||||
void XdgSurface::xdg_surface_configure(uint32_t serial)
|
void XdgSurface::xdg_surface_configure(uint32_t serial)
|
||||||
{
|
{
|
||||||
emit configureRequested(serial);
|
Q_EMIT configureRequested(serial);
|
||||||
}
|
}
|
||||||
|
|
||||||
XdgToplevel::XdgToplevel(XdgSurface *surface, QObject *parent)
|
XdgToplevel::XdgToplevel(XdgSurface *surface, QObject *parent)
|
||||||
|
@ -140,12 +140,12 @@ void XdgToplevel::xdg_toplevel_configure(int32_t width, int32_t height, wl_array
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emit configureRequested(QSize(width, height), requestedStates);
|
Q_EMIT configureRequested(QSize(width, height), requestedStates);
|
||||||
}
|
}
|
||||||
|
|
||||||
void XdgToplevel::xdg_toplevel_close()
|
void XdgToplevel::xdg_toplevel_close()
|
||||||
{
|
{
|
||||||
emit closeRequested();
|
Q_EMIT closeRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
XdgPositioner::XdgPositioner(XdgShell *shell)
|
XdgPositioner::XdgPositioner(XdgShell *shell)
|
||||||
|
@ -177,12 +177,12 @@ XdgSurface *XdgPopup::xdgSurface() const
|
||||||
|
|
||||||
void XdgPopup::xdg_popup_configure(int32_t x, int32_t y, int32_t width, int32_t height)
|
void XdgPopup::xdg_popup_configure(int32_t x, int32_t y, int32_t width, int32_t height)
|
||||||
{
|
{
|
||||||
emit configureRequested(QRect(x, y, width, height));
|
Q_EMIT configureRequested(QRect(x, y, width, height));
|
||||||
}
|
}
|
||||||
|
|
||||||
void XdgPopup::xdg_popup_popup_done()
|
void XdgPopup::xdg_popup_popup_done()
|
||||||
{
|
{
|
||||||
emit doneReceived();
|
Q_EMIT doneReceived();
|
||||||
}
|
}
|
||||||
|
|
||||||
XdgDecorationManagerV1::~XdgDecorationManagerV1()
|
XdgDecorationManagerV1::~XdgDecorationManagerV1()
|
||||||
|
@ -204,7 +204,7 @@ XdgToplevelDecorationV1::~XdgToplevelDecorationV1()
|
||||||
|
|
||||||
void XdgToplevelDecorationV1::zxdg_toplevel_decoration_v1_configure(uint32_t m)
|
void XdgToplevelDecorationV1::zxdg_toplevel_decoration_v1_configure(uint32_t m)
|
||||||
{
|
{
|
||||||
emit configureRequested(mode(m));
|
Q_EMIT configureRequested(mode(m));
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleInhibitManagerV1::~IdleInhibitManagerV1()
|
IdleInhibitManagerV1::~IdleInhibitManagerV1()
|
||||||
|
|
|
@ -107,11 +107,11 @@ void X11EventReaderHelper::processXcbEvents()
|
||||||
switch (eventType) {
|
switch (eventType) {
|
||||||
case XCB_ENTER_NOTIFY: {
|
case XCB_ENTER_NOTIFY: {
|
||||||
auto enterEvent = reinterpret_cast<xcb_enter_notify_event_t *>(event);
|
auto enterEvent = reinterpret_cast<xcb_enter_notify_event_t *>(event);
|
||||||
emit entered(QPoint(enterEvent->event_x, enterEvent->event_y));
|
Q_EMIT entered(QPoint(enterEvent->event_x, enterEvent->event_y));
|
||||||
break; }
|
break; }
|
||||||
case XCB_LEAVE_NOTIFY: {
|
case XCB_LEAVE_NOTIFY: {
|
||||||
auto leaveEvent = reinterpret_cast<xcb_leave_notify_event_t *>(event);
|
auto leaveEvent = reinterpret_cast<xcb_leave_notify_event_t *>(event);
|
||||||
emit left(QPoint(leaveEvent->event_x, leaveEvent->event_y));
|
Q_EMIT left(QPoint(leaveEvent->event_x, leaveEvent->event_y));
|
||||||
break; }
|
break; }
|
||||||
}
|
}
|
||||||
free(event);
|
free(event);
|
||||||
|
|
|
@ -74,7 +74,7 @@ void AbstractClient::setHiddenInternal(bool set)
|
||||||
void AbstractClient::moveResize(const QRect &rect)
|
void AbstractClient::moveResize(const QRect &rect)
|
||||||
{
|
{
|
||||||
m_frameGeometry = rect;
|
m_frameGeometry = rect;
|
||||||
emit geometryChanged();
|
Q_EMIT geometryChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect AbstractClient::frameGeometry() const
|
QRect AbstractClient::frameGeometry() const
|
||||||
|
@ -90,7 +90,7 @@ bool AbstractClient::keepBelow() const
|
||||||
void AbstractClient::setKeepBelow(bool keepBelow)
|
void AbstractClient::setKeepBelow(bool keepBelow)
|
||||||
{
|
{
|
||||||
m_keepBelow = keepBelow;
|
m_keepBelow = keepBelow;
|
||||||
emit keepBelowChanged();
|
Q_EMIT keepBelowChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AbstractClient::isInteractiveResize() const
|
bool AbstractClient::isInteractiveResize() const
|
||||||
|
|
|
@ -87,7 +87,7 @@ void MockScreens::updateCount()
|
||||||
{
|
{
|
||||||
m_geometries = m_scheduledGeometries;
|
m_geometries = m_scheduledGeometries;
|
||||||
setCount(m_geometries.size());
|
setCount(m_geometries.size());
|
||||||
emit changed();
|
Q_EMIT changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MockScreens::setGeometries(const QList< QRect > &geometries)
|
void MockScreens::setGeometries(const QList< QRect > &geometries)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
class OnScreenNotificationTest : public QObject
|
class OnScreenNotificationTest : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private slots:
|
private Q_SLOTS:
|
||||||
|
|
||||||
void show();
|
void show();
|
||||||
void timeout();
|
void timeout();
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
class TestTabBoxClientModel : public QObject
|
class TestTabBoxClientModel : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private slots:
|
private Q_SLOTS:
|
||||||
void initTestCase();
|
void initTestCase();
|
||||||
/**
|
/**
|
||||||
* Tests that calculating the longest caption does not
|
* Tests that calculating the longest caption does not
|
||||||
|
|
|
@ -17,7 +17,7 @@ using namespace KWin;
|
||||||
class TestTabBoxHandler : public QObject
|
class TestTabBoxHandler : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private slots:
|
private Q_SLOTS:
|
||||||
void initTestCase();
|
void initTestCase();
|
||||||
/**
|
/**
|
||||||
* Test to verify that update outline does not crash
|
* Test to verify that update outline does not crash
|
||||||
|
|
|
@ -74,7 +74,7 @@ Q_SIGNALS:
|
||||||
|
|
||||||
bool TestObject::callback(KWin::ElectricBorder border)
|
bool TestObject::callback(KWin::ElectricBorder border)
|
||||||
{
|
{
|
||||||
emit gotCallback(border);
|
Q_EMIT gotCallback(border);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -682,7 +682,7 @@ void TestScreenEdges::testFullScreenBlocking()
|
||||||
QAction action;
|
QAction action;
|
||||||
s->reserveTouch(KWin::ElectricRight, &action);
|
s->reserveTouch(KWin::ElectricRight, &action);
|
||||||
// currently there is no active client yet, so check blocking shouldn't do anything
|
// currently there is no active client yet, so check blocking shouldn't do anything
|
||||||
emit s->checkBlocking();
|
Q_EMIT s->checkBlocking();
|
||||||
for (auto e: s->findChildren<Edge*>()) {
|
for (auto e: s->findChildren<Edge*>()) {
|
||||||
QCOMPARE(e->activatesForTouchGesture(), e->border() == KWin::ElectricRight);
|
QCOMPARE(e->activatesForTouchGesture(), e->border() == KWin::ElectricRight);
|
||||||
}
|
}
|
||||||
|
@ -709,7 +709,7 @@ void TestScreenEdges::testFullScreenBlocking()
|
||||||
client.setActive(true);
|
client.setActive(true);
|
||||||
client.setFullScreen(true);
|
client.setFullScreen(true);
|
||||||
ws.setActiveClient(&client);
|
ws.setActiveClient(&client);
|
||||||
emit s->checkBlocking();
|
Q_EMIT s->checkBlocking();
|
||||||
// the signal doesn't trigger for corners, let's go over all windows just to be sure that it doesn't call for corners
|
// the signal doesn't trigger for corners, let's go over all windows just to be sure that it doesn't call for corners
|
||||||
for (auto e: s->findChildren<Edge*>()) {
|
for (auto e: s->findChildren<Edge*>()) {
|
||||||
e->checkBlocking();
|
e->checkBlocking();
|
||||||
|
@ -726,7 +726,7 @@ void TestScreenEdges::testFullScreenBlocking()
|
||||||
|
|
||||||
// let's make the client not fullscreen, which should trigger
|
// let's make the client not fullscreen, which should trigger
|
||||||
client.setFullScreen(false);
|
client.setFullScreen(false);
|
||||||
emit s->checkBlocking();
|
Q_EMIT s->checkBlocking();
|
||||||
for (auto e: s->findChildren<Edge*>()) {
|
for (auto e: s->findChildren<Edge*>()) {
|
||||||
QCOMPARE(e->activatesForTouchGesture(), e->border() == KWin::ElectricRight);
|
QCOMPARE(e->activatesForTouchGesture(), e->border() == KWin::ElectricRight);
|
||||||
}
|
}
|
||||||
|
@ -739,7 +739,7 @@ void TestScreenEdges::testFullScreenBlocking()
|
||||||
QTest::qWait(351);
|
QTest::qWait(351);
|
||||||
client.setFullScreen(true);
|
client.setFullScreen(true);
|
||||||
client.moveResize(client.frameGeometry().translated(10, 0));
|
client.moveResize(client.frameGeometry().translated(10, 0));
|
||||||
emit s->checkBlocking();
|
Q_EMIT s->checkBlocking();
|
||||||
spy.clear();
|
spy.clear();
|
||||||
Cursors::self()->mouse()->setPos(0, 50);
|
Cursors::self()->mouse()->setPos(0, 50);
|
||||||
event.time = QDateTime::currentMSecsSinceEpoch();
|
event.time = QDateTime::currentMSecsSinceEpoch();
|
||||||
|
@ -750,7 +750,7 @@ void TestScreenEdges::testFullScreenBlocking()
|
||||||
|
|
||||||
// just to be sure, let's set geometry back
|
// just to be sure, let's set geometry back
|
||||||
client.moveResize(screens()->geometry());
|
client.moveResize(screens()->geometry());
|
||||||
emit s->checkBlocking();
|
Q_EMIT s->checkBlocking();
|
||||||
Cursors::self()->mouse()->setPos(0, 50);
|
Cursors::self()->mouse()->setPos(0, 50);
|
||||||
QVERIFY(isEntered(&event));
|
QVERIFY(isEntered(&event));
|
||||||
QVERIFY(spy.isEmpty());
|
QVERIFY(spy.isEmpty());
|
||||||
|
@ -852,7 +852,7 @@ void TestScreenEdges::testClientEdge()
|
||||||
QCOMPARE(client.isHiddenInternal(), true);
|
QCOMPARE(client.isHiddenInternal(), true);
|
||||||
|
|
||||||
// now let's emulate the removal of a Client through Workspace
|
// now let's emulate the removal of a Client through Workspace
|
||||||
emit workspace()->clientRemoved(&client);
|
Q_EMIT workspace()->clientRemoved(&client);
|
||||||
for (auto e : s->findChildren<Edge*>()) {
|
for (auto e : s->findChildren<Edge*>()) {
|
||||||
QVERIFY(!e->client());
|
QVERIFY(!e->client());
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ AbstractClient::AbstractClient()
|
||||||
);
|
);
|
||||||
|
|
||||||
connect(ApplicationMenu::self(), &ApplicationMenu::applicationMenuEnabledChanged, this, [this] {
|
connect(ApplicationMenu::self(), &ApplicationMenu::applicationMenuEnabledChanged, this, [this] {
|
||||||
emit hasApplicationMenuChanged(hasApplicationMenu());
|
Q_EMIT hasApplicationMenuChanged(hasApplicationMenu());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ void AbstractClient::setSkipSwitcher(bool set)
|
||||||
m_skipSwitcher = set;
|
m_skipSwitcher = set;
|
||||||
doSetSkipSwitcher();
|
doSetSkipSwitcher();
|
||||||
updateWindowRules(Rules::SkipSwitcher);
|
updateWindowRules(Rules::SkipSwitcher);
|
||||||
emit skipSwitcherChanged();
|
Q_EMIT skipSwitcherChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::setSkipPager(bool b)
|
void AbstractClient::setSkipPager(bool b)
|
||||||
|
@ -142,7 +142,7 @@ void AbstractClient::setSkipPager(bool b)
|
||||||
m_skipPager = b;
|
m_skipPager = b;
|
||||||
doSetSkipPager();
|
doSetSkipPager();
|
||||||
updateWindowRules(Rules::SkipPager);
|
updateWindowRules(Rules::SkipPager);
|
||||||
emit skipPagerChanged();
|
Q_EMIT skipPagerChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::doSetSkipPager()
|
void AbstractClient::doSetSkipPager()
|
||||||
|
@ -160,7 +160,7 @@ void AbstractClient::setSkipTaskbar(bool b)
|
||||||
if (was_wants_tab_focus != wantsTabFocus()) {
|
if (was_wants_tab_focus != wantsTabFocus()) {
|
||||||
FocusChain::self()->update(this, isActive() ? FocusChain::MakeFirst : FocusChain::Update);
|
FocusChain::self()->update(this, isActive() ? FocusChain::MakeFirst : FocusChain::Update);
|
||||||
}
|
}
|
||||||
emit skipTaskbarChanged();
|
Q_EMIT skipTaskbarChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::setOriginalSkipTaskbar(bool b)
|
void AbstractClient::setOriginalSkipTaskbar(bool b)
|
||||||
|
@ -182,7 +182,7 @@ void AbstractClient::doSetSkipSwitcher()
|
||||||
void AbstractClient::setIcon(const QIcon &icon)
|
void AbstractClient::setIcon(const QIcon &icon)
|
||||||
{
|
{
|
||||||
m_icon = icon;
|
m_icon = icon;
|
||||||
emit iconChanged();
|
Q_EMIT iconChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::setActive(bool act)
|
void AbstractClient::setActive(bool act)
|
||||||
|
@ -216,7 +216,7 @@ void AbstractClient::setActive(bool act)
|
||||||
(*it)->updateLayer();
|
(*it)->updateLayer();
|
||||||
|
|
||||||
doSetActive();
|
doSetActive();
|
||||||
emit activeChanged();
|
Q_EMIT activeChanged();
|
||||||
updateMouseGrab();
|
updateMouseGrab();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ void AbstractClient::markAsZombie()
|
||||||
Q_ASSERT(!m_zombie);
|
Q_ASSERT(!m_zombie);
|
||||||
m_zombie = true;
|
m_zombie = true;
|
||||||
addWorkspaceRepaint(visibleGeometry());
|
addWorkspaceRepaint(visibleGeometry());
|
||||||
emit markedAsZombie();
|
Q_EMIT markedAsZombie();
|
||||||
}
|
}
|
||||||
|
|
||||||
Layer AbstractClient::layer() const
|
Layer AbstractClient::layer() const
|
||||||
|
@ -339,7 +339,7 @@ void AbstractClient::setKeepAbove(bool b)
|
||||||
updateLayer();
|
updateLayer();
|
||||||
updateWindowRules(Rules::Above);
|
updateWindowRules(Rules::Above);
|
||||||
|
|
||||||
emit keepAboveChanged(m_keepAbove);
|
Q_EMIT keepAboveChanged(m_keepAbove);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::doSetKeepAbove()
|
void AbstractClient::doSetKeepAbove()
|
||||||
|
@ -359,7 +359,7 @@ void AbstractClient::setKeepBelow(bool b)
|
||||||
updateLayer();
|
updateLayer();
|
||||||
updateWindowRules(Rules::Below);
|
updateWindowRules(Rules::Below);
|
||||||
|
|
||||||
emit keepBelowChanged(m_keepBelow);
|
Q_EMIT keepBelowChanged(m_keepBelow);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::doSetKeepBelow()
|
void AbstractClient::doSetKeepBelow()
|
||||||
|
@ -413,7 +413,7 @@ void AbstractClient::demandAttention(bool set)
|
||||||
m_demandsAttention = set;
|
m_demandsAttention = set;
|
||||||
doSetDemandsAttention();
|
doSetDemandsAttention();
|
||||||
workspace()->clientAttentionChanged(this, set);
|
workspace()->clientAttentionChanged(this, set);
|
||||||
emit demandsAttentionChanged();
|
Q_EMIT demandsAttentionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::doSetDemandsAttention()
|
void AbstractClient::doSetDemandsAttention()
|
||||||
|
@ -487,7 +487,7 @@ void AbstractClient::setDesktops(QVector<VirtualDesktop*> desktops)
|
||||||
// the (just moved) modal dialog will confusingly return to the mainwindow with
|
// the (just moved) modal dialog will confusingly return to the mainwindow with
|
||||||
// the next desktop change
|
// the next desktop change
|
||||||
{
|
{
|
||||||
foreach (AbstractClient * c2, mainClients())
|
Q_FOREACH (AbstractClient * c2, mainClients())
|
||||||
c2->setDesktops(desktops);
|
c2->setDesktops(desktops);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,10 +496,10 @@ void AbstractClient::setDesktops(QVector<VirtualDesktop*> desktops)
|
||||||
FocusChain::self()->update(this, FocusChain::MakeFirst);
|
FocusChain::self()->update(this, FocusChain::MakeFirst);
|
||||||
updateWindowRules(Rules::Desktop);
|
updateWindowRules(Rules::Desktop);
|
||||||
|
|
||||||
emit desktopChanged();
|
Q_EMIT desktopChanged();
|
||||||
if (wasOnCurrentDesktop != isOnCurrentDesktop())
|
if (wasOnCurrentDesktop != isOnCurrentDesktop())
|
||||||
emit desktopPresenceChanged(this, was_desk);
|
Q_EMIT desktopPresenceChanged(this, was_desk);
|
||||||
emit x11DesktopIdsChanged();
|
Q_EMIT x11DesktopIdsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::doSetDesktop()
|
void AbstractClient::doSetDesktop()
|
||||||
|
@ -597,7 +597,7 @@ void AbstractClient::setShade(ShadeMode mode)
|
||||||
|
|
||||||
if (wasShade == isShade()) {
|
if (wasShade == isShade()) {
|
||||||
// Decoration may want to update after e.g. hover-shade changes
|
// Decoration may want to update after e.g. hover-shade changes
|
||||||
emit shadeChanged();
|
Q_EMIT shadeChanged();
|
||||||
return; // No real change in shaded state
|
return; // No real change in shaded state
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -607,7 +607,7 @@ void AbstractClient::setShade(ShadeMode mode)
|
||||||
doSetShade(previousShadeMode);
|
doSetShade(previousShadeMode);
|
||||||
updateWindowRules(Rules::Shade);
|
updateWindowRules(Rules::Shade);
|
||||||
|
|
||||||
emit shadeChanged();
|
Q_EMIT shadeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::doSetShade(ShadeMode previousShadeMode)
|
void AbstractClient::doSetShade(ShadeMode previousShadeMode)
|
||||||
|
@ -711,8 +711,8 @@ void AbstractClient::minimize(bool avoid_animation)
|
||||||
|
|
||||||
// TODO: merge signal with s_minimized
|
// TODO: merge signal with s_minimized
|
||||||
addWorkspaceRepaint(visibleGeometry());
|
addWorkspaceRepaint(visibleGeometry());
|
||||||
emit clientMinimized(this, !avoid_animation);
|
Q_EMIT clientMinimized(this, !avoid_animation);
|
||||||
emit minimizedChanged();
|
Q_EMIT minimizedChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::unminimize(bool avoid_animation)
|
void AbstractClient::unminimize(bool avoid_animation)
|
||||||
|
@ -728,8 +728,8 @@ void AbstractClient::unminimize(bool avoid_animation)
|
||||||
doMinimize();
|
doMinimize();
|
||||||
|
|
||||||
updateWindowRules(Rules::Minimize);
|
updateWindowRules(Rules::Minimize);
|
||||||
emit clientUnminimized(this, !avoid_animation);
|
Q_EMIT clientUnminimized(this, !avoid_animation);
|
||||||
emit minimizedChanged();
|
Q_EMIT minimizedChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::doMinimize()
|
void AbstractClient::doMinimize()
|
||||||
|
@ -797,8 +797,8 @@ void AbstractClient::setColorScheme(const QString &colorScheme)
|
||||||
|
|
||||||
connect(m_palette.get(), &Decoration::DecorationPalette::changed, this, &AbstractClient::handlePaletteChange);
|
connect(m_palette.get(), &Decoration::DecorationPalette::changed, this, &AbstractClient::handlePaletteChange);
|
||||||
|
|
||||||
emit paletteChanged(palette());
|
Q_EMIT paletteChanged(palette());
|
||||||
emit colorSchemeChanged();
|
Q_EMIT colorSchemeChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -809,7 +809,7 @@ void AbstractClient::updateColorScheme()
|
||||||
|
|
||||||
void AbstractClient::handlePaletteChange()
|
void AbstractClient::handlePaletteChange()
|
||||||
{
|
{
|
||||||
emit paletteChanged(palette());
|
Q_EMIT paletteChanged(palette());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::keepInArea(QRect area, bool partial)
|
void AbstractClient::keepInArea(QRect area, bool partial)
|
||||||
|
@ -903,8 +903,8 @@ void AbstractClient::setMaximize(bool vertically, bool horizontally)
|
||||||
false);
|
false);
|
||||||
const MaximizeMode newMode = maximizeMode();
|
const MaximizeMode newMode = maximizeMode();
|
||||||
if (oldMode != newMode) {
|
if (oldMode != newMode) {
|
||||||
emit clientMaximizedStateChanged(this, newMode);
|
Q_EMIT clientMaximizedStateChanged(this, newMode);
|
||||||
emit clientMaximizedStateChanged(this, vertically, horizontally);
|
Q_EMIT clientMaximizedStateChanged(this, vertically, horizontally);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -940,13 +940,13 @@ bool AbstractClient::startInteractiveMoveResize()
|
||||||
updateQuickTileMode(QuickTileFlag::None); // Do so without restoring original geometry
|
updateQuickTileMode(QuickTileFlag::None); // Do so without restoring original geometry
|
||||||
setGeometryRestore(moveResizeGeometry());
|
setGeometryRestore(moveResizeGeometry());
|
||||||
doSetQuickTileMode();
|
doSetQuickTileMode();
|
||||||
emit quickTileModeChanged();
|
Q_EMIT quickTileModeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateHaveResizeEffect();
|
updateHaveResizeEffect();
|
||||||
updateInitialMoveResizeGeometry();
|
updateInitialMoveResizeGeometry();
|
||||||
checkUnrestrictedInteractiveMoveResize();
|
checkUnrestrictedInteractiveMoveResize();
|
||||||
emit clientStartUserMovedResized(this);
|
Q_EMIT clientStartUserMovedResized(this);
|
||||||
if (ScreenEdges::self()->isDesktopSwitchingMovingClients())
|
if (ScreenEdges::self()->isDesktopSwitchingMovingClients())
|
||||||
ScreenEdges::self()->reserveDesktopSwitching(true, Qt::Vertical|Qt::Horizontal);
|
ScreenEdges::self()->reserveDesktopSwitching(true, Qt::Vertical|Qt::Horizontal);
|
||||||
return true;
|
return true;
|
||||||
|
@ -1003,7 +1003,7 @@ void AbstractClient::finishInteractiveMoveResize(bool cancel)
|
||||||
}
|
}
|
||||||
// FRAME update();
|
// FRAME update();
|
||||||
|
|
||||||
emit clientFinishUserMovedResized(this);
|
Q_EMIT clientFinishUserMovedResized(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function checks if it actually makes sense to perform a restricted move/resize.
|
// This function checks if it actually makes sense to perform a restricted move/resize.
|
||||||
|
@ -1432,7 +1432,7 @@ void AbstractClient::performInteractiveMoveResize()
|
||||||
resize(moveResizeGeom.size());
|
resize(moveResizeGeom.size());
|
||||||
}
|
}
|
||||||
positionGeometryTip();
|
positionGeometryTip();
|
||||||
emit clientStepUserMovedResized(this, moveResizeGeom);
|
Q_EMIT clientStepUserMovedResized(this, moveResizeGeom);
|
||||||
}
|
}
|
||||||
|
|
||||||
StrutRect AbstractClient::strutRect(StrutArea area) const
|
StrutRect AbstractClient::strutRect(StrutArea area) const
|
||||||
|
@ -1920,7 +1920,7 @@ void AbstractClient::setTransientFor(AbstractClient *transientFor)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_transientFor = transientFor;
|
m_transientFor = transientFor;
|
||||||
emit transientChanged();
|
Q_EMIT transientChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
const AbstractClient *AbstractClient::transientFor() const
|
const AbstractClient *AbstractClient::transientFor() const
|
||||||
|
@ -1962,7 +1962,7 @@ QList< AbstractClient* > AbstractClient::mainClients() const
|
||||||
QList<AbstractClient*> AbstractClient::allMainClients() const
|
QList<AbstractClient*> AbstractClient::allMainClients() const
|
||||||
{
|
{
|
||||||
auto result = mainClients();
|
auto result = mainClients();
|
||||||
foreach (const auto *cl, result) {
|
Q_FOREACH (const auto *cl, result) {
|
||||||
result += cl->allMainClients();
|
result += cl->allMainClients();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -1974,7 +1974,7 @@ void AbstractClient::setModal(bool m)
|
||||||
if (m_modal == m)
|
if (m_modal == m)
|
||||||
return;
|
return;
|
||||||
m_modal = m;
|
m_modal = m;
|
||||||
emit modalChanged();
|
Q_EMIT modalChanged();
|
||||||
// Changing modality for a mapped window is weird (?)
|
// Changing modality for a mapped window is weird (?)
|
||||||
// _NET_WM_STATE_MODAL should possibly rather be _NET_WM_WINDOW_TYPE_MODAL_DIALOG
|
// _NET_WM_STATE_MODAL should possibly rather be _NET_WM_WINDOW_TYPE_MODAL_DIALOG
|
||||||
}
|
}
|
||||||
|
@ -2103,7 +2103,7 @@ void AbstractClient::updateCursor()
|
||||||
if (c == m_interactiveMoveResize.cursor)
|
if (c == m_interactiveMoveResize.cursor)
|
||||||
return;
|
return;
|
||||||
m_interactiveMoveResize.cursor = c;
|
m_interactiveMoveResize.cursor = c;
|
||||||
emit moveResizeCursorChanged(c);
|
Q_EMIT moveResizeCursorChanged(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::leaveInteractiveMoveResize()
|
void AbstractClient::leaveInteractiveMoveResize()
|
||||||
|
@ -2315,7 +2315,7 @@ void AbstractClient::createDecoration(const QRect &oldGeometry)
|
||||||
if (!isShade()) {
|
if (!isShade()) {
|
||||||
checkWorkspacePosition(oldGeometry);
|
checkWorkspacePosition(oldGeometry);
|
||||||
}
|
}
|
||||||
emit geometryShapeChanged(this, oldGeometry);
|
Q_EMIT geometryShapeChanged(this, oldGeometry);
|
||||||
});
|
});
|
||||||
connect(decoratedClient()->decoratedClient(), &KDecoration2::DecoratedClient::sizeChanged,
|
connect(decoratedClient()->decoratedClient(), &KDecoration2::DecoratedClient::sizeChanged,
|
||||||
this, &AbstractClient::updateDecorationInputShape);
|
this, &AbstractClient::updateDecorationInputShape);
|
||||||
|
@ -2324,7 +2324,7 @@ void AbstractClient::createDecoration(const QRect &oldGeometry)
|
||||||
moveResize(QRect(oldGeometry.topLeft(), clientSizeToFrameSize(clientSize())));
|
moveResize(QRect(oldGeometry.topLeft(), clientSizeToFrameSize(clientSize())));
|
||||||
updateDecorationInputShape();
|
updateDecorationInputShape();
|
||||||
|
|
||||||
emit geometryShapeChanged(this, oldGeometry);
|
Q_EMIT geometryShapeChanged(this, oldGeometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::destroyDecoration()
|
void AbstractClient::destroyDecoration()
|
||||||
|
@ -2337,7 +2337,7 @@ void AbstractClient::destroyDecoration()
|
||||||
void AbstractClient::setDecoration(KDecoration2::Decoration *decoration)
|
void AbstractClient::setDecoration(KDecoration2::Decoration *decoration)
|
||||||
{
|
{
|
||||||
m_decoration.decoration = decoration;
|
m_decoration.decoration = decoration;
|
||||||
emit decorationChanged();
|
Q_EMIT decorationChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::updateDecorationInputShape()
|
void AbstractClient::updateDecorationInputShape()
|
||||||
|
@ -2653,7 +2653,7 @@ void AbstractClient::setDesktopFileName(QByteArray name)
|
||||||
}
|
}
|
||||||
m_desktopFileName = name;
|
m_desktopFileName = name;
|
||||||
updateWindowRules(Rules::DesktopFile);
|
updateWindowRules(Rules::DesktopFile);
|
||||||
emit desktopFileNameChanged();
|
Q_EMIT desktopFileNameChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AbstractClient::iconFromDesktopFile() const
|
QString AbstractClient::iconFromDesktopFile() const
|
||||||
|
@ -2702,9 +2702,9 @@ void AbstractClient::updateApplicationMenuServiceName(const QString &serviceName
|
||||||
|
|
||||||
const bool new_hasApplicationMenu = hasApplicationMenu();
|
const bool new_hasApplicationMenu = hasApplicationMenu();
|
||||||
|
|
||||||
emit applicationMenuChanged();
|
Q_EMIT applicationMenuChanged();
|
||||||
if (old_hasApplicationMenu != new_hasApplicationMenu) {
|
if (old_hasApplicationMenu != new_hasApplicationMenu) {
|
||||||
emit hasApplicationMenuChanged(new_hasApplicationMenu);
|
Q_EMIT hasApplicationMenuChanged(new_hasApplicationMenu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2716,9 +2716,9 @@ void AbstractClient::updateApplicationMenuObjectPath(const QString &objectPath)
|
||||||
|
|
||||||
const bool new_hasApplicationMenu = hasApplicationMenu();
|
const bool new_hasApplicationMenu = hasApplicationMenu();
|
||||||
|
|
||||||
emit applicationMenuChanged();
|
Q_EMIT applicationMenuChanged();
|
||||||
if (old_hasApplicationMenu != new_hasApplicationMenu) {
|
if (old_hasApplicationMenu != new_hasApplicationMenu) {
|
||||||
emit hasApplicationMenuChanged(new_hasApplicationMenu);
|
Q_EMIT hasApplicationMenuChanged(new_hasApplicationMenu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2726,7 +2726,7 @@ void AbstractClient::setApplicationMenuActive(bool applicationMenuActive)
|
||||||
{
|
{
|
||||||
if (m_applicationMenuActive != applicationMenuActive) {
|
if (m_applicationMenuActive != applicationMenuActive) {
|
||||||
m_applicationMenuActive = applicationMenuActive;
|
m_applicationMenuActive = applicationMenuActive;
|
||||||
emit applicationMenuActiveChanged(applicationMenuActive);
|
Q_EMIT applicationMenuActiveChanged(applicationMenuActive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2749,8 +2749,8 @@ void AbstractClient::setUnresponsive(bool unresponsive)
|
||||||
{
|
{
|
||||||
if (m_unresponsive != unresponsive) {
|
if (m_unresponsive != unresponsive) {
|
||||||
m_unresponsive = unresponsive;
|
m_unresponsive = unresponsive;
|
||||||
emit unresponsiveChanged(m_unresponsive);
|
Q_EMIT unresponsiveChanged(m_unresponsive);
|
||||||
emit captionChanged();
|
Q_EMIT captionChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2911,7 +2911,7 @@ void AbstractClient::updateActivities(bool includeTransients)
|
||||||
m_blockedActivityUpdatesRequireTransients |= includeTransients;
|
m_blockedActivityUpdatesRequireTransients |= includeTransients;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit activitiesChanged(this);
|
Q_EMIT activitiesChanged(this);
|
||||||
m_blockedActivityUpdatesRequireTransients = false; // reset
|
m_blockedActivityUpdatesRequireTransients = false; // reset
|
||||||
FocusChain::self()->update(this, FocusChain::MakeFirst);
|
FocusChain::self()->update(this, FocusChain::MakeFirst);
|
||||||
updateWindowRules(Rules::Activity);
|
updateWindowRules(Rules::Activity);
|
||||||
|
@ -3103,7 +3103,7 @@ void AbstractClient::setQuickTileMode(QuickTileMode mode, bool keyboard)
|
||||||
setGeometryRestore(prev_geom_restore);
|
setGeometryRestore(prev_geom_restore);
|
||||||
}
|
}
|
||||||
doSetQuickTileMode();
|
doSetQuickTileMode();
|
||||||
emit quickTileModeChanged();
|
Q_EMIT quickTileModeChanged();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3132,7 +3132,7 @@ void AbstractClient::setQuickTileMode(QuickTileMode mode, bool keyboard)
|
||||||
}
|
}
|
||||||
|
|
||||||
doSetQuickTileMode();
|
doSetQuickTileMode();
|
||||||
emit quickTileModeChanged();
|
Q_EMIT quickTileModeChanged();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3208,7 +3208,7 @@ void AbstractClient::setQuickTileMode(QuickTileMode mode, bool keyboard)
|
||||||
checkWorkspacePosition(); // Just in case it's a different screen
|
checkWorkspacePosition(); // Just in case it's a different screen
|
||||||
}
|
}
|
||||||
doSetQuickTileMode();
|
doSetQuickTileMode();
|
||||||
emit quickTileModeChanged();
|
Q_EMIT quickTileModeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractClient::doSetQuickTileMode()
|
void AbstractClient::doSetQuickTileMode()
|
||||||
|
@ -3221,7 +3221,7 @@ void AbstractClient::sendToScreen(int newScreen)
|
||||||
if (isActive()) {
|
if (isActive()) {
|
||||||
screens()->setCurrent(newScreen);
|
screens()->setCurrent(newScreen);
|
||||||
// might impact the layer of a fullscreen window
|
// might impact the layer of a fullscreen window
|
||||||
foreach (AbstractClient *cc, workspace()->allClientList()) {
|
Q_FOREACH (AbstractClient *cc, workspace()->allClientList()) {
|
||||||
if (cc->isFullScreen() && cc->screen() == newScreen) {
|
if (cc->isFullScreen() && cc->screen() == newScreen) {
|
||||||
cc->updateLayer();
|
cc->updateLayer();
|
||||||
}
|
}
|
||||||
|
@ -3365,7 +3365,7 @@ void AbstractClient::checkWorkspacePosition(QRect oldGeometry, int oldDesktop, Q
|
||||||
// we need to find the screen area as it was before the change
|
// we need to find the screen area as it was before the change
|
||||||
oldScreenArea = QRect( 0, 0, workspace()->oldDisplayWidth(), workspace()->oldDisplayHeight());
|
oldScreenArea = QRect( 0, 0, workspace()->oldDisplayWidth(), workspace()->oldDisplayHeight());
|
||||||
int distance = INT_MAX;
|
int distance = INT_MAX;
|
||||||
foreach(const QRect &r, workspace()->previousScreenSizes()) {
|
Q_FOREACH(const QRect &r, workspace()->previousScreenSizes()) {
|
||||||
int d = r.contains( oldGeometry.center()) ? 0 : ( r.center() - oldGeometry.center()).manhattanLength();
|
int d = r.contains( oldGeometry.center()) ? 0 : ( r.center() - oldGeometry.center()).manhattanLength();
|
||||||
if( d < distance ) {
|
if( d < distance ) {
|
||||||
distance = d;
|
distance = d;
|
||||||
|
|
|
@ -39,7 +39,7 @@ void AbstractWaylandOutput::setCapabilityInternal(Capability capability, bool on
|
||||||
{
|
{
|
||||||
if (static_cast<bool>(m_capabilities & capability) != on) {
|
if (static_cast<bool>(m_capabilities & capability) != on) {
|
||||||
m_capabilities.setFlag(capability, on);
|
m_capabilities.setFlag(capability, on);
|
||||||
emit capabilitiesChanged();
|
Q_EMIT capabilitiesChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ void AbstractWaylandOutput::setGlobalPos(const QPoint &pos)
|
||||||
{
|
{
|
||||||
if (m_position != pos) {
|
if (m_position != pos) {
|
||||||
m_position = pos;
|
m_position = pos;
|
||||||
emit geometryChanged();
|
Q_EMIT geometryChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,8 +130,8 @@ void AbstractWaylandOutput::setScale(qreal scale)
|
||||||
{
|
{
|
||||||
if (m_scale != scale) {
|
if (m_scale != scale) {
|
||||||
m_scale = scale;
|
m_scale = scale;
|
||||||
emit scaleChanged();
|
Q_EMIT scaleChanged();
|
||||||
emit geometryChanged();
|
Q_EMIT geometryChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,11 +186,11 @@ void AbstractWaylandOutput::applyChanges(const KWaylandServer::OutputChangeSet *
|
||||||
|
|
||||||
overallSizeCheckNeeded |= emitModeChanged;
|
overallSizeCheckNeeded |= emitModeChanged;
|
||||||
if (overallSizeCheckNeeded) {
|
if (overallSizeCheckNeeded) {
|
||||||
emit screens()->changed();
|
Q_EMIT screens()->changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (emitModeChanged) {
|
if (emitModeChanged) {
|
||||||
emit modeChanged();
|
Q_EMIT modeChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ void AbstractWaylandOutput::setEnabled(bool enable)
|
||||||
if (m_isEnabled != enable) {
|
if (m_isEnabled != enable) {
|
||||||
m_isEnabled = enable;
|
m_isEnabled = enable;
|
||||||
updateEnablement(enable);
|
updateEnablement(enable);
|
||||||
emit enabledChanged();
|
Q_EMIT enabledChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ void AbstractWaylandOutput::setCurrentModeInternal(const QSize &size, int refres
|
||||||
if (m_modeSize != size || m_refreshRate != refreshRate) {
|
if (m_modeSize != size || m_refreshRate != refreshRate) {
|
||||||
m_modeSize = size;
|
m_modeSize = size;
|
||||||
m_refreshRate = refreshRate;
|
m_refreshRate = refreshRate;
|
||||||
emit geometryChanged();
|
Q_EMIT geometryChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,8 +268,8 @@ void AbstractWaylandOutput::setTransformInternal(Transform transform)
|
||||||
{
|
{
|
||||||
if (m_transform != transform) {
|
if (m_transform != transform) {
|
||||||
m_transform = transform;
|
m_transform = transform;
|
||||||
emit transformChanged();
|
Q_EMIT transformChanged();
|
||||||
emit modeChanged();
|
Q_EMIT modeChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ void AbstractWaylandOutput::setDpmsModeInternal(DpmsMode dpmsMode)
|
||||||
{
|
{
|
||||||
if (m_dpmsMode != dpmsMode) {
|
if (m_dpmsMode != dpmsMode) {
|
||||||
m_dpmsMode = dpmsMode;
|
m_dpmsMode = dpmsMode;
|
||||||
emit dpmsModeChanged();
|
Q_EMIT dpmsModeChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ void AbstractWaylandOutput::setOverscanInternal(uint32_t overscan)
|
||||||
{
|
{
|
||||||
if (m_overscan != overscan) {
|
if (m_overscan != overscan) {
|
||||||
m_overscan = overscan;
|
m_overscan = overscan;
|
||||||
emit overscanChanged();
|
Q_EMIT overscanChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ void AbstractWaylandOutput::setVrrPolicy(RenderLoop::VrrPolicy policy)
|
||||||
{
|
{
|
||||||
if (renderLoop()->vrrPolicy() != policy && (m_capabilities & Capability::Vrr)) {
|
if (renderLoop()->vrrPolicy() != policy && (m_capabilities & Capability::Vrr)) {
|
||||||
renderLoop()->setVrrPolicy(policy);
|
renderLoop()->setVrrPolicy(policy);
|
||||||
emit vrrPolicyChanged();
|
Q_EMIT vrrPolicyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,7 @@ void Workspace::setActiveClient(AbstractClient* c)
|
||||||
rootInfo()->setActiveClient(active_client);
|
rootInfo()->setActiveClient(active_client);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit clientActivated(active_client);
|
Q_EMIT clientActivated(active_client);
|
||||||
--set_active_client_recursion;
|
--set_active_client_recursion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -680,7 +680,7 @@ void Workspace::clientAttentionChanged(AbstractClient* c, bool set)
|
||||||
attention_chain.prepend(c);
|
attention_chain.prepend(c);
|
||||||
} else
|
} else
|
||||||
attention_chain.removeAll(c);
|
attention_chain.removeAll(c);
|
||||||
emit clientDemandsAttentionChanged(c, set);
|
Q_EMIT clientDemandsAttentionChanged(c, set);
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************************
|
//********************************************
|
||||||
|
|
|
@ -55,7 +55,7 @@ void Activities::slotCurrentChanged(const QString &newActivity)
|
||||||
}
|
}
|
||||||
m_previous = m_current;
|
m_previous = m_current;
|
||||||
m_current = newActivity;
|
m_current = newActivity;
|
||||||
emit currentChanged(newActivity);
|
Q_EMIT currentChanged(newActivity);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Activities::slotRemoved(const QString &activity)
|
void Activities::slotRemoved(const QString &activity)
|
||||||
|
@ -172,7 +172,7 @@ void Activities::reallyStop(const QString &id)
|
||||||
}
|
}
|
||||||
|
|
||||||
const QStringList activities = c->activities();
|
const QStringList activities = c->activities();
|
||||||
foreach (const QString & activityId, activities) {
|
Q_FOREACH (const QString & activityId, activities) {
|
||||||
if (activityId == id) {
|
if (activityId == id) {
|
||||||
saveSessionIds << sessionId;
|
saveSessionIds << sessionId;
|
||||||
} else if (running().contains(activityId)) {
|
} else if (running().contains(activityId)) {
|
||||||
|
@ -185,7 +185,7 @@ void Activities::reallyStop(const QString &id)
|
||||||
|
|
||||||
QStringList saveAndClose;
|
QStringList saveAndClose;
|
||||||
QStringList saveOnly;
|
QStringList saveOnly;
|
||||||
foreach (const QByteArray & sessionId, saveSessionIds) {
|
Q_FOREACH (const QByteArray & sessionId, saveSessionIds) {
|
||||||
if (dontCloseSessionIds.contains(sessionId)) {
|
if (dontCloseSessionIds.contains(sessionId)) {
|
||||||
saveOnly << sessionId;
|
saveOnly << sessionId;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -40,12 +40,12 @@ ApplicationMenu::ApplicationMenu(QObject *parent)
|
||||||
connect(m_kappMenuWatcher, &QDBusServiceWatcher::serviceRegistered,
|
connect(m_kappMenuWatcher, &QDBusServiceWatcher::serviceRegistered,
|
||||||
this, [this] () {
|
this, [this] () {
|
||||||
m_applicationMenuEnabled = true;
|
m_applicationMenuEnabled = true;
|
||||||
emit applicationMenuEnabledChanged(true);
|
Q_EMIT applicationMenuEnabledChanged(true);
|
||||||
});
|
});
|
||||||
connect(m_kappMenuWatcher, &QDBusServiceWatcher::serviceUnregistered,
|
connect(m_kappMenuWatcher, &QDBusServiceWatcher::serviceUnregistered,
|
||||||
this, [this] () {
|
this, [this] () {
|
||||||
m_applicationMenuEnabled = false;
|
m_applicationMenuEnabled = false;
|
||||||
emit applicationMenuEnabledChanged(false);
|
Q_EMIT applicationMenuEnabledChanged(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
m_applicationMenuEnabled = QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral("org.kde.kappmenu"));
|
m_applicationMenuEnabled = QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral("org.kde.kappmenu"));
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
|
|
||||||
void setViewEnabled(bool enabled);
|
void setViewEnabled(bool enabled);
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void applicationMenuEnabledChanged(bool enabled);
|
void applicationMenuEnabledChanged(bool enabled);
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
|
|
|
@ -142,7 +142,7 @@ void GetAddrInfo::compare()
|
||||||
ownAddress = ownAddress->ai_next;
|
ownAddress = ownAddress->ai_next;
|
||||||
}
|
}
|
||||||
if (localFound) {
|
if (localFound) {
|
||||||
emit local();
|
Q_EMIT local();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ void ClientMachine::checkForLocalhost()
|
||||||
void ClientMachine::setLocal()
|
void ClientMachine::setLocal()
|
||||||
{
|
{
|
||||||
m_localhost = true;
|
m_localhost = true;
|
||||||
emit localhostChanged();
|
Q_EMIT localhostChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientMachine::resolveFinished()
|
void ClientMachine::resolveFinished()
|
||||||
|
|
|
@ -304,7 +304,7 @@ void ColorDevice::setBrightness(uint brightness)
|
||||||
d->brightness = brightness;
|
d->brightness = brightness;
|
||||||
d->dirtyCurves |= ColorDevicePrivate::DirtyBrightnessToneCurve;
|
d->dirtyCurves |= ColorDevicePrivate::DirtyBrightnessToneCurve;
|
||||||
scheduleUpdate();
|
scheduleUpdate();
|
||||||
emit brightnessChanged();
|
Q_EMIT brightnessChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint ColorDevice::temperature() const
|
uint ColorDevice::temperature() const
|
||||||
|
@ -324,7 +324,7 @@ void ColorDevice::setTemperature(uint temperature)
|
||||||
d->temperature = temperature;
|
d->temperature = temperature;
|
||||||
d->dirtyCurves |= ColorDevicePrivate::DirtyTemperatureToneCurve;
|
d->dirtyCurves |= ColorDevicePrivate::DirtyTemperatureToneCurve;
|
||||||
scheduleUpdate();
|
scheduleUpdate();
|
||||||
emit temperatureChanged();
|
Q_EMIT temperatureChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ColorDevice::profile() const
|
QString ColorDevice::profile() const
|
||||||
|
@ -340,7 +340,7 @@ void ColorDevice::setProfile(const QString &profile)
|
||||||
d->profile = profile;
|
d->profile = profile;
|
||||||
d->dirtyCurves |= ColorDevicePrivate::DirtyCalibrationToneCurve;
|
d->dirtyCurves |= ColorDevicePrivate::DirtyCalibrationToneCurve;
|
||||||
scheduleUpdate();
|
scheduleUpdate();
|
||||||
emit profileChanged();
|
Q_EMIT profileChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorDevice::update()
|
void ColorDevice::update()
|
||||||
|
|
|
@ -65,7 +65,7 @@ void ColorManager::handleOutputEnabled(AbstractOutput *output)
|
||||||
{
|
{
|
||||||
ColorDevice *device = new ColorDevice(output, this);
|
ColorDevice *device = new ColorDevice(output, this);
|
||||||
d->devices.append(device);
|
d->devices.append(device);
|
||||||
emit deviceAdded(device);
|
Q_EMIT deviceAdded(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorManager::handleOutputDisabled(AbstractOutput *output)
|
void ColorManager::handleOutputDisabled(AbstractOutput *output)
|
||||||
|
@ -79,7 +79,7 @@ void ColorManager::handleOutputDisabled(AbstractOutput *output)
|
||||||
}
|
}
|
||||||
ColorDevice *device = *it;
|
ColorDevice *device = *it;
|
||||||
d->devices.erase(it);
|
d->devices.erase(it);
|
||||||
emit deviceRemoved(device);
|
Q_EMIT deviceRemoved(device);
|
||||||
delete device;
|
delete device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ Compositor::Compositor(QObject* workspace)
|
||||||
|
|
||||||
Compositor::~Compositor()
|
Compositor::~Compositor()
|
||||||
{
|
{
|
||||||
emit aboutToDestroy();
|
Q_EMIT aboutToDestroy();
|
||||||
stop();
|
stop();
|
||||||
deleteUnusedSupportProperties();
|
deleteUnusedSupportProperties();
|
||||||
destroyCompositorSelection();
|
destroyCompositorSelection();
|
||||||
|
@ -183,7 +183,7 @@ bool Compositor::setupStart()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emit aboutToToggleCompositing();
|
Q_EMIT aboutToToggleCompositing();
|
||||||
|
|
||||||
auto supportedCompositors = kwinApp()->platform()->supportedCompositors();
|
auto supportedCompositors = kwinApp()->platform()->supportedCompositors();
|
||||||
const auto userConfigIt = std::find(supportedCompositors.begin(), supportedCompositors.end(),
|
const auto userConfigIt = std::find(supportedCompositors.begin(), supportedCompositors.end(),
|
||||||
|
@ -280,7 +280,7 @@ bool Compositor::setupStart()
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(m_scene, &Scene::resetCompositing, this, &Compositor::reinitialize);
|
connect(m_scene, &Scene::resetCompositing, this, &Compositor::reinitialize);
|
||||||
emit sceneCreated();
|
Q_EMIT sceneCreated();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -367,7 +367,7 @@ void Compositor::startupWithWorkspace()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_state = State::On;
|
m_state = State::On;
|
||||||
emit compositingToggled(true);
|
Q_EMIT compositingToggled(true);
|
||||||
|
|
||||||
if (m_releaseSelectionTimer.isActive()) {
|
if (m_releaseSelectionTimer.isActive()) {
|
||||||
m_releaseSelectionTimer.stop();
|
m_releaseSelectionTimer.stop();
|
||||||
|
@ -424,7 +424,7 @@ void Compositor::stop()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_state = State::Stopping;
|
m_state = State::Stopping;
|
||||||
emit aboutToToggleCompositing();
|
Q_EMIT aboutToToggleCompositing();
|
||||||
|
|
||||||
m_releaseSelectionTimer.start();
|
m_releaseSelectionTimer.start();
|
||||||
|
|
||||||
|
@ -484,7 +484,7 @@ void Compositor::stop()
|
||||||
m_scene = nullptr;
|
m_scene = nullptr;
|
||||||
|
|
||||||
m_state = State::Off;
|
m_state = State::Off;
|
||||||
emit compositingToggled(false);
|
Q_EMIT compositingToggled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Compositor::destroyCompositorSelection()
|
void Compositor::destroyCompositorSelection()
|
||||||
|
|
|
@ -125,7 +125,7 @@ void Cursor::updateTheme(const QString &name, int size)
|
||||||
if (m_themeName != name || m_themeSize != size) {
|
if (m_themeName != name || m_themeSize != size) {
|
||||||
m_themeName = name;
|
m_themeName = name;
|
||||||
m_themeSize = size;
|
m_themeSize = size;
|
||||||
emit themeChanged();
|
Q_EMIT themeChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ xcb_cursor_t Cursor::x11Cursor(const QByteArray &name)
|
||||||
|
|
||||||
void Cursor::doSetPos()
|
void Cursor::doSetPos()
|
||||||
{
|
{
|
||||||
emit posChanged(m_pos);
|
Q_EMIT posChanged(m_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cursor::doGetPos()
|
void Cursor::doGetPos()
|
||||||
|
@ -217,7 +217,7 @@ void Cursor::updatePos(const QPoint &pos)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_pos = pos;
|
m_pos = pos;
|
||||||
emit posChanged(m_pos);
|
Q_EMIT posChanged(m_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cursor::startMousePolling()
|
void Cursor::startMousePolling()
|
||||||
|
|
|
@ -369,21 +369,21 @@ VirtualDesktopManagerDBusInterface::VirtualDesktopManagerDBusInterface(VirtualDe
|
||||||
[this](uint previousDesktop, uint newDesktop) {
|
[this](uint previousDesktop, uint newDesktop) {
|
||||||
Q_UNUSED(previousDesktop);
|
Q_UNUSED(previousDesktop);
|
||||||
Q_UNUSED(newDesktop);
|
Q_UNUSED(newDesktop);
|
||||||
emit currentChanged(m_manager->currentDesktop()->id());
|
Q_EMIT currentChanged(m_manager->currentDesktop()->id());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
connect(m_manager, &VirtualDesktopManager::countChanged, this,
|
connect(m_manager, &VirtualDesktopManager::countChanged, this,
|
||||||
[this](uint previousCount, uint newCount) {
|
[this](uint previousCount, uint newCount) {
|
||||||
Q_UNUSED(previousCount);
|
Q_UNUSED(previousCount);
|
||||||
emit countChanged(newCount);
|
Q_EMIT countChanged(newCount);
|
||||||
emit desktopsChanged(desktops());
|
Q_EMIT desktopsChanged(desktops());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
connect(m_manager, &VirtualDesktopManager::navigationWrappingAroundChanged, this,
|
connect(m_manager, &VirtualDesktopManager::navigationWrappingAroundChanged, this,
|
||||||
[this]() {
|
[this]() {
|
||||||
emit navigationWrappingAroundChanged(isNavigationWrappingAround());
|
Q_EMIT navigationWrappingAroundChanged(isNavigationWrappingAround());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -393,15 +393,15 @@ VirtualDesktopManagerDBusInterface::VirtualDesktopManagerDBusInterface(VirtualDe
|
||||||
connect(vd, &VirtualDesktop::x11DesktopNumberChanged, this,
|
connect(vd, &VirtualDesktop::x11DesktopNumberChanged, this,
|
||||||
[this, vd]() {
|
[this, vd]() {
|
||||||
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
|
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
|
||||||
emit desktopDataChanged(vd->id(), data);
|
Q_EMIT desktopDataChanged(vd->id(), data);
|
||||||
emit desktopsChanged(desktops());
|
Q_EMIT desktopsChanged(desktops());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(vd, &VirtualDesktop::nameChanged, this,
|
connect(vd, &VirtualDesktop::nameChanged, this,
|
||||||
[this, vd]() {
|
[this, vd]() {
|
||||||
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
|
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
|
||||||
emit desktopDataChanged(vd->id(), data);
|
Q_EMIT desktopDataChanged(vd->id(), data);
|
||||||
emit desktopsChanged(desktops());
|
Q_EMIT desktopsChanged(desktops());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -410,26 +410,26 @@ VirtualDesktopManagerDBusInterface::VirtualDesktopManagerDBusInterface(VirtualDe
|
||||||
connect(vd, &VirtualDesktop::x11DesktopNumberChanged, this,
|
connect(vd, &VirtualDesktop::x11DesktopNumberChanged, this,
|
||||||
[this, vd]() {
|
[this, vd]() {
|
||||||
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
|
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
|
||||||
emit desktopDataChanged(vd->id(), data);
|
Q_EMIT desktopDataChanged(vd->id(), data);
|
||||||
emit desktopsChanged(desktops());
|
Q_EMIT desktopsChanged(desktops());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(vd, &VirtualDesktop::nameChanged, this,
|
connect(vd, &VirtualDesktop::nameChanged, this,
|
||||||
[this, vd]() {
|
[this, vd]() {
|
||||||
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
|
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
|
||||||
emit desktopDataChanged(vd->id(), data);
|
Q_EMIT desktopDataChanged(vd->id(), data);
|
||||||
emit desktopsChanged(desktops());
|
Q_EMIT desktopsChanged(desktops());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
|
DBusDesktopDataStruct data{.position = vd->x11DesktopNumber() - 1, .id = vd->id(), .name = vd->name()};
|
||||||
emit desktopCreated(vd->id(), data);
|
Q_EMIT desktopCreated(vd->id(), data);
|
||||||
emit desktopsChanged(desktops());
|
Q_EMIT desktopsChanged(desktops());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(m_manager, &VirtualDesktopManager::desktopRemoved, this,
|
connect(m_manager, &VirtualDesktopManager::desktopRemoved, this,
|
||||||
[this](VirtualDesktop *vd) {
|
[this](VirtualDesktop *vd) {
|
||||||
emit desktopRemoved(vd->id());
|
Q_EMIT desktopRemoved(vd->id());
|
||||||
emit desktopsChanged(desktops());
|
Q_EMIT desktopsChanged(desktops());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1531,21 +1531,21 @@ void InputDeviceModel::setupDeviceConnections(LibInput::Device *device)
|
||||||
[this, device] {
|
[this, device] {
|
||||||
const QModelIndex parent = index(m_devices.indexOf(device), 0, QModelIndex());
|
const QModelIndex parent = index(m_devices.indexOf(device), 0, QModelIndex());
|
||||||
const QModelIndex child = index(device->metaObject()->indexOfProperty("enabled"), 1, parent);
|
const QModelIndex child = index(device->metaObject()->indexOfProperty("enabled"), 1, parent);
|
||||||
emit dataChanged(child, child, QVector<int>{Qt::DisplayRole});
|
Q_EMIT dataChanged(child, child, QVector<int>{Qt::DisplayRole});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(device, &LibInput::Device::leftHandedChanged, this,
|
connect(device, &LibInput::Device::leftHandedChanged, this,
|
||||||
[this, device] {
|
[this, device] {
|
||||||
const QModelIndex parent = index(m_devices.indexOf(device), 0, QModelIndex());
|
const QModelIndex parent = index(m_devices.indexOf(device), 0, QModelIndex());
|
||||||
const QModelIndex child = index(device->metaObject()->indexOfProperty("leftHanded"), 1, parent);
|
const QModelIndex child = index(device->metaObject()->indexOfProperty("leftHanded"), 1, parent);
|
||||||
emit dataChanged(child, child, QVector<int>{Qt::DisplayRole});
|
Q_EMIT dataChanged(child, child, QVector<int>{Qt::DisplayRole});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(device, &LibInput::Device::pointerAccelerationChanged, this,
|
connect(device, &LibInput::Device::pointerAccelerationChanged, this,
|
||||||
[this, device] {
|
[this, device] {
|
||||||
const QModelIndex parent = index(m_devices.indexOf(device), 0, QModelIndex());
|
const QModelIndex parent = index(m_devices.indexOf(device), 0, QModelIndex());
|
||||||
const QModelIndex child = index(device->metaObject()->indexOfProperty("pointerAcceleration"), 1, parent);
|
const QModelIndex child = index(device->metaObject()->indexOfProperty("pointerAcceleration"), 1, parent);
|
||||||
emit dataChanged(child, child, QVector<int>{Qt::DisplayRole});
|
Q_EMIT dataChanged(child, child, QVector<int>{Qt::DisplayRole});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ QRegion DecorationRenderer::damage() const
|
||||||
void DecorationRenderer::addDamage(const QRegion ®ion)
|
void DecorationRenderer::addDamage(const QRegion ®ion)
|
||||||
{
|
{
|
||||||
m_damage += region;
|
m_damage += region;
|
||||||
emit damaged(region);
|
Q_EMIT damaged(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecorationRenderer::resetDamage()
|
void DecorationRenderer::resetDamage()
|
||||||
|
|
|
@ -34,7 +34,7 @@ DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::D
|
||||||
client->setDecoratedClient(QPointer<DecoratedClientImpl>(this));
|
client->setDecoratedClient(QPointer<DecoratedClientImpl>(this));
|
||||||
connect(client, &AbstractClient::activeChanged, this,
|
connect(client, &AbstractClient::activeChanged, this,
|
||||||
[decoratedClient, client]() {
|
[decoratedClient, client]() {
|
||||||
emit decoratedClient->activeChanged(client->isActive());
|
Q_EMIT decoratedClient->activeChanged(client->isActive());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(client, &AbstractClient::clientGeometryChanged, this,
|
connect(client, &AbstractClient::clientGeometryChanged, this,
|
||||||
|
@ -45,27 +45,27 @@ DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::D
|
||||||
const auto oldSize = m_clientSize;
|
const auto oldSize = m_clientSize;
|
||||||
m_clientSize = m_client->clientSize();
|
m_clientSize = m_client->clientSize();
|
||||||
if (oldSize.width() != m_clientSize.width()) {
|
if (oldSize.width() != m_clientSize.width()) {
|
||||||
emit decoratedClient->widthChanged(m_clientSize.width());
|
Q_EMIT decoratedClient->widthChanged(m_clientSize.width());
|
||||||
}
|
}
|
||||||
if (oldSize.height() != m_clientSize.height()) {
|
if (oldSize.height() != m_clientSize.height()) {
|
||||||
emit decoratedClient->heightChanged(m_clientSize.height());
|
Q_EMIT decoratedClient->heightChanged(m_clientSize.height());
|
||||||
}
|
}
|
||||||
emit decoratedClient->sizeChanged(m_clientSize);
|
Q_EMIT decoratedClient->sizeChanged(m_clientSize);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(client, &AbstractClient::desktopChanged, this,
|
connect(client, &AbstractClient::desktopChanged, this,
|
||||||
[decoratedClient, client]() {
|
[decoratedClient, client]() {
|
||||||
emit decoratedClient->onAllDesktopsChanged(client->isOnAllDesktops());
|
Q_EMIT decoratedClient->onAllDesktopsChanged(client->isOnAllDesktops());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(client, &AbstractClient::captionChanged, this,
|
connect(client, &AbstractClient::captionChanged, this,
|
||||||
[decoratedClient, client]() {
|
[decoratedClient, client]() {
|
||||||
emit decoratedClient->captionChanged(client->caption());
|
Q_EMIT decoratedClient->captionChanged(client->caption());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(client, &AbstractClient::iconChanged, this,
|
connect(client, &AbstractClient::iconChanged, this,
|
||||||
[decoratedClient, client]() {
|
[decoratedClient, client]() {
|
||||||
emit decoratedClient->iconChanged(client->icon());
|
Q_EMIT decoratedClient->iconChanged(client->icon());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(client, &AbstractClient::shadeChanged, this,
|
connect(client, &AbstractClient::shadeChanged, this,
|
||||||
|
@ -74,7 +74,7 @@ DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::D
|
||||||
connect(client, &AbstractClient::keepBelowChanged, decoratedClient, &KDecoration2::DecoratedClient::keepBelowChanged);
|
connect(client, &AbstractClient::keepBelowChanged, decoratedClient, &KDecoration2::DecoratedClient::keepBelowChanged);
|
||||||
connect(client, &AbstractClient::quickTileModeChanged, decoratedClient,
|
connect(client, &AbstractClient::quickTileModeChanged, decoratedClient,
|
||||||
[this, decoratedClient]() {
|
[this, decoratedClient]() {
|
||||||
emit decoratedClient->adjacentScreenEdgesChanged(adjacentScreenEdges());
|
Q_EMIT decoratedClient->adjacentScreenEdgesChanged(adjacentScreenEdges());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(client, &AbstractClient::closeableChanged, decoratedClient, &KDecoration2::DecoratedClient::closeableChanged);
|
connect(client, &AbstractClient::closeableChanged, decoratedClient, &KDecoration2::DecoratedClient::closeableChanged);
|
||||||
|
@ -107,7 +107,7 @@ DecoratedClientImpl::~DecoratedClientImpl()
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecoratedClientImpl::signalShadeChange() {
|
void DecoratedClientImpl::signalShadeChange() {
|
||||||
emit decoratedClient()->shadedChanged(m_client->isShade());
|
Q_EMIT decoratedClient()->shadedChanged(m_client->isShade());
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DELEGATE(type, name, clientName) \
|
#define DELEGATE(type, name, clientName) \
|
||||||
|
|
|
@ -40,7 +40,7 @@ SettingsImpl::SettingsImpl(KDecoration2::DecorationSettings *parent)
|
||||||
if (previous != 1 && current != 1) {
|
if (previous != 1 && current != 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit parent->onAllDesktopsAvailableChanged(current > 1);
|
Q_EMIT parent->onAllDesktopsAvailableChanged(current > 1);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// prevent changes in Decoration due to Compositor being destroyed
|
// prevent changes in Decoration due to Compositor being destroyed
|
||||||
|
@ -151,7 +151,7 @@ void SettingsImpl::readSettings()
|
||||||
}));
|
}));
|
||||||
if (left != m_leftButtons) {
|
if (left != m_leftButtons) {
|
||||||
m_leftButtons = left;
|
m_leftButtons = left;
|
||||||
emit decorationSettings()->decorationButtonsLeftChanged(m_leftButtons);
|
Q_EMIT decorationSettings()->decorationButtonsLeftChanged(m_leftButtons);
|
||||||
}
|
}
|
||||||
const auto &right = readDecorationButtons(config, "ButtonsOnRight", QVector<KDecoration2::DecorationButtonType >({
|
const auto &right = readDecorationButtons(config, "ButtonsOnRight", QVector<KDecoration2::DecorationButtonType >({
|
||||||
KDecoration2::DecorationButtonType::ContextHelp,
|
KDecoration2::DecorationButtonType::ContextHelp,
|
||||||
|
@ -161,13 +161,13 @@ void SettingsImpl::readSettings()
|
||||||
}));
|
}));
|
||||||
if (right != m_rightButtons) {
|
if (right != m_rightButtons) {
|
||||||
m_rightButtons = right;
|
m_rightButtons = right;
|
||||||
emit decorationSettings()->decorationButtonsRightChanged(m_rightButtons);
|
Q_EMIT decorationSettings()->decorationButtonsRightChanged(m_rightButtons);
|
||||||
}
|
}
|
||||||
ApplicationMenu::self()->setViewEnabled(left.contains(KDecoration2::DecorationButtonType::ApplicationMenu) || right.contains(KDecoration2::DecorationButtonType::ApplicationMenu));
|
ApplicationMenu::self()->setViewEnabled(left.contains(KDecoration2::DecorationButtonType::ApplicationMenu) || right.contains(KDecoration2::DecorationButtonType::ApplicationMenu));
|
||||||
const bool close = config.readEntry("CloseOnDoubleClickOnMenu", false);
|
const bool close = config.readEntry("CloseOnDoubleClickOnMenu", false);
|
||||||
if (close != m_closeDoubleClickMenu) {
|
if (close != m_closeDoubleClickMenu) {
|
||||||
m_closeDoubleClickMenu = close;
|
m_closeDoubleClickMenu = close;
|
||||||
emit decorationSettings()->closeOnDoubleClickOnMenuChanged(m_closeDoubleClickMenu);
|
Q_EMIT decorationSettings()->closeOnDoubleClickOnMenuChanged(m_closeDoubleClickMenu);
|
||||||
}
|
}
|
||||||
m_autoBorderSize = config.readEntry("BorderSizeAuto", true);
|
m_autoBorderSize = config.readEntry("BorderSizeAuto", true);
|
||||||
|
|
||||||
|
@ -178,15 +178,15 @@ void SettingsImpl::readSettings()
|
||||||
}
|
}
|
||||||
if (size != m_borderSize) {
|
if (size != m_borderSize) {
|
||||||
m_borderSize = size;
|
m_borderSize = size;
|
||||||
emit decorationSettings()->borderSizeChanged(m_borderSize);
|
Q_EMIT decorationSettings()->borderSizeChanged(m_borderSize);
|
||||||
}
|
}
|
||||||
const QFont font = QFontDatabase::systemFont(QFontDatabase::TitleFont);
|
const QFont font = QFontDatabase::systemFont(QFontDatabase::TitleFont);
|
||||||
if (font != m_font) {
|
if (font != m_font) {
|
||||||
m_font = font;
|
m_font = font;
|
||||||
emit decorationSettings()->fontChanged(m_font);
|
Q_EMIT decorationSettings()->fontChanged(m_font);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit decorationSettings()->reconfigured();
|
Q_EMIT decorationSettings()->reconfigured();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ void Deleted::copyToDeleted(Toplevel* c)
|
||||||
m_minimized = client->isMinimized();
|
m_minimized = client->isMinimized();
|
||||||
m_modal = client->isModal();
|
m_modal = client->isModal();
|
||||||
m_mainClients = client->mainClients();
|
m_mainClients = client->mainClients();
|
||||||
foreach (AbstractClient *c, m_mainClients) {
|
Q_FOREACH (AbstractClient *c, m_mainClients) {
|
||||||
connect(c, &AbstractClient::windowClosed, this, &Deleted::mainClientClosed);
|
connect(c, &AbstractClient::windowClosed, this, &Deleted::mainClientClosed);
|
||||||
}
|
}
|
||||||
m_fullscreen = client->isFullScreen();
|
m_fullscreen = client->isFullScreen();
|
||||||
|
|
|
@ -158,7 +158,7 @@ bool BuiltInEffectLoader::loadEffect(const QString &name, BuiltInEffect effect,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
qCDebug(KWIN_CORE) << "Successfully loaded built-in effect: " << name;
|
qCDebug(KWIN_CORE) << "Successfully loaded built-in effect: " << name;
|
||||||
emit effectLoaded(e, name);
|
Q_EMIT effectLoaded(e, name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ bool ScriptedEffectLoader::loadEffect(const KPluginMetaData &effect, LoadEffectF
|
||||||
);
|
);
|
||||||
|
|
||||||
qCDebug(KWIN_CORE) << "Successfully loaded scripted effect: " << name;
|
qCDebug(KWIN_CORE) << "Successfully loaded scripted effect: " << name;
|
||||||
emit effectLoaded(e, name);
|
Q_EMIT effectLoaded(e, name);
|
||||||
m_loadedEffects << name;
|
m_loadedEffects << name;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -428,7 +428,7 @@ bool PluginEffectLoader::loadEffect(const KPluginMetaData &info, LoadEffectFlags
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
qCDebug(KWIN_CORE) << "Successfully loaded plugin effect: " << name;
|
qCDebug(KWIN_CORE) << "Successfully loaded plugin effect: " << name;
|
||||||
emit effectLoaded(e, name);
|
Q_EMIT effectLoaded(e, name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,9 +144,9 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
||||||
[this](int old, AbstractClient *c) {
|
[this](int old, AbstractClient *c) {
|
||||||
const int newDesktop = VirtualDesktopManager::self()->current();
|
const int newDesktop = VirtualDesktopManager::self()->current();
|
||||||
if (old != 0 && newDesktop != old) {
|
if (old != 0 && newDesktop != old) {
|
||||||
emit desktopChanged(old, newDesktop, c ? c->effectWindow() : nullptr);
|
Q_EMIT desktopChanged(old, newDesktop, c ? c->effectWindow() : nullptr);
|
||||||
// TODO: remove in 4.10
|
// TODO: remove in 4.10
|
||||||
emit desktopChanged(old, newDesktop);
|
Q_EMIT desktopChanged(old, newDesktop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -155,7 +155,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
||||||
if (!c->effectWindow()) {
|
if (!c->effectWindow()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit desktopPresenceChanged(c->effectWindow(), old, c->desktop());
|
Q_EMIT desktopPresenceChanged(c->effectWindow(), old, c->desktop());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(ws, &Workspace::clientAdded, this,
|
connect(ws, &Workspace::clientAdded, this,
|
||||||
|
@ -175,17 +175,17 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
||||||
connect(ws, &Workspace::internalClientAdded, this,
|
connect(ws, &Workspace::internalClientAdded, this,
|
||||||
[this](InternalClient *client) {
|
[this](InternalClient *client) {
|
||||||
setupClientConnections(client);
|
setupClientConnections(client);
|
||||||
emit windowAdded(client->effectWindow());
|
Q_EMIT windowAdded(client->effectWindow());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(ws, &Workspace::clientActivated, this,
|
connect(ws, &Workspace::clientActivated, this,
|
||||||
[this](KWin::AbstractClient *c) {
|
[this](KWin::AbstractClient *c) {
|
||||||
emit windowActivated(c ? c->effectWindow() : nullptr);
|
Q_EMIT windowActivated(c ? c->effectWindow() : nullptr);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(ws, &Workspace::deletedRemoved, this,
|
connect(ws, &Workspace::deletedRemoved, this,
|
||||||
[this](KWin::Deleted *d) {
|
[this](KWin::Deleted *d) {
|
||||||
emit windowDeleted(d->effectWindow());
|
Q_EMIT windowDeleted(d->effectWindow());
|
||||||
elevated_windows.removeAll(d->effectWindow());
|
elevated_windows.removeAll(d->effectWindow());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -232,7 +232,7 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
||||||
} else {
|
} else {
|
||||||
m_x11WindowPropertyNotify.reset();
|
m_x11WindowPropertyNotify.reset();
|
||||||
}
|
}
|
||||||
emit xcbConnectionChanged();
|
Q_EMIT xcbConnectionChanged();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -290,17 +290,17 @@ void EffectsHandlerImpl::setupClientConnections(AbstractClient* c)
|
||||||
this, &EffectsHandlerImpl::slotClientMaximized);
|
this, &EffectsHandlerImpl::slotClientMaximized);
|
||||||
connect(c, &AbstractClient::clientStartUserMovedResized, this,
|
connect(c, &AbstractClient::clientStartUserMovedResized, this,
|
||||||
[this](AbstractClient *c) {
|
[this](AbstractClient *c) {
|
||||||
emit windowStartUserMovedResized(c->effectWindow());
|
Q_EMIT windowStartUserMovedResized(c->effectWindow());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(c, &AbstractClient::clientStepUserMovedResized, this,
|
connect(c, &AbstractClient::clientStepUserMovedResized, this,
|
||||||
[this](AbstractClient *c, const QRect &geometry) {
|
[this](AbstractClient *c, const QRect &geometry) {
|
||||||
emit windowStepUserMovedResized(c->effectWindow(), geometry);
|
Q_EMIT windowStepUserMovedResized(c->effectWindow(), geometry);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(c, &AbstractClient::clientFinishUserMovedResized, this,
|
connect(c, &AbstractClient::clientFinishUserMovedResized, this,
|
||||||
[this](AbstractClient *c) {
|
[this](AbstractClient *c) {
|
||||||
emit windowFinishUserMovedResized(c->effectWindow());
|
Q_EMIT windowFinishUserMovedResized(c->effectWindow());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(c, &AbstractClient::opacityChanged, this, &EffectsHandlerImpl::slotOpacityChanged);
|
connect(c, &AbstractClient::opacityChanged, this, &EffectsHandlerImpl::slotOpacityChanged);
|
||||||
|
@ -308,7 +308,7 @@ void EffectsHandlerImpl::setupClientConnections(AbstractClient* c)
|
||||||
[this](AbstractClient *c, bool animate) {
|
[this](AbstractClient *c, bool animate) {
|
||||||
// TODO: notify effects even if it should not animate?
|
// TODO: notify effects even if it should not animate?
|
||||||
if (animate) {
|
if (animate) {
|
||||||
emit windowMinimized(c->effectWindow());
|
Q_EMIT windowMinimized(c->effectWindow());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -316,7 +316,7 @@ void EffectsHandlerImpl::setupClientConnections(AbstractClient* c)
|
||||||
[this](AbstractClient* c, bool animate) {
|
[this](AbstractClient* c, bool animate) {
|
||||||
// TODO: notify effects even if it should not animate?
|
// TODO: notify effects even if it should not animate?
|
||||||
if (animate) {
|
if (animate) {
|
||||||
emit windowUnminimized(c->effectWindow());
|
Q_EMIT windowUnminimized(c->effectWindow());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -326,38 +326,38 @@ void EffectsHandlerImpl::setupClientConnections(AbstractClient* c)
|
||||||
connect(c, &AbstractClient::damaged, this, &EffectsHandlerImpl::slotWindowDamaged);
|
connect(c, &AbstractClient::damaged, this, &EffectsHandlerImpl::slotWindowDamaged);
|
||||||
connect(c, &AbstractClient::unresponsiveChanged, this,
|
connect(c, &AbstractClient::unresponsiveChanged, this,
|
||||||
[this, c](bool unresponsive) {
|
[this, c](bool unresponsive) {
|
||||||
emit windowUnresponsiveChanged(c->effectWindow(), unresponsive);
|
Q_EMIT windowUnresponsiveChanged(c->effectWindow(), unresponsive);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(c, &AbstractClient::windowShown, this,
|
connect(c, &AbstractClient::windowShown, this,
|
||||||
[this](Toplevel *c) {
|
[this](Toplevel *c) {
|
||||||
emit windowShown(c->effectWindow());
|
Q_EMIT windowShown(c->effectWindow());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(c, &AbstractClient::windowHidden, this,
|
connect(c, &AbstractClient::windowHidden, this,
|
||||||
[this](Toplevel *c) {
|
[this](Toplevel *c) {
|
||||||
emit windowHidden(c->effectWindow());
|
Q_EMIT windowHidden(c->effectWindow());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(c, &AbstractClient::keepAboveChanged, this,
|
connect(c, &AbstractClient::keepAboveChanged, this,
|
||||||
[this, c](bool above) {
|
[this, c](bool above) {
|
||||||
Q_UNUSED(above)
|
Q_UNUSED(above)
|
||||||
emit windowKeepAboveChanged(c->effectWindow());
|
Q_EMIT windowKeepAboveChanged(c->effectWindow());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(c, &AbstractClient::keepBelowChanged, this,
|
connect(c, &AbstractClient::keepBelowChanged, this,
|
||||||
[this, c](bool below) {
|
[this, c](bool below) {
|
||||||
Q_UNUSED(below)
|
Q_UNUSED(below)
|
||||||
emit windowKeepBelowChanged(c->effectWindow());
|
Q_EMIT windowKeepBelowChanged(c->effectWindow());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(c, &AbstractClient::fullScreenChanged, this,
|
connect(c, &AbstractClient::fullScreenChanged, this,
|
||||||
[this, c]() {
|
[this, c]() {
|
||||||
emit windowFullScreenChanged(c->effectWindow());
|
Q_EMIT windowFullScreenChanged(c->effectWindow());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(c, &AbstractClient::visibleGeometryChanged, this, [this, c]() {
|
connect(c, &AbstractClient::visibleGeometryChanged, this, [this, c]() {
|
||||||
emit windowExpandedGeometryChanged(c->effectWindow());
|
Q_EMIT windowExpandedGeometryChanged(c->effectWindow());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,7 +369,7 @@ void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged* u)
|
||||||
connect(u, &Unmanaged::frameGeometryChanged, this, &EffectsHandlerImpl::slotFrameGeometryChanged);
|
connect(u, &Unmanaged::frameGeometryChanged, this, &EffectsHandlerImpl::slotFrameGeometryChanged);
|
||||||
connect(u, &Unmanaged::damaged, this, &EffectsHandlerImpl::slotWindowDamaged);
|
connect(u, &Unmanaged::damaged, this, &EffectsHandlerImpl::slotWindowDamaged);
|
||||||
connect(u, &Unmanaged::visibleGeometryChanged, this, [this, u]() {
|
connect(u, &Unmanaged::visibleGeometryChanged, this, [this, u]() {
|
||||||
emit windowExpandedGeometryChanged(u->effectWindow());
|
Q_EMIT windowExpandedGeometryChanged(u->effectWindow());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -544,7 +544,7 @@ void EffectsHandlerImpl::slotClientMaximized(KWin::AbstractClient *c, MaximizeMo
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (EffectWindowImpl *w = c->effectWindow()) {
|
if (EffectWindowImpl *w = c->effectWindow()) {
|
||||||
emit windowMaximizedStateChanged(w, horizontal, vertical);
|
Q_EMIT windowMaximizedStateChanged(w, horizontal, vertical);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,7 +553,7 @@ void EffectsHandlerImpl::slotOpacityChanged(Toplevel *t, qreal oldOpacity)
|
||||||
if (t->opacity() == oldOpacity || !t->effectWindow()) {
|
if (t->opacity() == oldOpacity || !t->effectWindow()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit windowOpacityChanged(t->effectWindow(), oldOpacity, (qreal)t->opacity());
|
Q_EMIT windowOpacityChanged(t->effectWindow(), oldOpacity, (qreal)t->opacity());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t)
|
void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t)
|
||||||
|
@ -562,7 +562,7 @@ void EffectsHandlerImpl::slotClientShown(KWin::Toplevel *t)
|
||||||
AbstractClient *c = static_cast<AbstractClient *>(t);
|
AbstractClient *c = static_cast<AbstractClient *>(t);
|
||||||
disconnect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotClientShown);
|
disconnect(c, &Toplevel::windowShown, this, &EffectsHandlerImpl::slotClientShown);
|
||||||
setupClientConnections(c);
|
setupClientConnections(c);
|
||||||
emit windowAdded(c->effectWindow());
|
Q_EMIT windowAdded(c->effectWindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotUnmanagedShown(KWin::Toplevel *t)
|
void EffectsHandlerImpl::slotUnmanagedShown(KWin::Toplevel *t)
|
||||||
|
@ -570,35 +570,35 @@ void EffectsHandlerImpl::slotUnmanagedShown(KWin::Toplevel *t)
|
||||||
Q_ASSERT(qobject_cast<Unmanaged *>(t));
|
Q_ASSERT(qobject_cast<Unmanaged *>(t));
|
||||||
Unmanaged *u = static_cast<Unmanaged*>(t);
|
Unmanaged *u = static_cast<Unmanaged*>(t);
|
||||||
setupUnmanagedConnections(u);
|
setupUnmanagedConnections(u);
|
||||||
emit windowAdded(u->effectWindow());
|
Q_EMIT windowAdded(u->effectWindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotWindowClosed(KWin::Toplevel *c, KWin::Deleted *d)
|
void EffectsHandlerImpl::slotWindowClosed(KWin::Toplevel *c, KWin::Deleted *d)
|
||||||
{
|
{
|
||||||
c->disconnect(this);
|
c->disconnect(this);
|
||||||
if (d) {
|
if (d) {
|
||||||
emit windowClosed(c->effectWindow());
|
Q_EMIT windowClosed(c->effectWindow());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotClientModalityChanged()
|
void EffectsHandlerImpl::slotClientModalityChanged()
|
||||||
{
|
{
|
||||||
emit windowModalityChanged(static_cast<X11Client *>(sender())->effectWindow());
|
Q_EMIT windowModalityChanged(static_cast<X11Client *>(sender())->effectWindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotCurrentTabAboutToChange(EffectWindow *from, EffectWindow *to)
|
void EffectsHandlerImpl::slotCurrentTabAboutToChange(EffectWindow *from, EffectWindow *to)
|
||||||
{
|
{
|
||||||
emit currentTabAboutToChange(from, to);
|
Q_EMIT currentTabAboutToChange(from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotTabAdded(EffectWindow* w, EffectWindow* to)
|
void EffectsHandlerImpl::slotTabAdded(EffectWindow* w, EffectWindow* to)
|
||||||
{
|
{
|
||||||
emit tabAdded(w, to);
|
Q_EMIT tabAdded(w, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotTabRemoved(EffectWindow *w, EffectWindow* leaderOfFormerGroup)
|
void EffectsHandlerImpl::slotTabRemoved(EffectWindow *w, EffectWindow* leaderOfFormerGroup)
|
||||||
{
|
{
|
||||||
emit tabRemoved(w, leaderOfFormerGroup);
|
Q_EMIT tabRemoved(w, leaderOfFormerGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotWindowDamaged(Toplevel* t, const QRegion& r)
|
void EffectsHandlerImpl::slotWindowDamaged(Toplevel* t, const QRegion& r)
|
||||||
|
@ -607,7 +607,7 @@ void EffectsHandlerImpl::slotWindowDamaged(Toplevel* t, const QRegion& r)
|
||||||
// can happen during tear down of window
|
// can happen during tear down of window
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit windowDamaged(t->effectWindow(), r);
|
Q_EMIT windowDamaged(t->effectWindow(), r);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotGeometryShapeChanged(Toplevel* t, const QRect& old)
|
void EffectsHandlerImpl::slotGeometryShapeChanged(Toplevel* t, const QRect& old)
|
||||||
|
@ -616,14 +616,14 @@ void EffectsHandlerImpl::slotGeometryShapeChanged(Toplevel* t, const QRect& old)
|
||||||
// in some functions that may still call this
|
// in some functions that may still call this
|
||||||
if (t == nullptr || t->effectWindow() == nullptr)
|
if (t == nullptr || t->effectWindow() == nullptr)
|
||||||
return;
|
return;
|
||||||
emit windowGeometryShapeChanged(t->effectWindow(), old);
|
Q_EMIT windowGeometryShapeChanged(t->effectWindow(), old);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotFrameGeometryChanged(Toplevel *toplevel, const QRect &oldGeometry)
|
void EffectsHandlerImpl::slotFrameGeometryChanged(Toplevel *toplevel, const QRect &oldGeometry)
|
||||||
{
|
{
|
||||||
// effectWindow() might be nullptr during tear down of the client.
|
// effectWindow() might be nullptr during tear down of the client.
|
||||||
if (toplevel->effectWindow()) {
|
if (toplevel->effectWindow()) {
|
||||||
emit windowFrameGeometryChanged(toplevel->effectWindow(), oldGeometry);
|
Q_EMIT windowFrameGeometryChanged(toplevel->effectWindow(), oldGeometry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -634,9 +634,9 @@ void EffectsHandlerImpl::setActiveFullScreenEffect(Effect* e)
|
||||||
}
|
}
|
||||||
const bool activeChanged = (e == nullptr || fullscreen_effect == nullptr);
|
const bool activeChanged = (e == nullptr || fullscreen_effect == nullptr);
|
||||||
fullscreen_effect = e;
|
fullscreen_effect = e;
|
||||||
emit activeFullScreenEffectChanged();
|
Q_EMIT activeFullScreenEffectChanged();
|
||||||
if (activeChanged) {
|
if (activeChanged) {
|
||||||
emit hasActiveFullScreenEffectChanged();
|
Q_EMIT hasActiveFullScreenEffectChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -804,7 +804,7 @@ bool EffectsHandlerImpl::hasKeyboardGrab() const
|
||||||
void EffectsHandlerImpl::desktopResized(const QSize &size)
|
void EffectsHandlerImpl::desktopResized(const QSize &size)
|
||||||
{
|
{
|
||||||
m_scene->screenGeometryChanged(size);
|
m_scene->screenGeometryChanged(size);
|
||||||
emit screenGeometryChanged(size);
|
Q_EMIT screenGeometryChanged(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::registerPropertyType(long atom, bool reg)
|
void EffectsHandlerImpl::registerPropertyType(long atom, bool reg)
|
||||||
|
@ -1268,7 +1268,7 @@ bool EffectsHandlerImpl::checkInputWindowEvent(QMouseEvent *e)
|
||||||
if (m_grabbedMouseEffects.isEmpty()) {
|
if (m_grabbedMouseEffects.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
foreach (Effect *effect, m_grabbedMouseEffects) {
|
Q_FOREACH (Effect *effect, m_grabbedMouseEffects) {
|
||||||
effect->windowInputMouseEvent(e);
|
effect->windowInputMouseEvent(e);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -1279,7 +1279,7 @@ bool EffectsHandlerImpl::checkInputWindowEvent(QWheelEvent *e)
|
||||||
if (m_grabbedMouseEffects.isEmpty()) {
|
if (m_grabbedMouseEffects.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
foreach (Effect *effect, m_grabbedMouseEffects) {
|
Q_FOREACH (Effect *effect, m_grabbedMouseEffects) {
|
||||||
effect->windowInputMouseEvent(e);
|
effect->windowInputMouseEvent(e);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -1733,7 +1733,7 @@ void EffectsHandlerImpl::slotOutputEnabled(AbstractOutput *output)
|
||||||
{
|
{
|
||||||
EffectScreen *screen = new EffectScreenImpl(output, this);
|
EffectScreen *screen = new EffectScreenImpl(output, this);
|
||||||
m_effectScreens.append(screen);
|
m_effectScreens.append(screen);
|
||||||
emit screenAdded(screen);
|
Q_EMIT screenAdded(screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::slotOutputDisabled(AbstractOutput *output)
|
void EffectsHandlerImpl::slotOutputDisabled(AbstractOutput *output)
|
||||||
|
@ -1744,7 +1744,7 @@ void EffectsHandlerImpl::slotOutputDisabled(AbstractOutput *output)
|
||||||
if (it != m_effectScreens.end()) {
|
if (it != m_effectScreens.end()) {
|
||||||
EffectScreen *screen = *it;
|
EffectScreen *screen = *it;
|
||||||
m_effectScreens.erase(it);
|
m_effectScreens.erase(it);
|
||||||
emit screenRemoved(screen);
|
Q_EMIT screenRemoved(screen);
|
||||||
delete screen;
|
delete screen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2122,7 +2122,7 @@ void EffectWindowImpl::setData(int role, const QVariant &data)
|
||||||
dataMap[ role ] = data;
|
dataMap[ role ] = data;
|
||||||
else
|
else
|
||||||
dataMap.remove(role);
|
dataMap.remove(role);
|
||||||
emit effects->windowDataChanged(this, role);
|
Q_EMIT effects->windowDataChanged(this, role);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant EffectWindowImpl::data(int role) const
|
QVariant EffectWindowImpl::data(int role) const
|
||||||
|
|
|
@ -62,7 +62,7 @@ BlurEffect::BlurEffect()
|
||||||
);
|
);
|
||||||
|
|
||||||
// Fetch the blur regions for all windows
|
// Fetch the blur regions for all windows
|
||||||
foreach (EffectWindow *window, effects->stackingOrder())
|
Q_FOREACH (EffectWindow *window, effects->stackingOrder())
|
||||||
updateBlurRegion(window);
|
updateBlurRegion(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ void BlurEffect::slotScreenGeometryChanged()
|
||||||
updateTexture();
|
updateTexture();
|
||||||
|
|
||||||
// Fetch the blur regions for all windows
|
// Fetch the blur regions for all windows
|
||||||
foreach (EffectWindow *window, effects->stackingOrder())
|
Q_FOREACH (EffectWindow *window, effects->stackingOrder())
|
||||||
updateBlurRegion(window);
|
updateBlurRegion(window);
|
||||||
effects->doneOpenGLContextCurrent();
|
effects->doneOpenGLContextCurrent();
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ void CoverSwitchEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaint
|
||||||
if (index >= tempList.count())
|
if (index >= tempList.count())
|
||||||
index = index % tempList.count();
|
index = index % tempList.count();
|
||||||
}
|
}
|
||||||
foreach (Direction direction, scheduled_directions) {
|
Q_FOREACH (Direction direction, scheduled_directions) {
|
||||||
if (direction == Right)
|
if (direction == Right)
|
||||||
index++;
|
index++;
|
||||||
else
|
else
|
||||||
|
@ -287,7 +287,7 @@ void CoverSwitchEffect::postPaintScreen()
|
||||||
if (stop) {
|
if (stop) {
|
||||||
stop = false;
|
stop = false;
|
||||||
effects->setActiveFullScreenEffect(nullptr);
|
effects->setActiveFullScreenEffect(nullptr);
|
||||||
foreach (EffectWindow * window, referrencedWindows) {
|
Q_FOREACH (EffectWindow * window, referrencedWindows) {
|
||||||
window->unrefWindow();
|
window->unrefWindow();
|
||||||
}
|
}
|
||||||
referrencedWindows.clear();
|
referrencedWindows.clear();
|
||||||
|
|
|
@ -111,13 +111,13 @@ bool CubeEffect::supported()
|
||||||
void CubeEffect::reconfigure(ReconfigureFlags)
|
void CubeEffect::reconfigure(ReconfigureFlags)
|
||||||
{
|
{
|
||||||
CubeConfig::self()->read();
|
CubeConfig::self()->read();
|
||||||
foreach (ElectricBorder border, borderActivate) {
|
Q_FOREACH (ElectricBorder border, borderActivate) {
|
||||||
effects->unreserveElectricBorder(border, this);
|
effects->unreserveElectricBorder(border, this);
|
||||||
}
|
}
|
||||||
foreach (ElectricBorder border, borderActivateCylinder) {
|
Q_FOREACH (ElectricBorder border, borderActivateCylinder) {
|
||||||
effects->unreserveElectricBorder(border, this);
|
effects->unreserveElectricBorder(border, this);
|
||||||
}
|
}
|
||||||
foreach (ElectricBorder border, borderActivateSphere) {
|
Q_FOREACH (ElectricBorder border, borderActivateSphere) {
|
||||||
effects->unreserveElectricBorder(border, this);
|
effects->unreserveElectricBorder(border, this);
|
||||||
}
|
}
|
||||||
borderActivate.clear();
|
borderActivate.clear();
|
||||||
|
@ -126,21 +126,21 @@ void CubeEffect::reconfigure(ReconfigureFlags)
|
||||||
QList<int> borderList = QList<int>();
|
QList<int> borderList = QList<int>();
|
||||||
borderList.append(int(ElectricNone));
|
borderList.append(int(ElectricNone));
|
||||||
borderList = CubeConfig::borderActivate();
|
borderList = CubeConfig::borderActivate();
|
||||||
foreach (int i, borderList) {
|
Q_FOREACH (int i, borderList) {
|
||||||
borderActivate.append(ElectricBorder(i));
|
borderActivate.append(ElectricBorder(i));
|
||||||
effects->reserveElectricBorder(ElectricBorder(i), this);
|
effects->reserveElectricBorder(ElectricBorder(i), this);
|
||||||
}
|
}
|
||||||
borderList.clear();
|
borderList.clear();
|
||||||
borderList.append(int(ElectricNone));
|
borderList.append(int(ElectricNone));
|
||||||
borderList = CubeConfig::borderActivateCylinder();
|
borderList = CubeConfig::borderActivateCylinder();
|
||||||
foreach (int i, borderList) {
|
Q_FOREACH (int i, borderList) {
|
||||||
borderActivateCylinder.append(ElectricBorder(i));
|
borderActivateCylinder.append(ElectricBorder(i));
|
||||||
effects->reserveElectricBorder(ElectricBorder(i), this);
|
effects->reserveElectricBorder(ElectricBorder(i), this);
|
||||||
}
|
}
|
||||||
borderList.clear();
|
borderList.clear();
|
||||||
borderList.append(int(ElectricNone));
|
borderList.append(int(ElectricNone));
|
||||||
borderList = CubeConfig::borderActivateSphere();
|
borderList = CubeConfig::borderActivateSphere();
|
||||||
foreach (int i, borderList) {
|
Q_FOREACH (int i, borderList) {
|
||||||
borderActivateSphere.append(ElectricBorder(i));
|
borderActivateSphere.append(ElectricBorder(i));
|
||||||
effects->reserveElectricBorder(ElectricBorder(i), this);
|
effects->reserveElectricBorder(ElectricBorder(i), this);
|
||||||
}
|
}
|
||||||
|
@ -1129,7 +1129,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
|
||||||
if (w->isOnDesktop(prev_desktop) && (mask & PAINT_WINDOW_TRANSFORMED)) {
|
if (w->isOnDesktop(prev_desktop) && (mask & PAINT_WINDOW_TRANSFORMED)) {
|
||||||
QRect rect = effects->clientArea(FullArea, activeScreen, prev_desktop);
|
QRect rect = effects->clientArea(FullArea, activeScreen, prev_desktop);
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.right() > rect.width() - w->x()) {
|
if (quad.right() > rect.width() - w->x()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -1140,7 +1140,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
|
||||||
if (w->isOnDesktop(next_desktop) && (mask & PAINT_WINDOW_TRANSFORMED)) {
|
if (w->isOnDesktop(next_desktop) && (mask & PAINT_WINDOW_TRANSFORMED)) {
|
||||||
QRect rect = effects->clientArea(FullArea, activeScreen, next_desktop);
|
QRect rect = effects->clientArea(FullArea, activeScreen, next_desktop);
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (w->x() + quad.right() <= rect.x()) {
|
if (w->x() + quad.right() <= rect.x()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -1177,7 +1177,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
|
||||||
|
|
||||||
if (w->isOnDesktop(painting_desktop) && w->x() < rect.x()) {
|
if (w->isOnDesktop(painting_desktop) && w->x() < rect.x()) {
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.right() > -w->x()) {
|
if (quad.right() > -w->x()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -1186,7 +1186,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
|
||||||
}
|
}
|
||||||
if (w->isOnDesktop(painting_desktop) && w->x() + w->width() > rect.x() + rect.width()) {
|
if (w->isOnDesktop(painting_desktop) && w->x() + w->width() > rect.x() + rect.width()) {
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.right() <= rect.width() - w->x()) {
|
if (quad.right() <= rect.width() - w->x()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -1195,7 +1195,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
|
||||||
}
|
}
|
||||||
if (w->y() < rect.y()) {
|
if (w->y() < rect.y()) {
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.bottom() > -w->y()) {
|
if (quad.bottom() > -w->y()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -1204,7 +1204,7 @@ void CubeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPa
|
||||||
}
|
}
|
||||||
if (w->y() + w->height() > rect.y() + rect.height()) {
|
if (w->y() + w->height() > rect.y() + rect.height()) {
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.bottom() <= rect.height() - w->y()) {
|
if (quad.bottom() <= rect.height() - w->y()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -1537,7 +1537,7 @@ void CubeEffect::rotateToDesktop(int desktop)
|
||||||
|
|
||||||
void CubeEffect::setActive(bool active)
|
void CubeEffect::setActive(bool active)
|
||||||
{
|
{
|
||||||
foreach (CubeInsideEffect * inside, m_cubeInsideEffects) {
|
Q_FOREACH (CubeInsideEffect * inside, m_cubeInsideEffects) {
|
||||||
inside->setActive(true);
|
inside->setActive(true);
|
||||||
}
|
}
|
||||||
if (active) {
|
if (active) {
|
||||||
|
|
|
@ -248,7 +248,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
|
||||||
if (w->isOnDesktop(painting_desktop)) {
|
if (w->isOnDesktop(painting_desktop)) {
|
||||||
if (w->x() < rect.x()) {
|
if (w->x() < rect.x()) {
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.right() > -w->x()) {
|
if (quad.right() > -w->x()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
|
||||||
}
|
}
|
||||||
if (w->x() + w->width() > rect.x() + rect.width()) {
|
if (w->x() + w->width() > rect.x() + rect.width()) {
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.right() <= rect.width() - w->x()) {
|
if (quad.right() <= rect.width() - w->x()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
|
||||||
}
|
}
|
||||||
if (w->y() < rect.y()) {
|
if (w->y() < rect.y()) {
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.bottom() > -w->y()) {
|
if (quad.bottom() > -w->y()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
|
||||||
}
|
}
|
||||||
if (w->y() + w->height() > rect.y() + rect.height()) {
|
if (w->y() + w->height() > rect.y() + rect.height()) {
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.bottom() <= rect.height() - w->y()) {
|
if (quad.bottom() <= rect.height() - w->y()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
|
||||||
(direction == Left || direction == Right)) {
|
(direction == Left || direction == Right)) {
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
data.setXTranslation(rect.width());
|
data.setXTranslation(rect.width());
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.right() <= -w->x()) {
|
if (quad.right() <= -w->x()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
|
||||||
(direction == Left || direction == Right)) {
|
(direction == Left || direction == Right)) {
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
data.setXTranslation(-rect.width());
|
data.setXTranslation(-rect.width());
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.right() > rect.width() - w->x()) {
|
if (quad.right() > rect.width() - w->x()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
|
||||||
(direction == Upwards || direction == Downwards)) {
|
(direction == Upwards || direction == Downwards)) {
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
data.setYTranslation(rect.height());
|
data.setYTranslation(rect.height());
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.bottom() <= -w->y()) {
|
if (quad.bottom() <= -w->y()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
@ -323,7 +323,7 @@ void CubeSlideEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Win
|
||||||
(direction == Upwards || direction == Downwards)) {
|
(direction == Upwards || direction == Downwards)) {
|
||||||
WindowQuadList new_quads;
|
WindowQuadList new_quads;
|
||||||
data.setYTranslation(-rect.height());
|
data.setYTranslation(-rect.height());
|
||||||
foreach (const WindowQuad & quad, data.quads) {
|
Q_FOREACH (const WindowQuad & quad, data.quads) {
|
||||||
if (quad.bottom() > rect.height() - w->y()) {
|
if (quad.bottom() > rect.height() - w->y()) {
|
||||||
new_quads.append(quad);
|
new_quads.append(quad);
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,11 +107,11 @@ void DesktopGridEffect::reconfigure(ReconfigureFlags)
|
||||||
{
|
{
|
||||||
DesktopGridConfig::self()->read();
|
DesktopGridConfig::self()->read();
|
||||||
|
|
||||||
foreach (ElectricBorder border, borderActivate) {
|
Q_FOREACH (ElectricBorder border, borderActivate) {
|
||||||
effects->unreserveElectricBorder(border, this);
|
effects->unreserveElectricBorder(border, this);
|
||||||
}
|
}
|
||||||
borderActivate.clear();
|
borderActivate.clear();
|
||||||
foreach (int i, DesktopGridConfig::borderActivate()) {
|
Q_FOREACH (int i, DesktopGridConfig::borderActivate()) {
|
||||||
borderActivate.append(ElectricBorder(i));
|
borderActivate.append(ElectricBorder(i));
|
||||||
effects->reserveElectricBorder(ElectricBorder(i), this);
|
effects->reserveElectricBorder(ElectricBorder(i), this);
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ void DesktopGridEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaint
|
||||||
for (int screen = 0; screen < effects->numScreens(); screen++) {
|
for (int screen = 0; screen < effects->numScreens(); screen++) {
|
||||||
QRect screenGeom = effects->clientArea(ScreenArea, screen, 0);
|
QRect screenGeom = effects->clientArea(ScreenArea, screen, 0);
|
||||||
int desktop = 1;
|
int desktop = 1;
|
||||||
foreach (EffectFrame * frame, desktopNames) {
|
Q_FOREACH (EffectFrame * frame, desktopNames) {
|
||||||
QPointF posTL(scalePos(screenGeom.topLeft(), desktop, screen));
|
QPointF posTL(scalePos(screenGeom.topLeft(), desktop, screen));
|
||||||
QPointF posBR(scalePos(screenGeom.bottomRight(), desktop, screen));
|
QPointF posBR(scalePos(screenGeom.bottomRight(), desktop, screen));
|
||||||
QRect textArea(posTL.x(), posTL.y(), posBR.x() - posTL.x(), posBR.y() - posTL.y());
|
QRect textArea(posTL.x(), posTL.y(), posBR.x() - posTL.x(), posBR.y() - posTL.y());
|
||||||
|
@ -384,7 +384,7 @@ void DesktopGridEffect::slotWindowAdded(EffectWindow* w)
|
||||||
if (isUsingPresentWindows()) {
|
if (isUsingPresentWindows()) {
|
||||||
if (!isRelevantWithPresentWindows(w))
|
if (!isRelevantWithPresentWindows(w))
|
||||||
return; // don't add
|
return; // don't add
|
||||||
foreach (const int i, desktopList(w)) {
|
Q_FOREACH (const int i, desktopList(w)) {
|
||||||
WindowMotionManager& manager = m_managers[ i*effects->numScreens()+w->screen()];
|
WindowMotionManager& manager = m_managers[ i*effects->numScreens()+w->screen()];
|
||||||
manager.manage(w);
|
manager.manage(w);
|
||||||
m_proxy->calculateWindowTransformations(manager.managedWindows(), w->screen(), manager);
|
m_proxy->calculateWindowTransformations(manager.managedWindows(), w->screen(), manager);
|
||||||
|
@ -402,7 +402,7 @@ void DesktopGridEffect::slotWindowClosed(EffectWindow* w)
|
||||||
windowMove = nullptr;
|
windowMove = nullptr;
|
||||||
}
|
}
|
||||||
if (isUsingPresentWindows()) {
|
if (isUsingPresentWindows()) {
|
||||||
foreach (const int i, desktopList(w)) {
|
Q_FOREACH (const int i, desktopList(w)) {
|
||||||
WindowMotionManager& manager = m_managers[i*effects->numScreens()+w->screen()];
|
WindowMotionManager& manager = m_managers[i*effects->numScreens()+w->screen()];
|
||||||
manager.unmanage(w);
|
manager.unmanage(w);
|
||||||
m_proxy->calculateWindowTransformations(manager.managedWindows(), w->screen(), manager);
|
m_proxy->calculateWindowTransformations(manager.managedWindows(), w->screen(), manager);
|
||||||
|
@ -431,7 +431,7 @@ void DesktopGridEffect::slotWindowFrameGeometryChanged(EffectWindow* w, const QR
|
||||||
if (w == windowMove && wasWindowMove)
|
if (w == windowMove && wasWindowMove)
|
||||||
return;
|
return;
|
||||||
if (isUsingPresentWindows()) {
|
if (isUsingPresentWindows()) {
|
||||||
foreach (const int i, desktopList(w)) {
|
Q_FOREACH (const int i, desktopList(w)) {
|
||||||
WindowMotionManager& manager = m_managers[i*effects->numScreens()+w->screen()];
|
WindowMotionManager& manager = m_managers[i*effects->numScreens()+w->screen()];
|
||||||
m_proxy->calculateWindowTransformations(manager.managedWindows(), w->screen(), manager);
|
m_proxy->calculateWindowTransformations(manager.managedWindows(), w->screen(), manager);
|
||||||
}
|
}
|
||||||
|
@ -466,7 +466,7 @@ void DesktopGridEffect::windowInputMouseEvent(QEvent* e)
|
||||||
}
|
}
|
||||||
if (!wasWindowMove) { // Activate on move
|
if (!wasWindowMove) { // Activate on move
|
||||||
if (isUsingPresentWindows()) {
|
if (isUsingPresentWindows()) {
|
||||||
foreach (const int i, desktopList(windowMove)) {
|
Q_FOREACH (const int i, desktopList(windowMove)) {
|
||||||
WindowMotionManager& manager = m_managers[(i)*(effects->numScreens()) + windowMove->screen()];
|
WindowMotionManager& manager = m_managers[(i)*(effects->numScreens()) + windowMove->screen()];
|
||||||
if ((i + 1) == sourceDesktop) {
|
if ((i + 1) == sourceDesktop) {
|
||||||
const QRectF transformedGeo = manager.transformedGeometry(windowMove);
|
const QRectF transformedGeo = manager.transformedGeometry(windowMove);
|
||||||
|
@ -539,7 +539,7 @@ void DesktopGridEffect::windowInputMouseEvent(QEvent* e)
|
||||||
for (int i = 0; i < 3; ++i ) {
|
for (int i = 0; i < 3; ++i ) {
|
||||||
if (desks[i] == desks[i+1])
|
if (desks[i] == desks[i+1])
|
||||||
continue;
|
continue;
|
||||||
foreach (EffectWindow *w, stack[i]) {
|
Q_FOREACH (EffectWindow *w, stack[i]) {
|
||||||
auto desktops = w->desktops();
|
auto desktops = w->desktops();
|
||||||
desktops.removeOne(desks[i]);
|
desktops.removeOne(desks[i]);
|
||||||
desktops.append(desks[i+1]);
|
desktops.append(desks[i+1]);
|
||||||
|
@ -636,7 +636,7 @@ void DesktopGridEffect::windowInputMouseEvent(QEvent* e)
|
||||||
if (windowMove) {
|
if (windowMove) {
|
||||||
if (wasWindowMove && isUsingPresentWindows()) {
|
if (wasWindowMove && isUsingPresentWindows()) {
|
||||||
const int targetDesktop = posToDesktop(cursorPos());
|
const int targetDesktop = posToDesktop(cursorPos());
|
||||||
foreach (const int i, desktopList(windowMove)) {
|
Q_FOREACH (const int i, desktopList(windowMove)) {
|
||||||
WindowMotionManager& manager = m_managers[(i)*(effects->numScreens()) + windowMove->screen()];
|
WindowMotionManager& manager = m_managers[(i)*(effects->numScreens()) + windowMove->screen()];
|
||||||
manager.manage(windowMove);
|
manager.manage(windowMove);
|
||||||
if (EffectWindow* modal = windowMove->findModal())
|
if (EffectWindow* modal = windowMove->findModal())
|
||||||
|
@ -861,12 +861,12 @@ EffectWindow* DesktopGridEffect::windowAt(QPoint pos) const
|
||||||
m_managers.at((desktop - 1) * (effects->numScreens()) + screen).windowAtPoint(pos, false);
|
m_managers.at((desktop - 1) * (effects->numScreens()) + screen).windowAtPoint(pos, false);
|
||||||
if (w)
|
if (w)
|
||||||
return w;
|
return w;
|
||||||
foreach (EffectWindow * w, windows) {
|
Q_FOREACH (EffectWindow * w, windows) {
|
||||||
if (w->isOnDesktop(desktop) && w->isDesktop() && w->frameGeometry().contains(pos))
|
if (w->isOnDesktop(desktop) && w->isDesktop() && w->frameGeometry().contains(pos))
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreach (EffectWindow * w, windows) {
|
Q_FOREACH (EffectWindow * w, windows) {
|
||||||
if (w->isOnDesktop(desktop) && w->isOnCurrentActivity() && !w->isMinimized() && w->frameGeometry().contains(pos))
|
if (w->isOnDesktop(desktop) && w->isOnCurrentActivity() && !w->isMinimized() && w->frameGeometry().contains(pos))
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
@ -1026,7 +1026,7 @@ void DesktopGridEffect::setActive(bool active)
|
||||||
if (isUsingPresentWindows()) {
|
if (isUsingPresentWindows()) {
|
||||||
QList<WindowMotionManager>::iterator it;
|
QList<WindowMotionManager>::iterator it;
|
||||||
for (it = m_managers.begin(); it != m_managers.end(); ++it) {
|
for (it = m_managers.begin(); it != m_managers.end(); ++it) {
|
||||||
foreach (EffectWindow * w, (*it).managedWindows()) {
|
Q_FOREACH (EffectWindow * w, (*it).managedWindows()) {
|
||||||
(*it).moveWindow(w, w->frameGeometry());
|
(*it).moveWindow(w, w->frameGeometry());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1090,7 +1090,7 @@ void DesktopGridEffect::setup()
|
||||||
for (int i = 1; i <= effects->numberOfDesktops(); i++) {
|
for (int i = 1; i <= effects->numberOfDesktops(); i++) {
|
||||||
for (int j = 0; j < effects->numScreens(); j++) {
|
for (int j = 0; j < effects->numScreens(); j++) {
|
||||||
WindowMotionManager manager;
|
WindowMotionManager manager;
|
||||||
foreach (EffectWindow * w, effects->stackingOrder()) {
|
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
|
||||||
if (w->isOnDesktop(i) && w->screen() == j &&isRelevantWithPresentWindows(w)) {
|
if (w->isOnDesktop(i) && w->screen() == j &&isRelevantWithPresentWindows(w)) {
|
||||||
manager.manage(w);
|
manager.manage(w);
|
||||||
}
|
}
|
||||||
|
@ -1322,7 +1322,7 @@ void DesktopGridEffect::desktopsAdded(int old)
|
||||||
for (int i = old+1; i <= effects->numberOfDesktops(); ++i) {
|
for (int i = old+1; i <= effects->numberOfDesktops(); ++i) {
|
||||||
for (int j = 0; j < effects->numScreens(); ++j) {
|
for (int j = 0; j < effects->numScreens(); ++j) {
|
||||||
WindowMotionManager manager;
|
WindowMotionManager manager;
|
||||||
foreach (EffectWindow * w, effects->stackingOrder()) {
|
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
|
||||||
if (w->isOnDesktop(i) && w->screen() == j &&isRelevantWithPresentWindows(w)) {
|
if (w->isOnDesktop(i) && w->screen() == j &&isRelevantWithPresentWindows(w)) {
|
||||||
manager.manage(w);
|
manager.manage(w);
|
||||||
}
|
}
|
||||||
|
@ -1360,7 +1360,7 @@ void DesktopGridEffect::desktopsRemoved(int old)
|
||||||
if (isUsingPresentWindows()) {
|
if (isUsingPresentWindows()) {
|
||||||
for (int j = 0; j < effects->numScreens(); ++j) {
|
for (int j = 0; j < effects->numScreens(); ++j) {
|
||||||
WindowMotionManager& manager = m_managers[(desktop-1)*(effects->numScreens())+j ];
|
WindowMotionManager& manager = m_managers[(desktop-1)*(effects->numScreens())+j ];
|
||||||
foreach (EffectWindow * w, effects->stackingOrder()) {
|
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
|
||||||
if (manager.isManaging(w))
|
if (manager.isManaging(w))
|
||||||
continue;
|
continue;
|
||||||
if (w->isOnDesktop(desktop) && w->screen() == j && isRelevantWithPresentWindows(w)) {
|
if (w->isOnDesktop(desktop) && w->screen() == j && isRelevantWithPresentWindows(w)) {
|
||||||
|
|
|
@ -127,7 +127,7 @@ void FlipSwitchEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaintD
|
||||||
// using stacking order directly is not possible
|
// using stacking order directly is not possible
|
||||||
// as not each window in stacking order is shown
|
// as not each window in stacking order is shown
|
||||||
// TODO: store list instead of calculating in each frame?
|
// TODO: store list instead of calculating in each frame?
|
||||||
foreach (EffectWindow * w, effects->stackingOrder()) {
|
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
|
||||||
if (m_windows.contains(w))
|
if (m_windows.contains(w))
|
||||||
tempList.append(w);
|
tempList.append(w);
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ void FlipSwitchEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaintD
|
||||||
|
|
||||||
int tabIndex = index;
|
int tabIndex = index;
|
||||||
if (m_mode == TabboxMode) {
|
if (m_mode == TabboxMode) {
|
||||||
foreach (SwitchingDirection direction, m_scheduledDirections) { // krazy:exclude=foreach
|
Q_FOREACH (SwitchingDirection direction, m_scheduledDirections) { // krazy:exclude=foreach
|
||||||
if (direction == DirectionBackward)
|
if (direction == DirectionBackward)
|
||||||
index++;
|
index++;
|
||||||
else
|
else
|
||||||
|
@ -164,7 +164,7 @@ void FlipSwitchEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaintD
|
||||||
m_flipOrderedWindows.append(w);
|
m_flipOrderedWindows.append(w);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreach (SwitchingDirection direction, m_scheduledDirections) { // krazy:exclude=foreach
|
Q_FOREACH (SwitchingDirection direction, m_scheduledDirections) { // krazy:exclude=foreach
|
||||||
if (direction == DirectionForward)
|
if (direction == DirectionForward)
|
||||||
index++;
|
index++;
|
||||||
else
|
else
|
||||||
|
@ -229,7 +229,7 @@ void FlipSwitchEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaintD
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (EffectWindow *w, m_flipOrderedWindows) {
|
Q_FOREACH (EffectWindow *w, m_flipOrderedWindows) {
|
||||||
ItemInfo *info = m_windows.value(w,0);
|
ItemInfo *info = m_windows.value(w,0);
|
||||||
if (!info)
|
if (!info)
|
||||||
continue;
|
continue;
|
||||||
|
@ -513,7 +513,7 @@ void FlipSwitchEffect::setActive(bool activate, FlipSwitchMode mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
m_mode = mode;
|
m_mode = mode;
|
||||||
foreach (EffectWindow * w, effects->stackingOrder()) {
|
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
|
||||||
if (isSelectableWindow(w) && !m_windows.contains(w))
|
if (isSelectableWindow(w) && !m_windows.contains(w))
|
||||||
m_windows[ w ] = new ItemInfo;
|
m_windows[ w ] = new ItemInfo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ void InvertEffectConfig::load()
|
||||||
{
|
{
|
||||||
KCModule::load();
|
KCModule::load();
|
||||||
|
|
||||||
emit changed(false);
|
Q_EMIT changed(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InvertEffectConfig::save()
|
void InvertEffectConfig::save()
|
||||||
|
@ -76,7 +76,7 @@ void InvertEffectConfig::save()
|
||||||
|
|
||||||
mShortcutEditor->save(); // undo() will restore to this state from now on
|
mShortcutEditor->save(); // undo() will restore to this state from now on
|
||||||
|
|
||||||
emit changed(false);
|
Q_EMIT changed(false);
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"),
|
||||||
QStringLiteral("/Effects"),
|
QStringLiteral("/Effects"),
|
||||||
QDBusConnection::sessionBus());
|
QDBusConnection::sessionBus());
|
||||||
|
@ -87,7 +87,7 @@ void InvertEffectConfig::defaults()
|
||||||
{
|
{
|
||||||
mShortcutEditor->allDefault();
|
mShortcutEditor->allDefault();
|
||||||
|
|
||||||
emit changed(true);
|
Q_EMIT changed(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ void MagicLampEffect::deform(EffectWindow* w, int mask, WindowPaintData& data, W
|
||||||
} else {
|
} else {
|
||||||
// Assumption: there is a panel containing the icon position
|
// Assumption: there is a panel containing the icon position
|
||||||
EffectWindow* panel = nullptr;
|
EffectWindow* panel = nullptr;
|
||||||
foreach (EffectWindow * window, effects->stackingOrder()) {
|
Q_FOREACH (EffectWindow * window, effects->stackingOrder()) {
|
||||||
if (!window->isDock())
|
if (!window->isDock())
|
||||||
continue;
|
continue;
|
||||||
// we have to use intersects as there seems to be a Plasma bug
|
// we have to use intersects as there seems to be a Plasma bug
|
||||||
|
|
|
@ -78,7 +78,7 @@ void MouseClickEffect::prePaintScreen(ScreenPrePaintData& data, std::chrono::mil
|
||||||
{
|
{
|
||||||
const int time = m_lastPresentTime.count() ? (presentTime - m_lastPresentTime).count() : 0;
|
const int time = m_lastPresentTime.count() ? (presentTime - m_lastPresentTime).count() : 0;
|
||||||
|
|
||||||
foreach (MouseEvent* click, m_clicks) {
|
Q_FOREACH (MouseEvent* click, m_clicks) {
|
||||||
click->m_time += time;
|
click->m_time += time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ void MouseClickEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaintD
|
||||||
effects->paintScreen(mask, region, data);
|
effects->paintScreen(mask, region, data);
|
||||||
|
|
||||||
paintScreenSetup(mask, region, data);
|
paintScreenSetup(mask, region, data);
|
||||||
foreach (const MouseEvent* click, m_clicks) {
|
Q_FOREACH (const MouseEvent* click, m_clicks) {
|
||||||
for (int i = 0; i < m_ringCount; ++i) {
|
for (int i = 0; i < m_ringCount; ++i) {
|
||||||
float alpha = computeAlpha(click, i);
|
float alpha = computeAlpha(click, i);
|
||||||
float size = computeRadius(click, i);
|
float size = computeRadius(click, i);
|
||||||
|
@ -196,7 +196,7 @@ void MouseClickEffect::repaint()
|
||||||
if (m_clicks.size() > 0) {
|
if (m_clicks.size() > 0) {
|
||||||
QRegion dirtyRegion;
|
QRegion dirtyRegion;
|
||||||
const int radius = m_ringMaxSize + m_lineWidth;
|
const int radius = m_ringMaxSize + m_lineWidth;
|
||||||
foreach (MouseEvent* click, m_clicks) {
|
Q_FOREACH (MouseEvent* click, m_clicks) {
|
||||||
dirtyRegion |= QRect(click->m_pos.x() - radius, click->m_pos.y() - radius, 2*radius, 2*radius);
|
dirtyRegion |= QRect(click->m_pos.x() - radius, click->m_pos.y() - radius, 2*radius, 2*radius);
|
||||||
if (click->m_frame) {
|
if (click->m_frame) {
|
||||||
// we grant the plasma style 32px padding for stuff like shadows...
|
// we grant the plasma style 32px padding for stuff like shadows...
|
||||||
|
|
|
@ -120,10 +120,10 @@ void MouseMarkEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaintDa
|
||||||
ShaderBinder binder(ShaderTrait::UniformColor);
|
ShaderBinder binder(ShaderTrait::UniformColor);
|
||||||
binder.shader()->setUniform(GLShader::ModelViewProjectionMatrix, data.projectionMatrix());
|
binder.shader()->setUniform(GLShader::ModelViewProjectionMatrix, data.projectionMatrix());
|
||||||
QVector<float> verts;
|
QVector<float> verts;
|
||||||
foreach (const Mark & mark, marks) {
|
Q_FOREACH (const Mark & mark, marks) {
|
||||||
verts.clear();
|
verts.clear();
|
||||||
verts.reserve(mark.size() * 2);
|
verts.reserve(mark.size() * 2);
|
||||||
foreach (const QPoint & p, mark) {
|
Q_FOREACH (const QPoint & p, mark) {
|
||||||
verts << p.x() << p.y();
|
verts << p.x() << p.y();
|
||||||
}
|
}
|
||||||
vbo->setData(verts.size() / 2, 2, verts.data(), nullptr);
|
vbo->setData(verts.size() / 2, 2, verts.data(), nullptr);
|
||||||
|
@ -132,7 +132,7 @@ void MouseMarkEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaintDa
|
||||||
if (!drawing.isEmpty()) {
|
if (!drawing.isEmpty()) {
|
||||||
verts.clear();
|
verts.clear();
|
||||||
verts.reserve(drawing.size() * 2);
|
verts.reserve(drawing.size() * 2);
|
||||||
foreach (const QPoint & p, drawing) {
|
Q_FOREACH (const QPoint & p, drawing) {
|
||||||
verts << p.x() << p.y();
|
verts << p.x() << p.y();
|
||||||
}
|
}
|
||||||
vbo->setData(verts.size() / 2, 2, verts.data(), nullptr);
|
vbo->setData(verts.size() / 2, 2, verts.data(), nullptr);
|
||||||
|
@ -174,7 +174,7 @@ void MouseMarkEffect::paintScreen(int mask, const QRegion ®ion, ScreenPaintDa
|
||||||
QPen pen(color);
|
QPen pen(color);
|
||||||
pen.setWidth(width);
|
pen.setWidth(width);
|
||||||
painter->setPen(pen);
|
painter->setPen(pen);
|
||||||
foreach (const Mark &mark, marks) {
|
Q_FOREACH (const Mark &mark, marks) {
|
||||||
drawMark(painter, mark);
|
drawMark(painter, mark);
|
||||||
}
|
}
|
||||||
drawMark(painter, drawing);
|
drawMark(painter, drawing);
|
||||||
|
|
|
@ -126,24 +126,24 @@ PresentWindowsEffect::~PresentWindowsEffect()
|
||||||
void PresentWindowsEffect::reconfigure(ReconfigureFlags)
|
void PresentWindowsEffect::reconfigure(ReconfigureFlags)
|
||||||
{
|
{
|
||||||
PresentWindowsConfig::self()->read();
|
PresentWindowsConfig::self()->read();
|
||||||
foreach (ElectricBorder border, m_borderActivate) {
|
Q_FOREACH (ElectricBorder border, m_borderActivate) {
|
||||||
effects->unreserveElectricBorder(border, this);
|
effects->unreserveElectricBorder(border, this);
|
||||||
}
|
}
|
||||||
foreach (ElectricBorder border, m_borderActivateAll) {
|
Q_FOREACH (ElectricBorder border, m_borderActivateAll) {
|
||||||
effects->unreserveElectricBorder(border, this);
|
effects->unreserveElectricBorder(border, this);
|
||||||
}
|
}
|
||||||
m_borderActivate.clear();
|
m_borderActivate.clear();
|
||||||
m_borderActivateAll.clear();
|
m_borderActivateAll.clear();
|
||||||
|
|
||||||
foreach (int i, PresentWindowsConfig::borderActivate()) {
|
Q_FOREACH (int i, PresentWindowsConfig::borderActivate()) {
|
||||||
m_borderActivate.append(ElectricBorder(i));
|
m_borderActivate.append(ElectricBorder(i));
|
||||||
effects->reserveElectricBorder(ElectricBorder(i), this);
|
effects->reserveElectricBorder(ElectricBorder(i), this);
|
||||||
}
|
}
|
||||||
foreach (int i, PresentWindowsConfig::borderActivateAll()) {
|
Q_FOREACH (int i, PresentWindowsConfig::borderActivateAll()) {
|
||||||
m_borderActivateAll.append(ElectricBorder(i));
|
m_borderActivateAll.append(ElectricBorder(i));
|
||||||
effects->reserveElectricBorder(ElectricBorder(i), this);
|
effects->reserveElectricBorder(ElectricBorder(i), this);
|
||||||
}
|
}
|
||||||
foreach (int i, PresentWindowsConfig::borderActivateClass()) {
|
Q_FOREACH (int i, PresentWindowsConfig::borderActivateClass()) {
|
||||||
m_borderActivateClass.append(ElectricBorder(i));
|
m_borderActivateClass.append(ElectricBorder(i));
|
||||||
effects->reserveElectricBorder(ElectricBorder(i), this);
|
effects->reserveElectricBorder(ElectricBorder(i), this);
|
||||||
}
|
}
|
||||||
|
@ -265,7 +265,7 @@ void PresentWindowsEffect::postPaintScreen()
|
||||||
}
|
}
|
||||||
m_windowData.clear();
|
m_windowData.clear();
|
||||||
|
|
||||||
foreach (EffectWindow * w, effects->stackingOrder()) {
|
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
|
||||||
w->setData(WindowForceBlurRole, QVariant());
|
w->setData(WindowForceBlurRole, QVariant());
|
||||||
w->setData(WindowForceBackgroundContrastRole, QVariant());
|
w->setData(WindowForceBackgroundContrastRole, QVariant());
|
||||||
}
|
}
|
||||||
|
@ -530,7 +530,7 @@ void PresentWindowsEffect::slotWindowClosed(EffectWindow *w)
|
||||||
|
|
||||||
rearrangeWindows();
|
rearrangeWindows();
|
||||||
|
|
||||||
foreach (EffectWindow *w, m_motionManager.managedWindows()) {
|
Q_FOREACH (EffectWindow *w, m_motionManager.managedWindows()) {
|
||||||
winData = m_windowData.find(w);
|
winData = m_windowData.find(w);
|
||||||
if (winData != m_windowData.end() && !winData->deleted)
|
if (winData != m_windowData.end() && !winData->deleted)
|
||||||
return; // found one that is not deleted? then we go on
|
return; // found one that is not deleted? then we go on
|
||||||
|
@ -972,7 +972,7 @@ void PresentWindowsEffect::rearrangeWindows()
|
||||||
|
|
||||||
if (m_windowFilter.isEmpty()) {
|
if (m_windowFilter.isEmpty()) {
|
||||||
windowlist = m_motionManager.managedWindows();
|
windowlist = m_motionManager.managedWindows();
|
||||||
foreach (EffectWindow * w, m_motionManager.managedWindows()) {
|
Q_FOREACH (EffectWindow * w, m_motionManager.managedWindows()) {
|
||||||
DataHash::iterator winData = m_windowData.find(w);
|
DataHash::iterator winData = m_windowData.find(w);
|
||||||
if (winData == m_windowData.end() || winData->deleted)
|
if (winData == m_windowData.end() || winData->deleted)
|
||||||
continue; // don't include closed windows
|
continue; // don't include closed windows
|
||||||
|
@ -981,7 +981,7 @@ void PresentWindowsEffect::rearrangeWindows()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Can we move this filtering somewhere else?
|
// Can we move this filtering somewhere else?
|
||||||
foreach (EffectWindow * w, m_motionManager.managedWindows()) {
|
Q_FOREACH (EffectWindow * w, m_motionManager.managedWindows()) {
|
||||||
DataHash::iterator winData = m_windowData.find(w);
|
DataHash::iterator winData = m_windowData.find(w);
|
||||||
if (winData == m_windowData.end() || winData->deleted)
|
if (winData == m_windowData.end() || winData->deleted)
|
||||||
continue; // don't include closed windows
|
continue; // don't include closed windows
|
||||||
|
@ -1033,7 +1033,7 @@ void PresentWindowsEffect::rearrangeWindows()
|
||||||
|
|
||||||
// Resize text frames if required
|
// Resize text frames if required
|
||||||
QFontMetrics* metrics = nullptr; // All fonts are the same
|
QFontMetrics* metrics = nullptr; // All fonts are the same
|
||||||
foreach (EffectWindow * w, m_motionManager.managedWindows()) {
|
Q_FOREACH (EffectWindow * w, m_motionManager.managedWindows()) {
|
||||||
DataHash::iterator winData = m_windowData.find(w);
|
DataHash::iterator winData = m_windowData.find(w);
|
||||||
if (winData == m_windowData.end())
|
if (winData == m_windowData.end())
|
||||||
continue;
|
continue;
|
||||||
|
@ -1312,7 +1312,7 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
|
||||||
// If windows do not overlap they scale into nothingness, fix by resetting. To reproduce
|
// If windows do not overlap they scale into nothingness, fix by resetting. To reproduce
|
||||||
// just have a single window on a Xinerama screen or have two windows that do not touch.
|
// just have a single window on a Xinerama screen or have two windows that do not touch.
|
||||||
// TODO: Work out why this happens, is most likely a bug in the manager.
|
// TODO: Work out why this happens, is most likely a bug in the manager.
|
||||||
foreach (EffectWindow * w, windowlist)
|
Q_FOREACH (EffectWindow * w, windowlist)
|
||||||
if (motionManager.transformedGeometry(w) == w->frameGeometry())
|
if (motionManager.transformedGeometry(w) == w->frameGeometry())
|
||||||
motionManager.reset(w);
|
motionManager.reset(w);
|
||||||
|
|
||||||
|
@ -1335,7 +1335,7 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
|
||||||
int direction = 0;
|
int direction = 0;
|
||||||
QHash<EffectWindow*, QRect> targets;
|
QHash<EffectWindow*, QRect> targets;
|
||||||
QHash<EffectWindow*, int> directions;
|
QHash<EffectWindow*, int> directions;
|
||||||
foreach (EffectWindow * w, windowlist) {
|
Q_FOREACH (EffectWindow * w, windowlist) {
|
||||||
bounds = bounds.united(w->frameGeometry());
|
bounds = bounds.united(w->frameGeometry());
|
||||||
targets[w] = w->frameGeometry();
|
targets[w] = w->frameGeometry();
|
||||||
// Reuse the unused "slot" as a preferred direction attribute. This is used when the window
|
// Reuse the unused "slot" as a preferred direction attribute. This is used when the window
|
||||||
|
@ -1351,9 +1351,9 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
|
||||||
bool overlap;
|
bool overlap;
|
||||||
do {
|
do {
|
||||||
overlap = false;
|
overlap = false;
|
||||||
foreach (EffectWindow * w, windowlist) {
|
Q_FOREACH (EffectWindow * w, windowlist) {
|
||||||
QRect *target_w = &targets[w];
|
QRect *target_w = &targets[w];
|
||||||
foreach (EffectWindow * e, windowlist) {
|
Q_FOREACH (EffectWindow * e, windowlist) {
|
||||||
if (w == e)
|
if (w == e)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1454,7 +1454,7 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
|
||||||
bool moved;
|
bool moved;
|
||||||
do {
|
do {
|
||||||
moved = false;
|
moved = false;
|
||||||
foreach (EffectWindow * w, windowlist) {
|
Q_FOREACH (EffectWindow * w, windowlist) {
|
||||||
QRect oldRect;
|
QRect oldRect;
|
||||||
QRect *target = &targets[w];
|
QRect *target = &targets[w];
|
||||||
// This may cause some slight distortion if the windows are enlarged a large amount
|
// This may cause some slight distortion if the windows are enlarged a large amount
|
||||||
|
@ -1531,7 +1531,7 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
|
||||||
// The expanding code above can actually enlarge windows over 1.0/2.0 scale, we don't like this
|
// The expanding code above can actually enlarge windows over 1.0/2.0 scale, we don't like this
|
||||||
// We can't add this to the loop above as it would cause a never-ending loop so we have to make
|
// We can't add this to the loop above as it would cause a never-ending loop so we have to make
|
||||||
// do with the less-than-optimal space usage with using this method.
|
// do with the less-than-optimal space usage with using this method.
|
||||||
foreach (EffectWindow * w, windowlist) {
|
Q_FOREACH (EffectWindow * w, windowlist) {
|
||||||
QRect *target = &targets[w];
|
QRect *target = &targets[w];
|
||||||
double scale = target->width() / double(w->width());
|
double scale = target->width() / double(w->width());
|
||||||
if (scale > 2.0 || (scale > 1.0 && (w->width() > 300 || w->height() > 300))) {
|
if (scale > 2.0 || (scale > 1.0 && (w->width() > 300 || w->height() > 300))) {
|
||||||
|
@ -1546,7 +1546,7 @@ void PresentWindowsEffect::calculateWindowTransformationsNatural(EffectWindowLis
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify the motion manager of the targets
|
// Notify the motion manager of the targets
|
||||||
foreach (EffectWindow * w, windowlist)
|
Q_FOREACH (EffectWindow * w, windowlist)
|
||||||
motionManager.moveWindow(w, targets.value(w));
|
motionManager.moveWindow(w, targets.value(w));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1597,7 +1597,7 @@ void PresentWindowsEffect::setActive(bool active)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add every single window to m_windowData (Just calling [w] creates it)
|
// Add every single window to m_windowData (Just calling [w] creates it)
|
||||||
foreach (EffectWindow * w, effects->stackingOrder()) {
|
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
|
||||||
DataHash::iterator winData;
|
DataHash::iterator winData;
|
||||||
if ((winData = m_windowData.find(w)) != m_windowData.end()) {
|
if ((winData = m_windowData.find(w)) != m_windowData.end()) {
|
||||||
winData->visible = isVisibleWindow(w);
|
winData->visible = isVisibleWindow(w);
|
||||||
|
@ -1627,7 +1627,7 @@ void PresentWindowsEffect::setActive(bool active)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter out special windows such as panels and taskbars
|
// Filter out special windows such as panels and taskbars
|
||||||
foreach (EffectWindow * w, effects->stackingOrder()) {
|
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
|
||||||
if (isSelectableWindow(w)) {
|
if (isSelectableWindow(w)) {
|
||||||
m_motionManager.manage(w);
|
m_motionManager.manage(w);
|
||||||
}
|
}
|
||||||
|
@ -1658,7 +1658,7 @@ void PresentWindowsEffect::setActive(bool active)
|
||||||
rearrangeWindows();
|
rearrangeWindows();
|
||||||
setHighlightedWindow(effects->activeWindow());
|
setHighlightedWindow(effects->activeWindow());
|
||||||
|
|
||||||
foreach (EffectWindow * w, effects->stackingOrder()) {
|
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
|
||||||
w->setData(WindowForceBlurRole, QVariant(true));
|
w->setData(WindowForceBlurRole, QVariant(true));
|
||||||
w->setData(WindowForceBackgroundContrastRole, QVariant(true));
|
w->setData(WindowForceBackgroundContrastRole, QVariant(true));
|
||||||
}
|
}
|
||||||
|
@ -1672,7 +1672,7 @@ void PresentWindowsEffect::setActive(bool active)
|
||||||
int desktop = effects->currentDesktop();
|
int desktop = effects->currentDesktop();
|
||||||
if (activeWindow && !activeWindow->isOnAllDesktops())
|
if (activeWindow && !activeWindow->isOnAllDesktops())
|
||||||
desktop = activeWindow->desktop();
|
desktop = activeWindow->desktop();
|
||||||
foreach (EffectWindow * w, effects->stackingOrder()) {
|
Q_FOREACH (EffectWindow * w, effects->stackingOrder()) {
|
||||||
DataHash::iterator winData = m_windowData.find(w);
|
DataHash::iterator winData = m_windowData.find(w);
|
||||||
if (winData != m_windowData.end())
|
if (winData != m_windowData.end())
|
||||||
winData->visible = (w->isOnDesktop(desktop) || w->isOnAllDesktops()) &&
|
winData->visible = (w->isOnDesktop(desktop) || w->isOnAllDesktops()) &&
|
||||||
|
@ -1682,7 +1682,7 @@ void PresentWindowsEffect::setActive(bool active)
|
||||||
m_closeView->hide();
|
m_closeView->hide();
|
||||||
|
|
||||||
// Move all windows back to their original position
|
// Move all windows back to their original position
|
||||||
foreach (EffectWindow * w, m_motionManager.managedWindows())
|
Q_FOREACH (EffectWindow * w, m_motionManager.managedWindows())
|
||||||
m_motionManager.moveWindow(w, w->frameGeometry());
|
m_motionManager.moveWindow(w, w->frameGeometry());
|
||||||
if (m_filterFrame) {
|
if (m_filterFrame) {
|
||||||
m_filterFrame->free();
|
m_filterFrame->free();
|
||||||
|
@ -1853,7 +1853,7 @@ EffectWindow* PresentWindowsEffect::relativeWindow(EffectWindow *w, int xdiff, i
|
||||||
detectRect = QRect(0, wArea.y(), area.width(), wArea.height());
|
detectRect = QRect(0, wArea.y(), area.width(), wArea.height());
|
||||||
next = nullptr;
|
next = nullptr;
|
||||||
|
|
||||||
foreach (EffectWindow * e, m_motionManager.managedWindows()) {
|
Q_FOREACH (EffectWindow * e, m_motionManager.managedWindows()) {
|
||||||
DataHash::const_iterator winData = m_windowData.find(e);
|
DataHash::const_iterator winData = m_windowData.find(e);
|
||||||
if (winData == m_windowData.end() || !winData->visible)
|
if (winData == m_windowData.end() || !winData->visible)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1885,7 +1885,7 @@ EffectWindow* PresentWindowsEffect::relativeWindow(EffectWindow *w, int xdiff, i
|
||||||
detectRect = QRect(0, wArea.y(), area.width(), wArea.height());
|
detectRect = QRect(0, wArea.y(), area.width(), wArea.height());
|
||||||
next = nullptr;
|
next = nullptr;
|
||||||
|
|
||||||
foreach (EffectWindow * e, m_motionManager.managedWindows()) {
|
Q_FOREACH (EffectWindow * e, m_motionManager.managedWindows()) {
|
||||||
DataHash::const_iterator winData = m_windowData.find(e);
|
DataHash::const_iterator winData = m_windowData.find(e);
|
||||||
if (winData == m_windowData.end() || !winData->visible)
|
if (winData == m_windowData.end() || !winData->visible)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1922,7 +1922,7 @@ EffectWindow* PresentWindowsEffect::relativeWindow(EffectWindow *w, int xdiff, i
|
||||||
detectRect = QRect(wArea.x(), 0, wArea.width(), area.height());
|
detectRect = QRect(wArea.x(), 0, wArea.width(), area.height());
|
||||||
next = nullptr;
|
next = nullptr;
|
||||||
|
|
||||||
foreach (EffectWindow * e, m_motionManager.managedWindows()) {
|
Q_FOREACH (EffectWindow * e, m_motionManager.managedWindows()) {
|
||||||
DataHash::const_iterator winData = m_windowData.find(e);
|
DataHash::const_iterator winData = m_windowData.find(e);
|
||||||
if (winData == m_windowData.end() || !winData->visible)
|
if (winData == m_windowData.end() || !winData->visible)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1954,7 +1954,7 @@ EffectWindow* PresentWindowsEffect::relativeWindow(EffectWindow *w, int xdiff, i
|
||||||
detectRect = QRect(wArea.x(), 0, wArea.width(), area.height());
|
detectRect = QRect(wArea.x(), 0, wArea.width(), area.height());
|
||||||
next = nullptr;
|
next = nullptr;
|
||||||
|
|
||||||
foreach (EffectWindow * e, m_motionManager.managedWindows()) {
|
Q_FOREACH (EffectWindow * e, m_motionManager.managedWindows()) {
|
||||||
DataHash::const_iterator winData = m_windowData.find(e);
|
DataHash::const_iterator winData = m_windowData.find(e);
|
||||||
if (winData == m_windowData.end() || !winData->visible)
|
if (winData == m_windowData.end() || !winData->visible)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1990,7 +1990,7 @@ EffectWindow* PresentWindowsEffect::findFirstWindow() const
|
||||||
EffectWindow *topLeft = nullptr;
|
EffectWindow *topLeft = nullptr;
|
||||||
QRectF topLeftGeometry;
|
QRectF topLeftGeometry;
|
||||||
|
|
||||||
foreach (EffectWindow * w, m_motionManager.managedWindows()) {
|
Q_FOREACH (EffectWindow * w, m_motionManager.managedWindows()) {
|
||||||
DataHash::const_iterator winData = m_windowData.find(w);
|
DataHash::const_iterator winData = m_windowData.find(w);
|
||||||
if (winData == m_windowData.end())
|
if (winData == m_windowData.end())
|
||||||
continue;
|
continue;
|
||||||
|
@ -2053,7 +2053,7 @@ void CloseWindowView::clicked()
|
||||||
{
|
{
|
||||||
// 50ms until the window is elevated (seen!) and 300ms more to be "realized" by the user.
|
// 50ms until the window is elevated (seen!) and 300ms more to be "realized" by the user.
|
||||||
if (m_armTimer.hasExpired(350)) {
|
if (m_armTimer.hasExpired(350)) {
|
||||||
emit requestClose();
|
Q_EMIT requestClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -274,14 +274,14 @@ void ScreenShotSourceMulti1::marshal(ScreenShotSink1 *sink)
|
||||||
|
|
||||||
void ScreenShotSourceMulti1::handleSourceCancelled()
|
void ScreenShotSourceMulti1::handleSourceCancelled()
|
||||||
{
|
{
|
||||||
emit cancelled();
|
Q_EMIT cancelled();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenShotSourceMulti1::handleSourceCompleted()
|
void ScreenShotSourceMulti1::handleSourceCompleted()
|
||||||
{
|
{
|
||||||
// If all sources are complete now, emit the completed signal.
|
// If all sources are complete now, emit the completed signal.
|
||||||
if (isCompleted()) {
|
if (isCompleted()) {
|
||||||
emit completed();
|
Q_EMIT completed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ static xcb_pixmap_t xpixmapFromImage(const QImage &image)
|
||||||
void ScreenShotSinkXpixmap1::flush(const QImage &image)
|
void ScreenShotSinkXpixmap1::flush(const QImage &image)
|
||||||
{
|
{
|
||||||
const xcb_pixmap_t pixmap = xpixmapFromImage(image);
|
const xcb_pixmap_t pixmap = xpixmapFromImage(image);
|
||||||
emit m_interface->screenshotCreated(pixmap);
|
Q_EMIT m_interface->screenshotCreated(pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenShotSinkFile1::ScreenShotSinkFile1(ScreenShotDBusInterface1 *interface,
|
ScreenShotSinkFile1::ScreenShotSinkFile1(ScreenShotDBusInterface1 *interface,
|
||||||
|
|
|
@ -392,7 +392,7 @@ void ShowFpsEffect::paintGraph(int x, int y, QList<int> values, QList<int> lines
|
||||||
vbo->setColor(color);
|
vbo->setColor(color);
|
||||||
QVector<float> verts;
|
QVector<float> verts;
|
||||||
// First draw the lines
|
// First draw the lines
|
||||||
foreach (int h, lines) {
|
Q_FOREACH (int h, lines) {
|
||||||
verts << x << y - h;
|
verts << x << y - h;
|
||||||
verts << x + values.count() << y - h;
|
verts << x + values.count() << y - h;
|
||||||
}
|
}
|
||||||
|
@ -477,7 +477,7 @@ void ShowFpsEffect::paintGraph(int x, int y, QList<int> values, QList<int> lines
|
||||||
// Then the lines
|
// Then the lines
|
||||||
col.red = col.green = col.blue = 0; // black
|
col.red = col.green = col.blue = 0; // black
|
||||||
QVector<xcb_rectangle_t> rects;
|
QVector<xcb_rectangle_t> rects;
|
||||||
foreach (int h, lines) {
|
Q_FOREACH (int h, lines) {
|
||||||
xcb_rectangle_t rect = {0, int16_t(MAX_TIME - h), uint16_t(values.count()), 1};
|
xcb_rectangle_t rect = {0, int16_t(MAX_TIME - h), uint16_t(values.count()), 1};
|
||||||
rects << rect;
|
rects << rect;
|
||||||
}
|
}
|
||||||
|
@ -492,7 +492,7 @@ void ShowFpsEffect::paintGraph(int x, int y, QList<int> values, QList<int> lines
|
||||||
QPainter *painter = effects->scenePainter();
|
QPainter *painter = effects->scenePainter();
|
||||||
painter->setPen(Qt::black);
|
painter->setPen(Qt::black);
|
||||||
// First draw the lines
|
// First draw the lines
|
||||||
foreach (int h, lines) {
|
Q_FOREACH (int h, lines) {
|
||||||
painter->drawLine(x, y - h, x + values.count(), y - h);
|
painter->drawLine(x, y - h, x + values.count(), y - h);
|
||||||
}
|
}
|
||||||
QColor color(0, 0, 0);
|
QColor color(0, 0, 0);
|
||||||
|
|
|
@ -56,7 +56,7 @@ void SlideBackEffect::windowRaised(EffectWindow *w)
|
||||||
{
|
{
|
||||||
// Determine all windows on top of the activated one
|
// Determine all windows on top of the activated one
|
||||||
bool currentFound = false;
|
bool currentFound = false;
|
||||||
foreach (EffectWindow * tmp, oldStackingOrder) {
|
Q_FOREACH (EffectWindow * tmp, oldStackingOrder) {
|
||||||
if (!currentFound) {
|
if (!currentFound) {
|
||||||
if (tmp == w) {
|
if (tmp == w) {
|
||||||
currentFound = true;
|
currentFound = true;
|
||||||
|
@ -75,7 +75,7 @@ void SlideBackEffect::windowRaised(EffectWindow *w)
|
||||||
coveringWindows.append(tmp);
|
coveringWindows.append(tmp);
|
||||||
} else {
|
} else {
|
||||||
//Does it intersect with a moved (elevated) window and do we have to elevate it too?
|
//Does it intersect with a moved (elevated) window and do we have to elevate it too?
|
||||||
foreach (EffectWindow * elevatedWindow, elevatedList) {
|
Q_FOREACH (EffectWindow * elevatedWindow, elevatedList) {
|
||||||
if (tmp->frameGeometry().intersects(elevatedWindow->frameGeometry())) {
|
if (tmp->frameGeometry().intersects(elevatedWindow->frameGeometry())) {
|
||||||
effects->setElevatedWindow(tmp, true);
|
effects->setElevatedWindow(tmp, true);
|
||||||
elevatedList.append(tmp);
|
elevatedList.append(tmp);
|
||||||
|
@ -94,7 +94,7 @@ void SlideBackEffect::windowRaised(EffectWindow *w)
|
||||||
// If a window is minimized it could happen that the panels stay elevated without any windows sliding.
|
// If a window is minimized it could happen that the panels stay elevated without any windows sliding.
|
||||||
// clear all elevation settings
|
// clear all elevation settings
|
||||||
if (!motionManager.managingWindows()) {
|
if (!motionManager.managingWindows()) {
|
||||||
foreach (EffectWindow * tmp, elevatedList) {
|
Q_FOREACH (EffectWindow * tmp, elevatedList) {
|
||||||
effects->setElevatedWindow(tmp, false);
|
effects->setElevatedWindow(tmp, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ void SlideBackEffect::paintWindow(EffectWindow *w, int mask, QRegion region, Win
|
||||||
if (motionManager.isManaging(w)) {
|
if (motionManager.isManaging(w)) {
|
||||||
motionManager.apply(w, data);
|
motionManager.apply(w, data);
|
||||||
}
|
}
|
||||||
foreach (const QRegion &r, clippedRegions) {
|
Q_FOREACH (const QRegion &r, clippedRegions) {
|
||||||
region = region.intersected(r);
|
region = region.intersected(r);
|
||||||
}
|
}
|
||||||
effects->paintWindow(w, mask, region, data);
|
effects->paintWindow(w, mask, region, data);
|
||||||
|
@ -191,7 +191,7 @@ void SlideBackEffect::postPaintWindow(EffectWindow* w)
|
||||||
// restore the stacking order of all windows not intersecting any more except panels
|
// restore the stacking order of all windows not intersecting any more except panels
|
||||||
if (coveringWindows.contains(w)) {
|
if (coveringWindows.contains(w)) {
|
||||||
EffectWindowList tmpList;
|
EffectWindowList tmpList;
|
||||||
foreach (EffectWindow * tmp, elevatedList) {
|
Q_FOREACH (EffectWindow * tmp, elevatedList) {
|
||||||
QRect elevatedGeometry = tmp->frameGeometry();
|
QRect elevatedGeometry = tmp->frameGeometry();
|
||||||
if (motionManager.isManaging(tmp)) {
|
if (motionManager.isManaging(tmp)) {
|
||||||
elevatedGeometry = motionManager.transformedGeometry(tmp).toAlignedRect();
|
elevatedGeometry = motionManager.transformedGeometry(tmp).toAlignedRect();
|
||||||
|
@ -207,7 +207,7 @@ void SlideBackEffect::postPaintWindow(EffectWindow* w)
|
||||||
} else {
|
} else {
|
||||||
if (!tmp->isDock()) {
|
if (!tmp->isDock()) {
|
||||||
bool keepElevated = false;
|
bool keepElevated = false;
|
||||||
foreach (EffectWindow * elevatedWindow, tmpList) {
|
Q_FOREACH (EffectWindow * elevatedWindow, tmpList) {
|
||||||
if (tmp->frameGeometry().intersects(elevatedWindow->frameGeometry())) {
|
if (tmp->frameGeometry().intersects(elevatedWindow->frameGeometry())) {
|
||||||
keepElevated = true;
|
keepElevated = true;
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ void SlideBackEffect::postPaintWindow(EffectWindow* w)
|
||||||
coveringWindows.removeAll(w);
|
coveringWindows.removeAll(w);
|
||||||
if (coveringWindows.isEmpty()) {
|
if (coveringWindows.isEmpty()) {
|
||||||
// Restore correct stacking order
|
// Restore correct stacking order
|
||||||
foreach (EffectWindow * tmp, elevatedList) {
|
Q_FOREACH (EffectWindow * tmp, elevatedList) {
|
||||||
effects->setElevatedWindow(tmp, false);
|
effects->setElevatedWindow(tmp, false);
|
||||||
}
|
}
|
||||||
elevatedList.clear();
|
elevatedList.clear();
|
||||||
|
@ -312,7 +312,7 @@ EffectWindowList SlideBackEffect::usableWindows(const EffectWindowList & allWind
|
||||||
auto isWindowVisible = [] (const EffectWindow *window) {
|
auto isWindowVisible = [] (const EffectWindow *window) {
|
||||||
return window && effects->virtualScreenGeometry().intersects(window->frameGeometry());
|
return window && effects->virtualScreenGeometry().intersects(window->frameGeometry());
|
||||||
};
|
};
|
||||||
foreach (EffectWindow * tmp, allWindows) {
|
Q_FOREACH (EffectWindow * tmp, allWindows) {
|
||||||
if (isWindowUsable(tmp) && isWindowVisible(tmp)) {
|
if (isWindowUsable(tmp) && isWindowVisible(tmp)) {
|
||||||
retList.append(tmp);
|
retList.append(tmp);
|
||||||
}
|
}
|
||||||
|
@ -324,7 +324,7 @@ QRect SlideBackEffect::getModalGroupGeometry(EffectWindow *w)
|
||||||
{
|
{
|
||||||
QRect modalGroupGeometry = w->frameGeometry();
|
QRect modalGroupGeometry = w->frameGeometry();
|
||||||
if (w->isModal()) {
|
if (w->isModal()) {
|
||||||
foreach (EffectWindow * modalWindow, w->mainWindows()) {
|
Q_FOREACH (EffectWindow * modalWindow, w->mainWindows()) {
|
||||||
modalGroupGeometry = modalGroupGeometry.united(getModalGroupGeometry(modalWindow));
|
modalGroupGeometry = modalGroupGeometry.united(getModalGroupGeometry(modalWindow));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ void ThumbnailAsideEffect::paintScreen(int mask, const QRegion ®ion, ScreenPa
|
||||||
effects->paintScreen(mask, region, data);
|
effects->paintScreen(mask, region, data);
|
||||||
|
|
||||||
const QMatrix4x4 projectionMatrix = data.projectionMatrix();
|
const QMatrix4x4 projectionMatrix = data.projectionMatrix();
|
||||||
foreach (const Data & d, windows) {
|
Q_FOREACH (const Data & d, windows) {
|
||||||
if (painted.intersects(d.rect)) {
|
if (painted.intersects(d.rect)) {
|
||||||
WindowPaintData data(d.window, projectionMatrix);
|
WindowPaintData data(d.window, projectionMatrix);
|
||||||
data.multiplyOpacity(opacity);
|
data.multiplyOpacity(opacity);
|
||||||
|
@ -75,7 +75,7 @@ void ThumbnailAsideEffect::paintWindow(EffectWindow *w, int mask, QRegion region
|
||||||
|
|
||||||
void ThumbnailAsideEffect::slotWindowDamaged(EffectWindow* w, const QRegion&)
|
void ThumbnailAsideEffect::slotWindowDamaged(EffectWindow* w, const QRegion&)
|
||||||
{
|
{
|
||||||
foreach (const Data & d, windows) {
|
Q_FOREACH (const Data & d, windows) {
|
||||||
if (d.window == w)
|
if (d.window == w)
|
||||||
effects->addRepaint(d.rect);
|
effects->addRepaint(d.rect);
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ void ThumbnailAsideEffect::slotWindowDamaged(EffectWindow* w, const QRegion&)
|
||||||
|
|
||||||
void ThumbnailAsideEffect::slotWindowFrameGeometryChanged(EffectWindow* w, const QRect& old)
|
void ThumbnailAsideEffect::slotWindowFrameGeometryChanged(EffectWindow* w, const QRect& old)
|
||||||
{
|
{
|
||||||
foreach (const Data & d, windows) {
|
Q_FOREACH (const Data & d, windows) {
|
||||||
if (d.window == w) {
|
if (d.window == w) {
|
||||||
if (w->size() == old.size())
|
if (w->size() == old.size())
|
||||||
effects->addRepaint(d.rect);
|
effects->addRepaint(d.rect);
|
||||||
|
@ -144,7 +144,7 @@ void ThumbnailAsideEffect::arrange()
|
||||||
int height = 0;
|
int height = 0;
|
||||||
QVector< int > pos(windows.size());
|
QVector< int > pos(windows.size());
|
||||||
int mwidth = 0;
|
int mwidth = 0;
|
||||||
foreach (const Data & d, windows) {
|
Q_FOREACH (const Data & d, windows) {
|
||||||
height += d.window->height();
|
height += d.window->height();
|
||||||
mwidth = qMax(mwidth, d.window->width());
|
mwidth = qMax(mwidth, d.window->width());
|
||||||
pos[ d.index ] = d.window->height();
|
pos[ d.index ] = d.window->height();
|
||||||
|
@ -172,7 +172,7 @@ void ThumbnailAsideEffect::arrange()
|
||||||
|
|
||||||
void ThumbnailAsideEffect::repaintAll()
|
void ThumbnailAsideEffect::repaintAll()
|
||||||
{
|
{
|
||||||
foreach (const Data & d, windows)
|
Q_FOREACH (const Data & d, windows)
|
||||||
effects->addRepaint(d.rect);
|
effects->addRepaint(d.rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ void TrackMouseEffectConfig::shortcutChanged(const QKeySequence &seq)
|
||||||
if (QAction *a = m_actionCollection->action(QStringLiteral("TrackMouse"))) {
|
if (QAction *a = m_actionCollection->action(QStringLiteral("TrackMouse"))) {
|
||||||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << seq, KGlobalAccel::NoAutoloading);
|
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << seq, KGlobalAccel::NoAutoloading);
|
||||||
}
|
}
|
||||||
emit changed(true);
|
Q_EMIT changed(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -77,7 +77,7 @@ void WindowGeometryConfig::save()
|
||||||
void WindowGeometryConfig::defaults()
|
void WindowGeometryConfig::defaults()
|
||||||
{
|
{
|
||||||
myUi->shortcuts->allDefault();
|
myUi->shortcuts->allDefault();
|
||||||
emit changed(true);
|
Q_EMIT changed(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} //namespace
|
} //namespace
|
||||||
|
|
|
@ -93,7 +93,7 @@ void ZoomAccessibilityIntegration::destroyAccessibilityRegistry()
|
||||||
|
|
||||||
void ZoomAccessibilityIntegration::slotFocusChanged(const AccessibleObject &object)
|
void ZoomAccessibilityIntegration::slotFocusChanged(const AccessibleObject &object)
|
||||||
{
|
{
|
||||||
emit focusPointChanged(object.focusPoint());
|
Q_EMIT focusPointChanged(object.focusPoint());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace KWin
|
} // namespace KWin
|
||||||
|
|
|
@ -363,7 +363,7 @@ bool X11Client::windowEvent(xcb_generic_event_t *e)
|
||||||
// ### Inform the decoration
|
// ### Inform the decoration
|
||||||
}
|
}
|
||||||
if (dirtyProperties2.testFlag(NET::WM2WindowRole)) {
|
if (dirtyProperties2.testFlag(NET::WM2WindowRole)) {
|
||||||
emit windowRoleChanged();
|
Q_EMIT windowRoleChanged();
|
||||||
}
|
}
|
||||||
if (dirtyProperties2.testFlag(NET::WM2WindowClass)) {
|
if (dirtyProperties2.testFlag(NET::WM2WindowClass)) {
|
||||||
getResourceClass();
|
getResourceClass();
|
||||||
|
@ -1191,7 +1191,7 @@ bool Unmanaged::windowEvent(xcb_generic_event_t *e)
|
||||||
getWmOpaqueRegion();
|
getWmOpaqueRegion();
|
||||||
}
|
}
|
||||||
if (dirtyProperties2.testFlag(NET::WM2WindowRole)) {
|
if (dirtyProperties2.testFlag(NET::WM2WindowRole)) {
|
||||||
emit windowRoleChanged();
|
Q_EMIT windowRoleChanged();
|
||||||
}
|
}
|
||||||
if (dirtyProperties2.testFlag(NET::WM2WindowClass)) {
|
if (dirtyProperties2.testFlag(NET::WM2WindowClass)) {
|
||||||
getResourceClass();
|
getResourceClass();
|
||||||
|
@ -1237,7 +1237,7 @@ bool Unmanaged::windowEvent(xcb_generic_event_t *e)
|
||||||
detectShape(window());
|
detectShape(window());
|
||||||
addRepaintFull();
|
addRepaintFull();
|
||||||
addWorkspaceRepaint(frameGeometry()); // in case shape change removes part of this window
|
addWorkspaceRepaint(frameGeometry()); // in case shape change removes part of this window
|
||||||
emit geometryShapeChanged(this, frameGeometry());
|
Q_EMIT geometryShapeChanged(this, frameGeometry());
|
||||||
}
|
}
|
||||||
if (eventType == Xcb::Extensions::self()->damageNotifyEvent())
|
if (eventType == Xcb::Extensions::self()->damageNotifyEvent())
|
||||||
damageNotifyEvent();
|
damageNotifyEvent();
|
||||||
|
@ -1257,10 +1257,10 @@ void Unmanaged::configureNotifyEvent(xcb_configure_notify_event_t *e)
|
||||||
m_clientGeometry = newgeom;
|
m_clientGeometry = newgeom;
|
||||||
m_frameGeometry = newgeom;
|
m_frameGeometry = newgeom;
|
||||||
m_bufferGeometry = newgeom;
|
m_bufferGeometry = newgeom;
|
||||||
emit bufferGeometryChanged(this, old);
|
Q_EMIT bufferGeometryChanged(this, old);
|
||||||
emit clientGeometryChanged(this, old);
|
Q_EMIT clientGeometryChanged(this, old);
|
||||||
emit frameGeometryChanged(this, old);
|
Q_EMIT frameGeometryChanged(this, old);
|
||||||
emit geometryShapeChanged(this, old);
|
Q_EMIT geometryShapeChanged(this, old);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1293,7 +1293,7 @@ void Toplevel::clientMessageEvent(xcb_client_message_event_t *e)
|
||||||
setSurface(s);
|
setSurface(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit surfaceIdChanged(m_surfaceId);
|
Q_EMIT surfaceIdChanged(m_surfaceId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ void FTraceLogger::setEnabled(bool enabled)
|
||||||
} else {
|
} else {
|
||||||
m_file.close();
|
m_file.close();
|
||||||
}
|
}
|
||||||
emit enabledChanged();
|
Q_EMIT enabledChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FTraceLogger::open()
|
bool FTraceLogger::open()
|
||||||
|
|
|
@ -86,7 +86,7 @@ void GestureRecognizer::unregisterGesture(KWin::Gesture* gesture)
|
||||||
}
|
}
|
||||||
m_gestures.removeAll(gesture);
|
m_gestures.removeAll(gesture);
|
||||||
if (m_activeSwipeGestures.removeOne(gesture)) {
|
if (m_activeSwipeGestures.removeOne(gesture)) {
|
||||||
emit gesture->cancelled();
|
Q_EMIT gesture->cancelled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ int GestureRecognizer::startSwipeGesture(uint fingerCount, const QPointF &startP
|
||||||
// direction doesn't matter yet
|
// direction doesn't matter yet
|
||||||
m_activeSwipeGestures << swipeGesture;
|
m_activeSwipeGestures << swipeGesture;
|
||||||
count++;
|
count++;
|
||||||
emit swipeGesture->started();
|
Q_EMIT swipeGesture->started();
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
@ -166,11 +166,11 @@ void GestureRecognizer::updateSwipeGesture(const QSizeF &delta)
|
||||||
auto g = qobject_cast<SwipeGesture*>(*it);
|
auto g = qobject_cast<SwipeGesture*>(*it);
|
||||||
if (g->direction() == direction) {
|
if (g->direction() == direction) {
|
||||||
if (g->isMinimumDeltaRelevant()) {
|
if (g->isMinimumDeltaRelevant()) {
|
||||||
emit g->progress(g->minimumDeltaReachedProgress(combinedDelta));
|
Q_EMIT g->progress(g->minimumDeltaReachedProgress(combinedDelta));
|
||||||
}
|
}
|
||||||
it++;
|
it++;
|
||||||
} else {
|
} else {
|
||||||
emit g->cancelled();
|
Q_EMIT g->cancelled();
|
||||||
it = m_activeSwipeGestures.erase(it);
|
it = m_activeSwipeGestures.erase(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ void GestureRecognizer::updateSwipeGesture(const QSizeF &delta)
|
||||||
void GestureRecognizer::cancelActiveSwipeGestures()
|
void GestureRecognizer::cancelActiveSwipeGestures()
|
||||||
{
|
{
|
||||||
for (auto g : qAsConst(m_activeSwipeGestures)) {
|
for (auto g : qAsConst(m_activeSwipeGestures)) {
|
||||||
emit g->cancelled();
|
Q_EMIT g->cancelled();
|
||||||
}
|
}
|
||||||
m_activeSwipeGestures.clear();
|
m_activeSwipeGestures.clear();
|
||||||
}
|
}
|
||||||
|
@ -195,9 +195,9 @@ void GestureRecognizer::endSwipeGesture()
|
||||||
const QSizeF delta = std::accumulate(m_swipeUpdates.constBegin(), m_swipeUpdates.constEnd(), QSizeF(0, 0));
|
const QSizeF delta = std::accumulate(m_swipeUpdates.constBegin(), m_swipeUpdates.constEnd(), QSizeF(0, 0));
|
||||||
for (auto g : qAsConst(m_activeSwipeGestures)) {
|
for (auto g : qAsConst(m_activeSwipeGestures)) {
|
||||||
if (static_cast<SwipeGesture*>(g)->minimumDeltaReached(delta)) {
|
if (static_cast<SwipeGesture*>(g)->minimumDeltaReached(delta)) {
|
||||||
emit g->triggered();
|
Q_EMIT g->triggered();
|
||||||
} else {
|
} else {
|
||||||
emit g->cancelled();
|
Q_EMIT g->cancelled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_activeSwipeGestures.clear();
|
m_activeSwipeGestures.clear();
|
||||||
|
|
|
@ -1718,7 +1718,7 @@ public:
|
||||||
|
|
||||||
cursor->updateCursor(cursorImage, tcursor->hotspot());
|
cursor->updateCursor(cursorImage, tcursor->hotspot());
|
||||||
});
|
});
|
||||||
emit cursor->cursorChanged();
|
Q_EMIT cursor->cursorChanged();
|
||||||
return tool;
|
return tool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2392,7 +2392,7 @@ void InputRedirection::setupLibInput()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: this should update the seat, only workaround for QTBUG-54371
|
// TODO: this should update the seat, only workaround for QTBUG-54371
|
||||||
emit hasAlphaNumericKeyboardChanged(set);
|
Q_EMIT hasAlphaNumericKeyboardChanged(set);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(conn, &LibInput::Connection::hasTabletModeSwitchChanged, this,
|
connect(conn, &LibInput::Connection::hasTabletModeSwitchChanged, this,
|
||||||
|
@ -2400,7 +2400,7 @@ void InputRedirection::setupLibInput()
|
||||||
if (m_libInput->isSuspended()) {
|
if (m_libInput->isSuspended()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit hasTabletModeSwitchChanged(set);
|
Q_EMIT hasTabletModeSwitchChanged(set);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(conn, &LibInput::Connection::hasPointerChanged, this,
|
connect(conn, &LibInput::Connection::hasPointerChanged, this,
|
||||||
|
@ -2578,7 +2578,7 @@ Toplevel *InputRedirection::findToplevel(const QPoint &pos)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
const QList<Unmanaged *> &unmanaged = Workspace::self()->unmanagedList();
|
const QList<Unmanaged *> &unmanaged = Workspace::self()->unmanagedList();
|
||||||
foreach (Unmanaged *u, unmanaged) {
|
Q_FOREACH (Unmanaged *u, unmanaged) {
|
||||||
if (u->hitTest(pos)) {
|
if (u->hitTest(pos)) {
|
||||||
return u;
|
return u;
|
||||||
}
|
}
|
||||||
|
@ -2725,7 +2725,7 @@ bool InputDeviceHandler::setAt(Toplevel *toplevel)
|
||||||
m_at.surfaceCreatedConnection = QMetaObject::Connection();
|
m_at.surfaceCreatedConnection = QMetaObject::Connection();
|
||||||
|
|
||||||
m_at.at = toplevel;
|
m_at.at = toplevel;
|
||||||
emit atChanged(old, toplevel);
|
Q_EMIT atChanged(old, toplevel);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2740,7 +2740,7 @@ void InputDeviceHandler::setDecoration(Decoration::DecoratedClientImpl *decorati
|
||||||
auto oldDeco = m_focus.decoration;
|
auto oldDeco = m_focus.decoration;
|
||||||
m_focus.decoration = decoration;
|
m_focus.decoration = decoration;
|
||||||
cleanupDecoration(oldDeco.data(), m_focus.decoration.data());
|
cleanupDecoration(oldDeco.data(), m_focus.decoration.data());
|
||||||
emit decorationChanged();
|
Q_EMIT decorationChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputDeviceHandler::setInternalWindow(QWindow *window)
|
void InputDeviceHandler::setInternalWindow(QWindow *window)
|
||||||
|
@ -2786,7 +2786,7 @@ bool InputDeviceHandler::updateDecoration()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cleanupDecoration(oldDeco.data(), m_focus.decoration.data());
|
cleanupDecoration(oldDeco.data(), m_focus.decoration.data());
|
||||||
emit decorationChanged();
|
Q_EMIT decorationChanged();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -301,7 +301,7 @@ void InputMethod::setEnabled(bool enabled)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_enabled = enabled;
|
m_enabled = enabled;
|
||||||
emit enabledChanged(m_enabled);
|
Q_EMIT enabledChanged(m_enabled);
|
||||||
|
|
||||||
// send OSD message
|
// send OSD message
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(
|
QDBusMessage msg = QDBusMessage::createMethodCall(
|
||||||
|
|
|
@ -94,7 +94,7 @@ void InputPanelV1Client::destroyClient()
|
||||||
markAsZombie();
|
markAsZombie();
|
||||||
|
|
||||||
Deleted *deleted = Deleted::create(this);
|
Deleted *deleted = Deleted::create(this);
|
||||||
emit windowClosed(this, deleted);
|
Q_EMIT windowClosed(this, deleted);
|
||||||
StackingUpdatesBlocker blocker(workspace());
|
StackingUpdatesBlocker blocker(workspace());
|
||||||
waylandServer()->removeClient(this);
|
waylandServer()->removeClient(this);
|
||||||
deleted->unrefWindow();
|
deleted->unrefWindow();
|
||||||
|
|
|
@ -27,7 +27,7 @@ InputPanelV1Integration::InputPanelV1Integration(QObject *parent)
|
||||||
|
|
||||||
void InputPanelV1Integration::createClient(InputPanelSurfaceV1Interface *shellSurface)
|
void InputPanelV1Integration::createClient(InputPanelSurfaceV1Interface *shellSurface)
|
||||||
{
|
{
|
||||||
emit clientCreated(new InputPanelV1Client(shellSurface));
|
Q_EMIT clientCreated(new InputPanelV1Client(shellSurface));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace KWin
|
} // namespace KWin
|
||||||
|
|
|
@ -330,11 +330,11 @@ void InternalClient::destroyClient()
|
||||||
markAsZombie();
|
markAsZombie();
|
||||||
if (isInteractiveMoveResize()) {
|
if (isInteractiveMoveResize()) {
|
||||||
leaveInteractiveMoveResize();
|
leaveInteractiveMoveResize();
|
||||||
emit clientFinishUserMovedResized(this);
|
Q_EMIT clientFinishUserMovedResized(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Deleted *deleted = Deleted::create(this);
|
Deleted *deleted = Deleted::create(this);
|
||||||
emit windowClosed(this, deleted);
|
Q_EMIT windowClosed(this, deleted);
|
||||||
|
|
||||||
destroyDecoration();
|
destroyDecoration();
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ void InternalClient::updateCaption()
|
||||||
} while (findClientWithSameCaption());
|
} while (findClientWithSameCaption());
|
||||||
}
|
}
|
||||||
if (m_captionSuffix != oldSuffix) {
|
if (m_captionSuffix != oldSuffix) {
|
||||||
emit captionChanged();
|
Q_EMIT captionChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -466,13 +466,13 @@ void InternalClient::commitGeometry(const QRect &rect)
|
||||||
syncGeometryToInternalWindow();
|
syncGeometryToInternalWindow();
|
||||||
|
|
||||||
if (oldClientGeometry != m_clientGeometry) {
|
if (oldClientGeometry != m_clientGeometry) {
|
||||||
emit bufferGeometryChanged(this, oldClientGeometry);
|
Q_EMIT bufferGeometryChanged(this, oldClientGeometry);
|
||||||
emit clientGeometryChanged(this, oldClientGeometry);
|
Q_EMIT clientGeometryChanged(this, oldClientGeometry);
|
||||||
}
|
}
|
||||||
if (oldFrameGeometry != m_frameGeometry) {
|
if (oldFrameGeometry != m_frameGeometry) {
|
||||||
emit frameGeometryChanged(this, oldFrameGeometry);
|
Q_EMIT frameGeometryChanged(this, oldFrameGeometry);
|
||||||
}
|
}
|
||||||
emit geometryShapeChanged(this, oldFrameGeometry);
|
Q_EMIT geometryShapeChanged(this, oldFrameGeometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InternalClient::setCaption(const QString &caption)
|
void InternalClient::setCaption(const QString &caption)
|
||||||
|
@ -487,7 +487,7 @@ void InternalClient::setCaption(const QString &caption)
|
||||||
updateCaption();
|
updateCaption();
|
||||||
|
|
||||||
if (m_captionSuffix == oldCaptionSuffix) {
|
if (m_captionSuffix == oldCaptionSuffix) {
|
||||||
emit captionChanged();
|
Q_EMIT captionChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
18
src/item.cpp
18
src/item.cpp
|
@ -53,7 +53,7 @@ void Item::setX(int x)
|
||||||
m_x = x;
|
m_x = x;
|
||||||
scheduleRepaint(boundingRect());
|
scheduleRepaint(boundingRect());
|
||||||
discardQuads();
|
discardQuads();
|
||||||
emit xChanged();
|
Q_EMIT xChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Item::y() const
|
int Item::y() const
|
||||||
|
@ -70,7 +70,7 @@ void Item::setY(int y)
|
||||||
m_y = y;
|
m_y = y;
|
||||||
scheduleRepaint(boundingRect());
|
scheduleRepaint(boundingRect());
|
||||||
discardQuads();
|
discardQuads();
|
||||||
emit yChanged();
|
Q_EMIT yChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Item::width() const
|
int Item::width() const
|
||||||
|
@ -88,7 +88,7 @@ void Item::setWidth(int width)
|
||||||
updateBoundingRect();
|
updateBoundingRect();
|
||||||
scheduleRepaint(rect());
|
scheduleRepaint(rect());
|
||||||
discardQuads();
|
discardQuads();
|
||||||
emit widthChanged();
|
Q_EMIT widthChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Item::height() const
|
int Item::height() const
|
||||||
|
@ -106,7 +106,7 @@ void Item::setHeight(int height)
|
||||||
updateBoundingRect();
|
updateBoundingRect();
|
||||||
scheduleRepaint(rect());
|
scheduleRepaint(rect());
|
||||||
discardQuads();
|
discardQuads();
|
||||||
emit heightChanged();
|
Q_EMIT heightChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
Item *Item::parentItem() const
|
Item *Item::parentItem() const
|
||||||
|
@ -186,10 +186,10 @@ void Item::setPosition(const QPoint &point)
|
||||||
discardQuads();
|
discardQuads();
|
||||||
|
|
||||||
if (xDirty) {
|
if (xDirty) {
|
||||||
emit xChanged();
|
Q_EMIT xChanged();
|
||||||
}
|
}
|
||||||
if (yDirty) {
|
if (yDirty) {
|
||||||
emit yChanged();
|
Q_EMIT yChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -214,10 +214,10 @@ void Item::setSize(const QSize &size)
|
||||||
discardQuads();
|
discardQuads();
|
||||||
|
|
||||||
if (widthDirty) {
|
if (widthDirty) {
|
||||||
emit widthChanged();
|
Q_EMIT widthChanged();
|
||||||
}
|
}
|
||||||
if (heightDirty) {
|
if (heightDirty) {
|
||||||
emit heightChanged();
|
Q_EMIT heightChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ void Item::updateBoundingRect()
|
||||||
}
|
}
|
||||||
if (m_boundingRect != boundingRect) {
|
if (m_boundingRect != boundingRect) {
|
||||||
m_boundingRect = boundingRect;
|
m_boundingRect = boundingRect;
|
||||||
emit boundingRectChanged();
|
Q_EMIT boundingRectChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ bool EffectsModel::setData(const QModelIndex &index, const QVariant &value, int
|
||||||
EffectData &data = m_effects[index.row()];
|
EffectData &data = m_effects[index.row()];
|
||||||
data.status = Status(value.toInt());
|
data.status = Status(value.toInt());
|
||||||
data.changed = data.status != data.originalStatus;
|
data.changed = data.status != data.originalStatus;
|
||||||
emit dataChanged(index, index);
|
Q_EMIT dataChanged(index, index);
|
||||||
|
|
||||||
if (data.status == Status::Enabled && !data.exclusiveGroup.isEmpty()) {
|
if (data.status == Status::Enabled && !data.exclusiveGroup.isEmpty()) {
|
||||||
// need to disable all other exclusive effects in the same category
|
// need to disable all other exclusive effects in the same category
|
||||||
|
@ -212,7 +212,7 @@ bool EffectsModel::setData(const QModelIndex &index, const QVariant &value, int
|
||||||
if (otherData.exclusiveGroup == data.exclusiveGroup) {
|
if (otherData.exclusiveGroup == data.exclusiveGroup) {
|
||||||
otherData.status = Status::Disabled;
|
otherData.status = Status::Disabled;
|
||||||
otherData.changed = otherData.status != otherData.originalStatus;
|
otherData.changed = otherData.status != otherData.originalStatus;
|
||||||
emit dataChanged(this->index(i, 0), this->index(i, 0));
|
Q_EMIT dataChanged(this->index(i, 0), this->index(i, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -438,7 +438,7 @@ void EffectsModel::load(LoadOptions options)
|
||||||
m_pendingEffects.clear();
|
m_pendingEffects.clear();
|
||||||
endResetModel();
|
endResetModel();
|
||||||
|
|
||||||
emit loaded();
|
Q_EMIT loaded();
|
||||||
};
|
};
|
||||||
|
|
||||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"),
|
||||||
|
|
|
@ -76,7 +76,7 @@ void PreviewBridge::setPlugin(const QString &plugin)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_plugin = plugin;
|
m_plugin = plugin;
|
||||||
emit pluginChanged();
|
Q_EMIT pluginChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString PreviewBridge::theme() const
|
QString PreviewBridge::theme() const
|
||||||
|
@ -90,7 +90,7 @@ void PreviewBridge::setTheme(const QString &theme)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_theme = theme;
|
m_theme = theme;
|
||||||
emit themeChanged();
|
Q_EMIT themeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString PreviewBridge::plugin() const
|
QString PreviewBridge::plugin() const
|
||||||
|
@ -129,7 +129,7 @@ void PreviewBridge::setValid(bool valid)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_valid = valid;
|
m_valid = valid;
|
||||||
emit validChanged();
|
Q_EMIT validChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
Decoration *PreviewBridge::createDecoration(QObject *parent)
|
Decoration *PreviewBridge::createDecoration(QObject *parent)
|
||||||
|
@ -177,7 +177,7 @@ void PreviewBridge::configure(QQuickItem *ctx)
|
||||||
auto save = [this,kcm] {
|
auto save = [this,kcm] {
|
||||||
kcm->save();
|
kcm->save();
|
||||||
if (m_lastCreatedSettings) {
|
if (m_lastCreatedSettings) {
|
||||||
emit m_lastCreatedSettings->decorationSettings()->reconfigured();
|
Q_EMIT m_lastCreatedSettings->decorationSettings()->reconfigured();
|
||||||
}
|
}
|
||||||
// Send signal to all kwin instances
|
// Send signal to all kwin instances
|
||||||
QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/KWin"),
|
QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/KWin"),
|
||||||
|
|
|
@ -36,7 +36,7 @@ void PreviewButtonItem::setType(KDecoration2::DecorationButtonType type)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_type = type;
|
m_type = type;
|
||||||
emit typeChanged();
|
Q_EMIT typeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
KDecoration2::DecorationButtonType PreviewButtonItem::type() const
|
KDecoration2::DecorationButtonType PreviewButtonItem::type() const
|
||||||
|
@ -55,7 +55,7 @@ void PreviewButtonItem::setBridge(PreviewBridge *bridge)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_bridge = bridge;
|
m_bridge = bridge;
|
||||||
emit bridgeChanged();
|
Q_EMIT bridgeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings *PreviewButtonItem::settings() const
|
Settings *PreviewButtonItem::settings() const
|
||||||
|
@ -69,7 +69,7 @@ void PreviewButtonItem::setSettings(Settings *settings)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_settings = settings;
|
m_settings = settings;
|
||||||
emit settingsChanged();
|
Q_EMIT settingsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
int PreviewButtonItem::typeAsInt() const
|
int PreviewButtonItem::typeAsInt() const
|
||||||
|
|
|
@ -68,37 +68,37 @@ PreviewClient::PreviewClient(DecoratedClient *c, Decoration *decoration)
|
||||||
connect(this, &PreviewClient::paletteChanged, c, &DecoratedClient::paletteChanged);
|
connect(this, &PreviewClient::paletteChanged, c, &DecoratedClient::paletteChanged);
|
||||||
connect(this, &PreviewClient::maximizedVerticallyChanged, this,
|
connect(this, &PreviewClient::maximizedVerticallyChanged, this,
|
||||||
[this]() {
|
[this]() {
|
||||||
emit maximizedChanged(isMaximized());
|
Q_EMIT maximizedChanged(isMaximized());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(this, &PreviewClient::maximizedHorizontallyChanged, this,
|
connect(this, &PreviewClient::maximizedHorizontallyChanged, this,
|
||||||
[this]() {
|
[this]() {
|
||||||
emit maximizedChanged(isMaximized());
|
Q_EMIT maximizedChanged(isMaximized());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(this, &PreviewClient::iconNameChanged, this,
|
connect(this, &PreviewClient::iconNameChanged, this,
|
||||||
[this]() {
|
[this]() {
|
||||||
m_icon = QIcon::fromTheme(m_iconName);
|
m_icon = QIcon::fromTheme(m_iconName);
|
||||||
emit iconChanged(m_icon);
|
Q_EMIT iconChanged(m_icon);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(this, &PreviewClient::desktopChanged, this,
|
connect(this, &PreviewClient::desktopChanged, this,
|
||||||
[this]() {
|
[this]() {
|
||||||
emit onAllDesktopsChanged(isOnAllDesktops());
|
Q_EMIT onAllDesktopsChanged(isOnAllDesktops());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
connect(&m_palette, &KWin::Decoration::DecorationPalette::changed, [this]() {
|
connect(&m_palette, &KWin::Decoration::DecorationPalette::changed, [this]() {
|
||||||
emit paletteChanged(m_palette.palette());
|
Q_EMIT paletteChanged(m_palette.palette());
|
||||||
});
|
});
|
||||||
auto emitEdgesChanged = [this, c]() {
|
auto emitEdgesChanged = [this, c]() {
|
||||||
emit c->adjacentScreenEdgesChanged(adjacentScreenEdges());
|
Q_EMIT c->adjacentScreenEdgesChanged(adjacentScreenEdges());
|
||||||
};
|
};
|
||||||
connect(this, &PreviewClient::bordersTopEdgeChanged, this, emitEdgesChanged);
|
connect(this, &PreviewClient::bordersTopEdgeChanged, this, emitEdgesChanged);
|
||||||
connect(this, &PreviewClient::bordersLeftEdgeChanged, this, emitEdgesChanged);
|
connect(this, &PreviewClient::bordersLeftEdgeChanged, this, emitEdgesChanged);
|
||||||
connect(this, &PreviewClient::bordersRightEdgeChanged, this, emitEdgesChanged);
|
connect(this, &PreviewClient::bordersRightEdgeChanged, this, emitEdgesChanged);
|
||||||
connect(this, &PreviewClient::bordersBottomEdgeChanged, this, emitEdgesChanged);
|
connect(this, &PreviewClient::bordersBottomEdgeChanged, this, emitEdgesChanged);
|
||||||
auto emitSizeChanged = [c]() {
|
auto emitSizeChanged = [c]() {
|
||||||
emit c->sizeChanged(c->size());
|
Q_EMIT c->sizeChanged(c->size());
|
||||||
};
|
};
|
||||||
connect(this, &PreviewClient::widthChanged, this, emitSizeChanged);
|
connect(this, &PreviewClient::widthChanged, this, emitSizeChanged);
|
||||||
connect(this, &PreviewClient::heightChanged, this, emitSizeChanged);
|
connect(this, &PreviewClient::heightChanged, this, emitSizeChanged);
|
||||||
|
@ -111,7 +111,7 @@ PreviewClient::~PreviewClient() = default;
|
||||||
void PreviewClient::setIcon(const QIcon &pixmap)
|
void PreviewClient::setIcon(const QIcon &pixmap)
|
||||||
{
|
{
|
||||||
m_icon = pixmap;
|
m_icon = pixmap;
|
||||||
emit iconChanged(m_icon);
|
Q_EMIT iconChanged(m_icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
int PreviewClient::width() const
|
int PreviewClient::width() const
|
||||||
|
@ -153,7 +153,7 @@ void PreviewClient::setDesktop(int desktop)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_desktop = desktop;
|
m_desktop = desktop;
|
||||||
emit desktopChanged(m_desktop);
|
Q_EMIT desktopChanged(m_desktop);
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon PreviewClient::icon() const
|
QIcon PreviewClient::icon() const
|
||||||
|
@ -315,7 +315,7 @@ void PreviewClient::setBordersBottomEdge(bool enabled)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_bordersBottomEdge = enabled;
|
m_bordersBottomEdge = enabled;
|
||||||
emit bordersBottomEdgeChanged(enabled);
|
Q_EMIT bordersBottomEdgeChanged(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewClient::setBordersLeftEdge(bool enabled)
|
void PreviewClient::setBordersLeftEdge(bool enabled)
|
||||||
|
@ -324,7 +324,7 @@ void PreviewClient::setBordersLeftEdge(bool enabled)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_bordersLeftEdge = enabled;
|
m_bordersLeftEdge = enabled;
|
||||||
emit bordersLeftEdgeChanged(enabled);
|
Q_EMIT bordersLeftEdgeChanged(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewClient::setBordersRightEdge(bool enabled)
|
void PreviewClient::setBordersRightEdge(bool enabled)
|
||||||
|
@ -333,7 +333,7 @@ void PreviewClient::setBordersRightEdge(bool enabled)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_bordersRightEdge = enabled;
|
m_bordersRightEdge = enabled;
|
||||||
emit bordersRightEdgeChanged(enabled);
|
Q_EMIT bordersRightEdgeChanged(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewClient::setBordersTopEdge(bool enabled)
|
void PreviewClient::setBordersTopEdge(bool enabled)
|
||||||
|
@ -342,7 +342,7 @@ void PreviewClient::setBordersTopEdge(bool enabled)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_bordersTopEdge = enabled;
|
m_bordersTopEdge = enabled;
|
||||||
emit bordersTopEdgeChanged(enabled);
|
Q_EMIT bordersTopEdgeChanged(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewClient::requestShowToolTip(const QString &text)
|
void PreviewClient::requestShowToolTip(const QString &text)
|
||||||
|
@ -356,7 +356,7 @@ void PreviewClient::requestHideToolTip()
|
||||||
|
|
||||||
void PreviewClient::requestClose()
|
void PreviewClient::requestClose()
|
||||||
{
|
{
|
||||||
emit closeRequested();
|
Q_EMIT closeRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewClient::requestContextHelp()
|
void PreviewClient::requestContextHelp()
|
||||||
|
@ -378,7 +378,7 @@ void PreviewClient::requestToggleMaximization(Qt::MouseButtons buttons)
|
||||||
|
|
||||||
void PreviewClient::requestMinimize()
|
void PreviewClient::requestMinimize()
|
||||||
{
|
{
|
||||||
emit minimizeRequested();
|
Q_EMIT minimizeRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewClient::requestToggleKeepAbove()
|
void PreviewClient::requestToggleKeepAbove()
|
||||||
|
@ -394,7 +394,7 @@ void PreviewClient::requestToggleKeepBelow()
|
||||||
void PreviewClient::requestShowWindowMenu(const QRect &rect)
|
void PreviewClient::requestShowWindowMenu(const QRect &rect)
|
||||||
{
|
{
|
||||||
Q_UNUSED(rect)
|
Q_UNUSED(rect)
|
||||||
emit showWindowMenuRequested();
|
Q_EMIT showWindowMenuRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewClient::requestShowApplicationMenu(const QRect &rect, int actionId)
|
void PreviewClient::requestShowApplicationMenu(const QRect &rect, int actionId)
|
||||||
|
@ -425,7 +425,7 @@ void PreviewClient::name(type variable) \
|
||||||
return; \
|
return; \
|
||||||
} \
|
} \
|
||||||
m_##variable = variable; \
|
m_##variable = variable; \
|
||||||
emit variable##Changed(m_##variable); \
|
Q_EMIT variable##Changed(m_##variable); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SETTER2(name, variable) SETTER(bool, name, variable)
|
#define SETTER2(name, variable) SETTER(bool, name, variable)
|
||||||
|
|
|
@ -86,7 +86,7 @@ void PreviewItem::setDecoration(Decoration *deco)
|
||||||
connect(m_decoration, &Decoration::shadowChanged, this, &PreviewItem::syncSize);
|
connect(m_decoration, &Decoration::shadowChanged, this, &PreviewItem::syncSize);
|
||||||
connect(m_decoration, &Decoration::shadowChanged, this, &PreviewItem::shadowChanged);
|
connect(m_decoration, &Decoration::shadowChanged, this, &PreviewItem::shadowChanged);
|
||||||
connect(m_decoration, &Decoration::damaged, this, [this]() { update(); });
|
connect(m_decoration, &Decoration::damaged, this, [this]() { update(); });
|
||||||
emit decorationChanged(m_decoration);
|
Q_EMIT decorationChanged(m_decoration);
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor PreviewItem::windowColor() const
|
QColor PreviewItem::windowColor() const
|
||||||
|
@ -100,7 +100,7 @@ void PreviewItem::setWindowColor(const QColor &color)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_windowColor = color;
|
m_windowColor = color;
|
||||||
emit windowColorChanged(m_windowColor);
|
Q_EMIT windowColorChanged(m_windowColor);
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,7 +381,7 @@ void PreviewItem::setDrawingBackground(bool set)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_drawBackground = set;
|
m_drawBackground = set;
|
||||||
emit drawingBackgroundChanged(set);
|
Q_EMIT drawingBackgroundChanged(set);
|
||||||
}
|
}
|
||||||
|
|
||||||
PreviewBridge *PreviewItem::bridge() const
|
PreviewBridge *PreviewItem::bridge() const
|
||||||
|
@ -401,7 +401,7 @@ void PreviewItem::setBridge(PreviewBridge *bridge)
|
||||||
if (m_bridge) {
|
if (m_bridge) {
|
||||||
m_bridge->registerPreviewItem(this);
|
m_bridge->registerPreviewItem(this);
|
||||||
}
|
}
|
||||||
emit bridgeChanged();
|
Q_EMIT bridgeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings *PreviewItem::settings() const
|
Settings *PreviewItem::settings() const
|
||||||
|
@ -415,7 +415,7 @@ void PreviewItem::setSettings(Settings *settings)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_settings = settings;
|
m_settings = settings;
|
||||||
emit settingsChanged();
|
Q_EMIT settingsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
PreviewClient *PreviewItem::client()
|
PreviewClient *PreviewItem::client()
|
||||||
|
|
|
@ -88,10 +88,10 @@ PreviewSettings::PreviewSettings(DecorationSettings *parent)
|
||||||
connect(this, &PreviewSettings::closeOnDoubleClickOnMenuChanged, parent, &DecorationSettings::closeOnDoubleClickOnMenuChanged);
|
connect(this, &PreviewSettings::closeOnDoubleClickOnMenuChanged, parent, &DecorationSettings::closeOnDoubleClickOnMenuChanged);
|
||||||
connect(this, &PreviewSettings::fontChanged, parent, &DecorationSettings::fontChanged);
|
connect(this, &PreviewSettings::fontChanged, parent, &DecorationSettings::fontChanged);
|
||||||
auto updateLeft = [this, parent]() {
|
auto updateLeft = [this, parent]() {
|
||||||
emit parent->decorationButtonsLeftChanged(decorationButtonsLeft());
|
Q_EMIT parent->decorationButtonsLeftChanged(decorationButtonsLeft());
|
||||||
};
|
};
|
||||||
auto updateRight = [this, parent]() {
|
auto updateRight = [this, parent]() {
|
||||||
emit parent->decorationButtonsRightChanged(decorationButtonsRight());
|
Q_EMIT parent->decorationButtonsRightChanged(decorationButtonsRight());
|
||||||
};
|
};
|
||||||
connect(m_leftButtons, &QAbstractItemModel::rowsRemoved, this, updateLeft);
|
connect(m_leftButtons, &QAbstractItemModel::rowsRemoved, this, updateLeft);
|
||||||
connect(m_leftButtons, &QAbstractItemModel::rowsMoved, this, updateLeft);
|
connect(m_leftButtons, &QAbstractItemModel::rowsMoved, this, updateLeft);
|
||||||
|
@ -134,7 +134,7 @@ void PreviewSettings::setAlphaChannelSupported(bool supported)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_alphaChannelSupported = supported;
|
m_alphaChannelSupported = supported;
|
||||||
emit alphaChannelSupportedChanged(m_alphaChannelSupported);
|
Q_EMIT alphaChannelSupportedChanged(m_alphaChannelSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewSettings::setOnAllDesktopsAvailable(bool available)
|
void PreviewSettings::setOnAllDesktopsAvailable(bool available)
|
||||||
|
@ -143,7 +143,7 @@ void PreviewSettings::setOnAllDesktopsAvailable(bool available)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_onAllDesktopsAvailable = available;
|
m_onAllDesktopsAvailable = available;
|
||||||
emit onAllDesktopsAvailableChanged(m_onAllDesktopsAvailable);
|
Q_EMIT onAllDesktopsAvailableChanged(m_onAllDesktopsAvailable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewSettings::setCloseOnDoubleClickOnMenu(bool enabled)
|
void PreviewSettings::setCloseOnDoubleClickOnMenu(bool enabled)
|
||||||
|
@ -152,7 +152,7 @@ void PreviewSettings::setCloseOnDoubleClickOnMenu(bool enabled)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_closeOnDoubleClick = enabled;
|
m_closeOnDoubleClick = enabled;
|
||||||
emit closeOnDoubleClickOnMenuChanged(enabled);
|
Q_EMIT closeOnDoubleClickOnMenuChanged(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector< DecorationButtonType > PreviewSettings::decorationButtonsLeft() const
|
QVector< DecorationButtonType > PreviewSettings::decorationButtonsLeft() const
|
||||||
|
@ -189,8 +189,8 @@ void PreviewSettings::setBorderSizesIndex(int index)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_borderSize = index;
|
m_borderSize = index;
|
||||||
emit borderSizesIndexChanged(index);
|
Q_EMIT borderSizesIndexChanged(index);
|
||||||
emit decorationSettings()->borderSizeChanged(borderSize());
|
Q_EMIT decorationSettings()->borderSizeChanged(borderSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
BorderSize PreviewSettings::borderSize() const
|
BorderSize PreviewSettings::borderSize() const
|
||||||
|
@ -204,7 +204,7 @@ void PreviewSettings::setFont(const QFont &font)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_font = font;
|
m_font = font;
|
||||||
emit fontChanged(m_font);
|
Q_EMIT fontChanged(m_font);
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings::Settings(QObject *parent)
|
Settings::Settings(QObject *parent)
|
||||||
|
@ -221,7 +221,7 @@ void Settings::setBridge(PreviewBridge *bridge)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_bridge = bridge;
|
m_bridge = bridge;
|
||||||
emit bridgeChanged();
|
Q_EMIT bridgeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
PreviewBridge *Settings::bridge() const
|
PreviewBridge *Settings::bridge() const
|
||||||
|
@ -239,7 +239,7 @@ void Settings::createSettings()
|
||||||
m_previewSettings->setBorderSizesIndex(m_borderSize);
|
m_previewSettings->setBorderSizesIndex(m_borderSize);
|
||||||
connect(this, &Settings::borderSizesIndexChanged, m_previewSettings, &PreviewSettings::setBorderSizesIndex);
|
connect(this, &Settings::borderSizesIndexChanged, m_previewSettings, &PreviewSettings::setBorderSizesIndex);
|
||||||
}
|
}
|
||||||
emit settingsChanged();
|
Q_EMIT settingsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QSharedPointer<DecorationSettings> Settings::settings() const
|
QSharedPointer<DecorationSettings> Settings::settings() const
|
||||||
|
@ -258,7 +258,7 @@ void Settings::setBorderSizesIndex(int index)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_borderSize = index;
|
m_borderSize = index;
|
||||||
emit borderSizesIndexChanged(m_borderSize);
|
Q_EMIT borderSizesIndexChanged(m_borderSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ void KCMKWinDecoration::load()
|
||||||
|
|
||||||
setBorderSize(borderSizeIndexFromString(settings()->borderSize()));
|
setBorderSize(borderSizeIndexFromString(settings()->borderSize()));
|
||||||
|
|
||||||
emit themeChanged();
|
Q_EMIT themeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void KCMKWinDecoration::save()
|
void KCMKWinDecoration::save()
|
||||||
|
@ -225,7 +225,7 @@ void KCMKWinDecoration::setBorderSize(int index)
|
||||||
{
|
{
|
||||||
if (m_borderSizeIndex != index) {
|
if (m_borderSizeIndex != index) {
|
||||||
m_borderSizeIndex = index;
|
m_borderSizeIndex = index;
|
||||||
emit borderSizeChanged();
|
Q_EMIT borderSizeChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ void KCMKWinDecoration::setTheme(int index)
|
||||||
if (dataIndex.isValid()) {
|
if (dataIndex.isValid()) {
|
||||||
settings()->setTheme(m_proxyThemesModel->data(dataIndex, KDecoration2::Configuration::DecorationsModel::ThemeNameRole).toString());
|
settings()->setTheme(m_proxyThemesModel->data(dataIndex, KDecoration2::Configuration::DecorationsModel::ThemeNameRole).toString());
|
||||||
settings()->setPluginName(m_proxyThemesModel->data(dataIndex, KDecoration2::Configuration::DecorationsModel::PluginNameRole).toString());
|
settings()->setPluginName(m_proxyThemesModel->data(dataIndex, KDecoration2::Configuration::DecorationsModel::PluginNameRole).toString());
|
||||||
emit themeChanged();
|
Q_EMIT themeChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ AnimationsModel::AnimationsModel(QObject *parent)
|
||||||
const bool configurable = index_.data(ConfigurableRole).toBool();
|
const bool configurable = index_.data(ConfigurableRole).toBool();
|
||||||
if (configurable != m_currentConfigurable) {
|
if (configurable != m_currentConfigurable) {
|
||||||
m_currentConfigurable = configurable;
|
m_currentConfigurable = configurable;
|
||||||
emit currentConfigurableChanged();
|
Q_EMIT currentConfigurableChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -48,7 +48,7 @@ void AnimationsModel::setAnimationEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
if (m_animationEnabled != enabled) {
|
if (m_animationEnabled != enabled) {
|
||||||
m_animationEnabled = enabled;
|
m_animationEnabled = enabled;
|
||||||
emit animationEnabledChanged();
|
Q_EMIT animationEnabledChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ void AnimationsModel::setAnimationIndex(int index)
|
||||||
{
|
{
|
||||||
if (m_animationIndex != index) {
|
if (m_animationIndex != index) {
|
||||||
m_animationIndex = index;
|
m_animationIndex = index;
|
||||||
emit animationIndexChanged();
|
Q_EMIT animationIndexChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,8 +98,8 @@ void AnimationsModel::loadDefaults()
|
||||||
if (rowIndex.data(EnabledByDefaultRole).toBool()) {
|
if (rowIndex.data(EnabledByDefaultRole).toBool()) {
|
||||||
m_defaultAnimationEnabled = true;
|
m_defaultAnimationEnabled = true;
|
||||||
m_defaultAnimationIndex = i;
|
m_defaultAnimationIndex = i;
|
||||||
emit defaultAnimationEnabledChanged();
|
Q_EMIT defaultAnimationEnabledChanged();
|
||||||
emit defaultAnimationIndexChanged();
|
Q_EMIT defaultAnimationIndexChanged();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,8 +171,8 @@ void DesktopsModel::setRows(int rows)
|
||||||
if (m_rows != rows) {
|
if (m_rows != rows) {
|
||||||
m_rows = rows;
|
m_rows = rows;
|
||||||
|
|
||||||
emit rowsChanged();
|
Q_EMIT rowsChanged();
|
||||||
emit dataChanged(index(0, 0), index(m_desktops.count() - 1, 0), QVector<int>{DesktopRow});
|
Q_EMIT dataChanged(index(0, 0), index(m_desktops.count() - 1, 0), QVector<int>{DesktopRow});
|
||||||
|
|
||||||
updateModifiedState();
|
updateModifiedState();
|
||||||
}
|
}
|
||||||
|
@ -197,7 +197,7 @@ void DesktopsModel::createDesktop(const QString &name)
|
||||||
m_names[dummyId] = name;
|
m_names[dummyId] = name;
|
||||||
|
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
emit desktopCountChanged();
|
Q_EMIT desktopCountChanged();
|
||||||
|
|
||||||
updateModifiedState();
|
updateModifiedState();
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ void DesktopsModel::removeDesktop(const QString &id)
|
||||||
m_names.remove(id);
|
m_names.remove(id);
|
||||||
|
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
emit desktopCountChanged();
|
Q_EMIT desktopCountChanged();
|
||||||
|
|
||||||
updateModifiedState();
|
updateModifiedState();
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,7 @@ void DesktopsModel::setDesktopName(const QString &id, const QString &name)
|
||||||
|
|
||||||
const QModelIndex &idx = index(m_desktops.indexOf(id), 0);
|
const QModelIndex &idx = index(m_desktops.indexOf(id), 0);
|
||||||
|
|
||||||
emit dataChanged(idx, idx, QVector<int>{Qt::DisplayRole});
|
Q_EMIT dataChanged(idx, idx, QVector<int>{Qt::DisplayRole});
|
||||||
|
|
||||||
updateModifiedState();
|
updateModifiedState();
|
||||||
}
|
}
|
||||||
|
@ -308,7 +308,7 @@ void DesktopsModel::syncWithServer()
|
||||||
m_names[newId] = m_names.take(oldId);
|
m_names[newId] = m_names.take(oldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int>{Qt::DisplayRole});
|
Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int>{Qt::DisplayRole});
|
||||||
|
|
||||||
// Sync names.
|
// Sync names.
|
||||||
if (m_names != m_serverSideNames) {
|
if (m_names != m_serverSideNames) {
|
||||||
|
@ -440,7 +440,7 @@ void DesktopsModel::getAllAndConnect(const QDBusMessage &msg)
|
||||||
|| m_serverSideRows != newServerSideRows) {
|
|| m_serverSideRows != newServerSideRows) {
|
||||||
if (!m_serverSideDesktops.isEmpty() || m_userModified) {
|
if (!m_serverSideDesktops.isEmpty() || m_userModified) {
|
||||||
m_serverModified = true;
|
m_serverModified = true;
|
||||||
emit serverModifiedChanged();
|
Q_EMIT serverModifiedChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_serverSideDesktops = newServerSideDesktops;
|
m_serverSideDesktops = newServerSideDesktops;
|
||||||
|
@ -460,11 +460,11 @@ void DesktopsModel::getAllAndConnect(const QDBusMessage &msg)
|
||||||
endResetModel();
|
endResetModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
emit readyChanged();
|
Q_EMIT readyChanged();
|
||||||
|
|
||||||
auto handleConnectionError = [this]() {
|
auto handleConnectionError = [this]() {
|
||||||
m_error = i18n("There was an error connecting to the compositor.");
|
m_error = i18n("There was an error connecting to the compositor.");
|
||||||
emit errorChanged();
|
Q_EMIT errorChanged();
|
||||||
};
|
};
|
||||||
|
|
||||||
bool connected = QDBusConnection::sessionBus().connect(
|
bool connected = QDBusConnection::sessionBus().connect(
|
||||||
|
@ -544,7 +544,7 @@ void DesktopsModel::desktopCreated(const QString &id, const KWin::DBusDesktopDat
|
||||||
m_names.remove(dummyId);
|
m_names.remove(dummyId);
|
||||||
m_names[id] = data.name;
|
m_names[id] = data.name;
|
||||||
const QModelIndex &idx = index(data.position, 0);
|
const QModelIndex &idx = index(data.position, 0);
|
||||||
emit dataChanged(idx, idx, QVector<int>{Id});
|
Q_EMIT dataChanged(idx, idx, QVector<int>{Id});
|
||||||
|
|
||||||
updateModifiedState(/* server */ true);
|
updateModifiedState(/* server */ true);
|
||||||
}
|
}
|
||||||
|
@ -584,7 +584,7 @@ void DesktopsModel::desktopDataChanged(const QString &id, const KWin::DBusDeskto
|
||||||
|
|
||||||
const QModelIndex &idx = index(desktopIndex, 0);
|
const QModelIndex &idx = index(desktopIndex, 0);
|
||||||
|
|
||||||
emit dataChanged(idx, idx, QVector<int>{Qt::DisplayRole});
|
Q_EMIT dataChanged(idx, idx, QVector<int>{Qt::DisplayRole});
|
||||||
} else {
|
} else {
|
||||||
updateModifiedState(/* server */ true);
|
updateModifiedState(/* server */ true);
|
||||||
}
|
}
|
||||||
|
@ -603,8 +603,8 @@ void DesktopsModel::desktopRowsChanged(uint rows)
|
||||||
if (!m_userModified) {
|
if (!m_userModified) {
|
||||||
m_rows = m_serverSideRows;
|
m_rows = m_serverSideRows;
|
||||||
|
|
||||||
emit rowsChanged();
|
Q_EMIT rowsChanged();
|
||||||
emit dataChanged(index(0, 0), index(m_desktops.count() - 1, 0), QVector<int>{DesktopRow});
|
Q_EMIT dataChanged(index(0, 0), index(m_desktops.count() - 1, 0), QVector<int>{DesktopRow});
|
||||||
} else {
|
} else {
|
||||||
updateModifiedState(/* server */ true);
|
updateModifiedState(/* server */ true);
|
||||||
}
|
}
|
||||||
|
@ -627,7 +627,7 @@ void DesktopsModel::updateModifiedState(bool server)
|
||||||
m_names[newId] = m_names.take(oldId);
|
m_names[newId] = m_names.take(oldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int>{Qt::DisplayRole});
|
Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, 0), QVector<int>{Qt::DisplayRole});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_desktops == m_serverSideDesktops
|
if (m_desktops == m_serverSideDesktops
|
||||||
|
@ -635,22 +635,22 @@ void DesktopsModel::updateModifiedState(bool server)
|
||||||
&& m_rows == m_serverSideRows) {
|
&& m_rows == m_serverSideRows) {
|
||||||
|
|
||||||
m_userModified = false;
|
m_userModified = false;
|
||||||
emit userModifiedChanged();
|
Q_EMIT userModifiedChanged();
|
||||||
|
|
||||||
m_serverModified = false;
|
m_serverModified = false;
|
||||||
emit serverModifiedChanged();
|
Q_EMIT serverModifiedChanged();
|
||||||
} else {
|
} else {
|
||||||
if (m_pendingCalls > 0) {
|
if (m_pendingCalls > 0) {
|
||||||
m_serverModified = false;
|
m_serverModified = false;
|
||||||
emit serverModifiedChanged();
|
Q_EMIT serverModifiedChanged();
|
||||||
|
|
||||||
syncWithServer();
|
syncWithServer();
|
||||||
} else if (server) {
|
} else if (server) {
|
||||||
m_serverModified = true;
|
m_serverModified = true;
|
||||||
emit serverModifiedChanged();
|
Q_EMIT serverModifiedChanged();
|
||||||
} else {
|
} else {
|
||||||
m_userModified = true;
|
m_userModified = true;
|
||||||
emit userModifiedChanged();
|
Q_EMIT userModifiedChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -660,13 +660,13 @@ void DesktopsModel::handleCallError()
|
||||||
if (m_pendingCalls > 0) {
|
if (m_pendingCalls > 0) {
|
||||||
|
|
||||||
m_serverModified = false;
|
m_serverModified = false;
|
||||||
emit serverModifiedChanged();
|
Q_EMIT serverModifiedChanged();
|
||||||
|
|
||||||
m_error = i18n("There was an error saving the settings to the compositor.");
|
m_error = i18n("There was an error saving the settings to the compositor.");
|
||||||
emit errorChanged();
|
Q_EMIT errorChanged();
|
||||||
} else {
|
} else {
|
||||||
m_error = i18n("There was an error requesting information from the compositor.");
|
m_error = i18n("There was an error requesting information from the compositor.");
|
||||||
emit errorChanged();
|
Q_EMIT errorChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ void EffectsFilterProxyModel::setQuery(const QString &query)
|
||||||
{
|
{
|
||||||
if (m_query != query) {
|
if (m_query != query) {
|
||||||
m_query = query;
|
m_query = query;
|
||||||
emit queryChanged();
|
Q_EMIT queryChanged();
|
||||||
invalidateFilter();
|
invalidateFilter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ void EffectsFilterProxyModel::setExcludeInternal(bool exclude)
|
||||||
{
|
{
|
||||||
if (m_excludeInternal != exclude) {
|
if (m_excludeInternal != exclude) {
|
||||||
m_excludeInternal = exclude;
|
m_excludeInternal = exclude;
|
||||||
emit excludeInternalChanged();
|
Q_EMIT excludeInternalChanged();
|
||||||
invalidateFilter();
|
invalidateFilter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ void EffectsFilterProxyModel::setExcludeUnsupported(bool exclude)
|
||||||
{
|
{
|
||||||
if (m_excludeUnsupported != exclude) {
|
if (m_excludeUnsupported != exclude) {
|
||||||
m_excludeUnsupported = exclude;
|
m_excludeUnsupported = exclude;
|
||||||
emit excludeUnsupportedChanged();
|
Q_EMIT excludeUnsupportedChanged();
|
||||||
invalidateFilter();
|
invalidateFilter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,7 +224,7 @@ void KActionsOptions::save()
|
||||||
mTitleBarActions->save();
|
mTitleBarActions->save();
|
||||||
mWindowActions->save();
|
mWindowActions->save();
|
||||||
|
|
||||||
emit KCModule::changed(false);
|
Q_EMIT KCModule::changed(false);
|
||||||
// Send signal to all kwin instances
|
// Send signal to all kwin instances
|
||||||
QDBusMessage message =
|
QDBusMessage message =
|
||||||
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
|
||||||
|
@ -239,7 +239,7 @@ void KActionsOptions::defaults()
|
||||||
|
|
||||||
void KActionsOptions::moduleChanged(bool state)
|
void KActionsOptions::moduleChanged(bool state)
|
||||||
{
|
{
|
||||||
emit KCModule::changed(state);
|
Q_EMIT KCModule::changed(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
K_PLUGIN_FACTORY_DEFINITION(KWinOptionsFactory,
|
K_PLUGIN_FACTORY_DEFINITION(KWinOptionsFactory,
|
||||||
|
|
|
@ -116,7 +116,7 @@ void KCMKWinRules::load()
|
||||||
createRuleFromProperties();
|
createRuleFromProperties();
|
||||||
} else {
|
} else {
|
||||||
m_editIndex = QModelIndex();
|
m_editIndex = QModelIndex();
|
||||||
emit editIndexChanged();
|
Q_EMIT editIndexChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_alreadyLoaded = true;
|
m_alreadyLoaded = true;
|
||||||
|
@ -136,7 +136,7 @@ void KCMKWinRules::save()
|
||||||
void KCMKWinRules::updateNeedsSave()
|
void KCMKWinRules::updateNeedsSave()
|
||||||
{
|
{
|
||||||
setNeedsSave(m_ruleBookModel->isSaveNeeded());
|
setNeedsSave(m_ruleBookModel->isSaveNeeded());
|
||||||
emit needsSaveChanged();
|
Q_EMIT needsSaveChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void KCMKWinRules::createRuleFromProperties()
|
void KCMKWinRules::createRuleFromProperties()
|
||||||
|
@ -191,7 +191,7 @@ void KCMKWinRules::editRule(int index)
|
||||||
}
|
}
|
||||||
|
|
||||||
m_editIndex = m_ruleBookModel->index(index);
|
m_editIndex = m_ruleBookModel->index(index);
|
||||||
emit editIndexChanged();
|
Q_EMIT editIndexChanged();
|
||||||
|
|
||||||
m_rulesModel->setSettings(m_ruleBookModel->ruleSettingsAt(m_editIndex.row()));
|
m_rulesModel->setSettings(m_ruleBookModel->ruleSettingsAt(m_editIndex.row()));
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ void KCMKWinRules::removeRule(int index)
|
||||||
|
|
||||||
m_ruleBookModel->removeRow(index);
|
m_ruleBookModel->removeRow(index);
|
||||||
|
|
||||||
emit editIndexChanged();
|
Q_EMIT editIndexChanged();
|
||||||
updateNeedsSave();
|
updateNeedsSave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ void KCMKWinRules::moveRule(int sourceIndex, int destIndex)
|
||||||
|
|
||||||
m_ruleBookModel->moveRow(QModelIndex(), sourceIndex, QModelIndex(), destIndex);
|
m_ruleBookModel->moveRow(QModelIndex(), sourceIndex, QModelIndex(), destIndex);
|
||||||
|
|
||||||
emit editIndexChanged();
|
Q_EMIT editIndexChanged();
|
||||||
updateNeedsSave();
|
updateNeedsSave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,14 +38,14 @@ public:
|
||||||
Q_INVOKABLE void exportToFile(const QUrl &path, const QList<int> &indexes);
|
Q_INVOKABLE void exportToFile(const QUrl &path, const QList<int> &indexes);
|
||||||
Q_INVOKABLE void importFromFile(const QUrl &path);
|
Q_INVOKABLE void importFromFile(const QUrl &path);
|
||||||
|
|
||||||
public slots:
|
public Q_SLOTS:
|
||||||
void load() override;
|
void load() override;
|
||||||
void save() override;
|
void save() override;
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void editIndexChanged();
|
void editIndexChanged();
|
||||||
|
|
||||||
private slots:
|
private Q_SLOTS:
|
||||||
void updateNeedsSave();
|
void updateNeedsSave();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -94,14 +94,14 @@ void OptionsModel::setValue(QVariant value)
|
||||||
int index = indexOf(value);
|
int index = indexOf(value);
|
||||||
if (index >= 0 && index != m_index) {
|
if (index >= 0 && index != m_index) {
|
||||||
m_index = index;
|
m_index = index;
|
||||||
emit selectedIndexChanged(index);
|
Q_EMIT selectedIndexChanged(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionsModel::resetValue()
|
void OptionsModel::resetValue()
|
||||||
{
|
{
|
||||||
m_index = 0;
|
m_index = 0;
|
||||||
emit selectedIndexChanged(m_index);
|
Q_EMIT selectedIndexChanged(m_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionsModel::updateModelData(const QList<Data> &data) {
|
void OptionsModel::updateModelData(const QList<Data> &data) {
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
Q_INVOKABLE QString textOfValue(const QVariant &value) const;
|
Q_INVOKABLE QString textOfValue(const QVariant &value) const;
|
||||||
int selectedIndex() const;
|
int selectedIndex() const;
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void selectedIndexChanged(int index);
|
void selectedIndexChanged(int index);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -153,7 +153,7 @@ void RuleBookModel::setDescriptionAt(int row, const QString &description)
|
||||||
|
|
||||||
m_ruleBook->ruleSettingsAt(row)->setDescription(description);
|
m_ruleBook->ruleSettingsAt(row)->setDescription(description);
|
||||||
|
|
||||||
emit dataChanged(index(row), index(row), {});
|
Q_EMIT dataChanged(index(row), index(row), {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuleBookModel::setRuleSettingsAt(int row, const RuleSettings &settings)
|
void RuleBookModel::setRuleSettingsAt(int row, const RuleSettings &settings)
|
||||||
|
@ -162,7 +162,7 @@ void RuleBookModel::setRuleSettingsAt(int row, const RuleSettings &settings)
|
||||||
|
|
||||||
copySettingsTo(ruleSettingsAt(row), settings);
|
copySettingsTo(ruleSettingsAt(row), settings);
|
||||||
|
|
||||||
emit dataChanged(index(row), index(row), {});
|
Q_EMIT dataChanged(index(row), index(row), {});
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuleBookModel::load()
|
void RuleBookModel::load()
|
||||||
|
|
|
@ -156,12 +156,12 @@ bool RulesModel::setData(const QModelIndex &index, const QVariant &value, int ro
|
||||||
|
|
||||||
writeToSettings(rule);
|
writeToSettings(rule);
|
||||||
|
|
||||||
emit dataChanged(index, index, QVector<int>{role});
|
Q_EMIT dataChanged(index, index, QVector<int>{role});
|
||||||
if (rule->hasFlag(RuleItem::AffectsDescription)) {
|
if (rule->hasFlag(RuleItem::AffectsDescription)) {
|
||||||
emit descriptionChanged();
|
Q_EMIT descriptionChanged();
|
||||||
}
|
}
|
||||||
if (rule->hasFlag(RuleItem::AffectsWarning)) {
|
if (rule->hasFlag(RuleItem::AffectsWarning)) {
|
||||||
emit warningMessagesChanged();
|
Q_EMIT warningMessagesChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -325,8 +325,8 @@ void RulesModel::setSettings(RuleSettings *settings)
|
||||||
|
|
||||||
endResetModel();
|
endResetModel();
|
||||||
|
|
||||||
emit descriptionChanged();
|
Q_EMIT descriptionChanged();
|
||||||
emit warningMessagesChanged();
|
Q_EMIT warningMessagesChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RulesModel::writeToSettings(RuleItem *rule)
|
void RulesModel::writeToSettings(RuleItem *rule)
|
||||||
|
@ -704,7 +704,7 @@ void RulesModel::setSuggestedProperties(const QVariantMap &info)
|
||||||
m_rules[ruleKey]->setSuggestedValue(info.value(property));
|
m_rules[ruleKey]->setSuggestedValue(info.value(property));
|
||||||
}
|
}
|
||||||
|
|
||||||
emit dataChanged(index(0), index(rowCount()-1), {RulesModel::SuggestedValueRole});
|
Q_EMIT dataChanged(index(0), index(rowCount()-1), {RulesModel::SuggestedValueRole});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -836,13 +836,13 @@ void RulesModel::selectX11Window()
|
||||||
self->deleteLater();
|
self->deleteLater();
|
||||||
if (!reply.isValid()) {
|
if (!reply.isValid()) {
|
||||||
if (reply.error().name() == QLatin1String("org.kde.KWin.Error.InvalidWindow")) {
|
if (reply.error().name() == QLatin1String("org.kde.KWin.Error.InvalidWindow")) {
|
||||||
emit showErrorMessage(i18n("Could not detect window properties. The window is not managed by KWin."));
|
Q_EMIT showErrorMessage(i18n("Could not detect window properties. The window is not managed by KWin."));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const QVariantMap windowInfo = reply.value();
|
const QVariantMap windowInfo = reply.value();
|
||||||
setSuggestedProperties(windowInfo);
|
setSuggestedProperties(windowInfo);
|
||||||
emit showSuggestions();
|
Q_EMIT showSuggestions();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -869,7 +869,7 @@ void RulesModel::updateVirtualDesktops()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_virtualDesktops = qdbus_cast<KWin::DBusDesktopDataVector>(reply.value());
|
m_virtualDesktops = qdbus_cast<KWin::DBusDesktopDataVector>(reply.value());
|
||||||
emit virtualDesktopsUpdated();
|
Q_EMIT virtualDesktopsUpdated();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ public:
|
||||||
|
|
||||||
Q_INVOKABLE void detectWindowProperties(int miliseconds);
|
Q_INVOKABLE void detectWindowProperties(int miliseconds);
|
||||||
|
|
||||||
signals:
|
Q_SIGNALS:
|
||||||
void descriptionChanged();
|
void descriptionChanged();
|
||||||
void warningMessagesChanged();
|
void warningMessagesChanged();
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ private:
|
||||||
QList<OptionsModel::Data> focusModelData() const;
|
QList<OptionsModel::Data> focusModelData() const;
|
||||||
QList<OptionsModel::Data> colorSchemesModelData() const;
|
QList<OptionsModel::Data> colorSchemesModelData() const;
|
||||||
|
|
||||||
private slots:
|
private Q_SLOTS:
|
||||||
void selectX11Window();
|
void selectX11Window();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -192,13 +192,13 @@ void KWinScreenEdge::onChanged()
|
||||||
for (auto it = m_reference.cbegin(); it != m_reference.cend(); ++it) {
|
for (auto it = m_reference.cbegin(); it != m_reference.cend(); ++it) {
|
||||||
needSave |= it.value() != monitor()->selectedEdgeItem(KWinScreenEdge::electricBorderToMonitorEdge(it.key()));
|
needSave |= it.value() != monitor()->selectedEdgeItem(KWinScreenEdge::electricBorderToMonitorEdge(it.key()));
|
||||||
}
|
}
|
||||||
emit saveNeededChanged(needSave);
|
Q_EMIT saveNeededChanged(needSave);
|
||||||
|
|
||||||
bool defaults = isDefault();
|
bool defaults = isDefault();
|
||||||
for (auto it = m_default.cbegin(); it != m_default.cend(); ++it) {
|
for (auto it = m_default.cbegin(); it != m_default.cend(); ++it) {
|
||||||
defaults &= it.value() == monitor()->selectedEdgeItem(KWinScreenEdge::electricBorderToMonitorEdge(it.key()));
|
defaults &= it.value() == monitor()->selectedEdgeItem(KWinScreenEdge::electricBorderToMonitorEdge(it.key()));
|
||||||
}
|
}
|
||||||
emit defaultChanged(defaults);
|
Q_EMIT defaultChanged(defaults);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinScreenEdge::createConnection()
|
void KWinScreenEdge::createConnection()
|
||||||
|
|
|
@ -183,7 +183,7 @@ void Monitor::selectEdgeItem(int edge, int index)
|
||||||
|
|
||||||
int Monitor::selectedEdgeItem(int edge) const
|
int Monitor::selectedEdgeItem(int edge) const
|
||||||
{
|
{
|
||||||
foreach (QAction * act, popup_actions[ edge ])
|
Q_FOREACH (QAction * act, popup_actions[ edge ])
|
||||||
if (act->isChecked())
|
if (act->isChecked())
|
||||||
return popup_actions[ edge ].indexOf(act);
|
return popup_actions[ edge ].indexOf(act);
|
||||||
abort();
|
abort();
|
||||||
|
@ -199,8 +199,8 @@ void Monitor::popup(Corner* c, QPoint pos)
|
||||||
return;
|
return;
|
||||||
if (QAction* a = popups[ i ]->exec(pos)) {
|
if (QAction* a = popups[ i ]->exec(pos)) {
|
||||||
selectEdgeItem(i, popup_actions[ i ].indexOf(a));
|
selectEdgeItem(i, popup_actions[ i ].indexOf(a));
|
||||||
emit changed();
|
Q_EMIT changed();
|
||||||
emit edgeSelectionChanged(i, popup_actions[ i ].indexOf(a));
|
Q_EMIT edgeSelectionChanged(i, popup_actions[ i ].indexOf(a));
|
||||||
c->setToolTip(KLocalizedString::removeAcceleratorMarker(a->text()));
|
c->setToolTip(KLocalizedString::removeAcceleratorMarker(a->text()));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -142,7 +142,7 @@ void ScreenPreviewWidget::dropEvent(QDropEvent *e)
|
||||||
if (!uris.isEmpty()) {
|
if (!uris.isEmpty()) {
|
||||||
// TODO: Download remote file
|
// TODO: Download remote file
|
||||||
if (uris.first().isLocalFile())
|
if (uris.first().isLocalFile())
|
||||||
emit imageDropped(uris.first().path());
|
Q_EMIT imageDropped(uris.first().path());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ void Module::importScriptInstallFinished(KJob *job)
|
||||||
|
|
||||||
updateListViewContents();
|
updateListViewContents();
|
||||||
|
|
||||||
emit changed(true);
|
Q_EMIT changed(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::updateListViewContents()
|
void Module::updateListViewContents()
|
||||||
|
@ -159,7 +159,7 @@ void Module::load()
|
||||||
updateListViewContents();
|
updateListViewContents();
|
||||||
ui->scriptSelector->load();
|
ui->scriptSelector->load();
|
||||||
|
|
||||||
emit changed(false);
|
Q_EMIT changed(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Module::save()
|
void Module::save()
|
||||||
|
@ -189,5 +189,5 @@ void Module::save()
|
||||||
QDBusMessage message = QDBusMessage::createMethodCall("org.kde.KWin", "/Scripting", "org.kde.kwin.Scripting", "start");
|
QDBusMessage message = QDBusMessage::createMethodCall("org.kde.KWin", "/Scripting", "org.kde.kwin.Scripting", "start");
|
||||||
QDBusConnection::sessionBus().asyncCall(message);
|
QDBusConnection::sessionBus().asyncCall(message);
|
||||||
|
|
||||||
emit changed(false);
|
Q_EMIT changed(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -381,37 +381,37 @@ void KWinTabBoxConfigForm::tabBoxToggled(bool on)
|
||||||
|
|
||||||
void KWinTabBoxConfigForm::onFilterScreen()
|
void KWinTabBoxConfigForm::onFilterScreen()
|
||||||
{
|
{
|
||||||
emit filterScreenChanged(filterScreen());
|
Q_EMIT filterScreenChanged(filterScreen());
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinTabBoxConfigForm::onFilterDesktop()
|
void KWinTabBoxConfigForm::onFilterDesktop()
|
||||||
{
|
{
|
||||||
emit filterDesktopChanged(filterDesktop());
|
Q_EMIT filterDesktopChanged(filterDesktop());
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinTabBoxConfigForm::onFilterActivites()
|
void KWinTabBoxConfigForm::onFilterActivites()
|
||||||
{
|
{
|
||||||
emit filterActivitiesChanged(filterActivities());
|
Q_EMIT filterActivitiesChanged(filterActivities());
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinTabBoxConfigForm::onFilterMinimization()
|
void KWinTabBoxConfigForm::onFilterMinimization()
|
||||||
{
|
{
|
||||||
emit filterMinimizationChanged(filterMinimization());
|
Q_EMIT filterMinimizationChanged(filterMinimization());
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWin::KWinTabBoxConfigForm::onApplicationMode()
|
void KWin::KWinTabBoxConfigForm::onApplicationMode()
|
||||||
{
|
{
|
||||||
emit applicationModeChanged(applicationMode());
|
Q_EMIT applicationModeChanged(applicationMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinTabBoxConfigForm::onShowDesktopMode()
|
void KWinTabBoxConfigForm::onShowDesktopMode()
|
||||||
{
|
{
|
||||||
emit showDesktopModeChanged(showDesktopMode());
|
Q_EMIT showDesktopModeChanged(showDesktopMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinTabBoxConfigForm::onSwitchingMode()
|
void KWinTabBoxConfigForm::onSwitchingMode()
|
||||||
{
|
{
|
||||||
emit switchingModeChanged(switchingMode());
|
Q_EMIT switchingModeChanged(switchingMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinTabBoxConfigForm::onEffectCombo()
|
void KWinTabBoxConfigForm::onEffectCombo()
|
||||||
|
@ -423,7 +423,7 @@ void KWinTabBoxConfigForm::onEffectCombo()
|
||||||
}
|
}
|
||||||
ui->kcfg_HighlightWindows->setEnabled(isAddonEffect && m_isHighlightWindowsEnabled);
|
ui->kcfg_HighlightWindows->setEnabled(isAddonEffect && m_isHighlightWindowsEnabled);
|
||||||
|
|
||||||
emit layoutNameChanged(layoutName());
|
Q_EMIT layoutNameChanged(layoutName());
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinTabBoxConfigForm::shortcutChanged(const QKeySequence &seq)
|
void KWinTabBoxConfigForm::shortcutChanged(const QKeySequence &seq)
|
||||||
|
|
|
@ -211,13 +211,13 @@ void SwitcherItem::setVisible(bool visible)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_visible = visible;
|
m_visible = visible;
|
||||||
emit visibleChanged();
|
Q_EMIT visibleChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwitcherItem::setItem(QObject *item)
|
void SwitcherItem::setItem(QObject *item)
|
||||||
{
|
{
|
||||||
m_item = item;
|
m_item = item;
|
||||||
emit itemChanged();
|
Q_EMIT itemChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwitcherItem::setCurrentIndex(int index)
|
void SwitcherItem::setCurrentIndex(int index)
|
||||||
|
@ -226,7 +226,7 @@ void SwitcherItem::setCurrentIndex(int index)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_currentIndex = index;
|
m_currentIndex = index;
|
||||||
emit currentIndexChanged(m_currentIndex);
|
Q_EMIT currentIndexChanged(m_currentIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect SwitcherItem::screenGeometry() const
|
QRect SwitcherItem::screenGeometry() const
|
||||||
|
|
|
@ -111,7 +111,7 @@ WindowThumbnailItem::~WindowThumbnailItem()
|
||||||
void WindowThumbnailItem::setWId(qulonglong wId)
|
void WindowThumbnailItem::setWId(qulonglong wId)
|
||||||
{
|
{
|
||||||
m_wId = wId;
|
m_wId = wId;
|
||||||
emit wIdChanged(wId);
|
Q_EMIT wIdChanged(wId);
|
||||||
findImage();
|
findImage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ void WindowThumbnailItem::setClipTo(QQuickItem *clip)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_clipToItem = clip;
|
m_clipToItem = clip;
|
||||||
emit clipToChanged();
|
Q_EMIT clipToChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowThumbnailItem::findImage()
|
void WindowThumbnailItem::findImage()
|
||||||
|
@ -192,7 +192,7 @@ void WindowThumbnailItem::setBrightness(qreal brightness)
|
||||||
}
|
}
|
||||||
m_brightness = brightness;
|
m_brightness = brightness;
|
||||||
update();
|
update();
|
||||||
emit brightnessChanged();
|
Q_EMIT brightnessChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowThumbnailItem::setSaturation(qreal saturation)
|
void WindowThumbnailItem::setSaturation(qreal saturation)
|
||||||
|
@ -202,7 +202,7 @@ void WindowThumbnailItem::setSaturation(qreal saturation)
|
||||||
}
|
}
|
||||||
m_saturation = saturation;
|
m_saturation = saturation;
|
||||||
update();
|
update();
|
||||||
emit saturationChanged();
|
Q_EMIT saturationChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace KWin
|
} // namespace KWin
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
if (event->isAutoRepeat()) {
|
if (event->isAutoRepeat()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit m_input->keyStateChanged(event->nativeScanCode(), event->type() == QEvent::KeyPress ? InputRedirection::KeyboardKeyPressed : InputRedirection::KeyboardKeyReleased);
|
Q_EMIT m_input->keyStateChanged(event->nativeScanCode(), event->type() == QEvent::KeyPress ? InputRedirection::KeyboardKeyPressed : InputRedirection::KeyboardKeyReleased);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -86,7 +86,7 @@ public:
|
||||||
if (mods == m_modifiers) {
|
if (mods == m_modifiers) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit m_input->keyboardModifiersChanged(mods, m_modifiers);
|
Q_EMIT m_input->keyboardModifiersChanged(mods, m_modifiers);
|
||||||
m_modifiers = mods;
|
m_modifiers = mods;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ void KeyboardLayout::resetLayout()
|
||||||
loadShortcuts();
|
loadShortcuts();
|
||||||
|
|
||||||
initDBusInterface();
|
initDBusInterface();
|
||||||
emit layoutsReconfigured();
|
Q_EMIT layoutsReconfigured();
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeyboardLayout::loadShortcuts()
|
void KeyboardLayout::loadShortcuts()
|
||||||
|
@ -157,7 +157,7 @@ void KeyboardLayout::checkLayoutChange(uint previousLayout)
|
||||||
if (m_layout != currentLayout || previousLayout != currentLayout) {
|
if (m_layout != currentLayout || previousLayout != currentLayout) {
|
||||||
m_layout = currentLayout;
|
m_layout = currentLayout;
|
||||||
notifyLayoutChange();
|
notifyLayoutChange();
|
||||||
emit layoutChanged(currentLayout);
|
Q_EMIT layoutChanged(currentLayout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ void Policy::setLayout(uint index)
|
||||||
m_xkb->switchToLayout(index);
|
m_xkb->switchToLayout(index);
|
||||||
const uint currentLayout = m_xkb->currentLayout();
|
const uint currentLayout = m_xkb->currentLayout();
|
||||||
if (previousLayout != currentLayout) {
|
if (previousLayout != currentLayout) {
|
||||||
emit m_layout->layoutChanged(currentLayout);
|
Q_EMIT m_layout->layoutChanged(currentLayout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ void KeyboardRepeat::handleKeyRepeat()
|
||||||
m_timer->setInterval(1000 / waylandServer()->seat()->keyboard()->keyRepeatRate());
|
m_timer->setInterval(1000 / waylandServer()->seat()->keyboard()->keyRepeatRate());
|
||||||
}
|
}
|
||||||
// TODO: better time
|
// TODO: better time
|
||||||
emit keyRepeat(m_key, m_time);
|
Q_EMIT keyRepeat(m_key, m_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeyboardRepeat::keyEvent(KeyEvent *event)
|
void KeyboardRepeat::keyEvent(KeyEvent *event)
|
||||||
|
|
|
@ -105,7 +105,7 @@ void Workspace::updateStackingOrder(bool propagate_new_clients)
|
||||||
if (changed || propagate_new_clients) {
|
if (changed || propagate_new_clients) {
|
||||||
propagateClients(propagate_new_clients);
|
propagateClients(propagate_new_clients);
|
||||||
markXStackingOrderAsDirty();
|
markXStackingOrderAsDirty();
|
||||||
emit stackingOrderChanged();
|
Q_EMIT stackingOrderChanged();
|
||||||
if (m_compositor) {
|
if (m_compositor) {
|
||||||
m_compositor->addRepaintFull();
|
m_compositor->addRepaintFull();
|
||||||
}
|
}
|
||||||
|
@ -255,7 +255,7 @@ AbstractClient* Workspace::findDesktop(bool topmost, int desktop) const
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
} else { // bottom-most
|
} else { // bottom-most
|
||||||
foreach (Toplevel * c, stacking_order) {
|
Q_FOREACH (Toplevel * c, stacking_order) {
|
||||||
AbstractClient *client = qobject_cast<AbstractClient*>(c);
|
AbstractClient *client = qobject_cast<AbstractClient*>(c);
|
||||||
if (client && c->isOnDesktop(desktop) && c->isDesktop()
|
if (client && c->isOnDesktop(desktop) && c->isDesktop()
|
||||||
&& client->isShown(true))
|
&& client->isShown(true))
|
||||||
|
@ -349,7 +349,7 @@ void Workspace::raiseClient(AbstractClient* c, bool nogroup)
|
||||||
AbstractClient *transient_parent = c;
|
AbstractClient *transient_parent = c;
|
||||||
while ((transient_parent = transient_parent->transientFor()))
|
while ((transient_parent = transient_parent->transientFor()))
|
||||||
transients << transient_parent;
|
transients << transient_parent;
|
||||||
foreach (transient_parent, transients)
|
Q_FOREACH (transient_parent, transients)
|
||||||
raiseClient(transient_parent, true);
|
raiseClient(transient_parent, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -726,7 +726,7 @@ void X11Client::restackWindow(xcb_window_t above, int detail, NET::RequestSource
|
||||||
|
|
||||||
bool X11Client::belongsToDesktop() const
|
bool X11Client::belongsToDesktop() const
|
||||||
{
|
{
|
||||||
foreach (const X11Client *c, group()->members()) {
|
Q_FOREACH (const X11Client *c, group()->members()) {
|
||||||
if (c->isDesktop())
|
if (c->isDesktop())
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,7 @@ void LayerShellV1Client::destroyClient()
|
||||||
markAsZombie();
|
markAsZombie();
|
||||||
cleanTabBox();
|
cleanTabBox();
|
||||||
Deleted *deleted = Deleted::create(this);
|
Deleted *deleted = Deleted::create(this);
|
||||||
emit windowClosed(this, deleted);
|
Q_EMIT windowClosed(this, deleted);
|
||||||
StackingUpdatesBlocker blocker(workspace());
|
StackingUpdatesBlocker blocker(workspace());
|
||||||
cleanGrouping();
|
cleanGrouping();
|
||||||
waylandServer()->removeClient(this);
|
waylandServer()->removeClient(this);
|
||||||
|
|
|
@ -49,7 +49,7 @@ void LayerShellV1Integration::createClient(LayerSurfaceV1Interface *shellSurface
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
emit clientCreated(new LayerShellV1Client(shellSurface, output, this));
|
Q_EMIT clientCreated(new LayerShellV1Client(shellSurface, output, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LayerShellV1Integration::recreateClient(LayerSurfaceV1Interface *shellSurface)
|
void LayerShellV1Integration::recreateClient(LayerSurfaceV1Interface *shellSurface)
|
||||||
|
|
|
@ -185,10 +185,10 @@ void Connection::setup()
|
||||||
void Connection::doSetup()
|
void Connection::doSetup()
|
||||||
{
|
{
|
||||||
connect(s_self, &Connection::deviceAdded, s_self, [](Device* device) {
|
connect(s_self, &Connection::deviceAdded, s_self, [](Device* device) {
|
||||||
emit s_self->deviceAddedSysName(device->sysName());
|
Q_EMIT s_self->deviceAddedSysName(device->sysName());
|
||||||
});
|
});
|
||||||
connect(s_self, &Connection::deviceRemoved, s_self, [](Device* device) {
|
connect(s_self, &Connection::deviceRemoved, s_self, [](Device* device) {
|
||||||
emit s_self->deviceRemovedSysName(device->sysName());
|
Q_EMIT s_self->deviceRemovedSysName(device->sysName());
|
||||||
});
|
});
|
||||||
|
|
||||||
Q_ASSERT(!m_notifier);
|
Q_ASSERT(!m_notifier);
|
||||||
|
@ -236,7 +236,7 @@ void Connection::handleEvent()
|
||||||
m_eventQueue << event;
|
m_eventQueue << event;
|
||||||
} while (true);
|
} while (true);
|
||||||
if (wasEmpty && !m_eventQueue.isEmpty()) {
|
if (wasEmpty && !m_eventQueue.isEmpty()) {
|
||||||
emit eventsRead();
|
Q_EMIT eventsRead();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,29 +340,29 @@ void Connection::processEvents()
|
||||||
if (device->isAlphaNumericKeyboard()) {
|
if (device->isAlphaNumericKeyboard()) {
|
||||||
m_alphaNumericKeyboard++;
|
m_alphaNumericKeyboard++;
|
||||||
if (m_alphaNumericKeyboard == 1) {
|
if (m_alphaNumericKeyboard == 1) {
|
||||||
emit hasAlphaNumericKeyboardChanged(true);
|
Q_EMIT hasAlphaNumericKeyboardChanged(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_keyboard == 1) {
|
if (m_keyboard == 1) {
|
||||||
emit hasKeyboardChanged(true);
|
Q_EMIT hasKeyboardChanged(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (device->isPointer()) {
|
if (device->isPointer()) {
|
||||||
m_pointer++;
|
m_pointer++;
|
||||||
if (m_pointer == 1) {
|
if (m_pointer == 1) {
|
||||||
emit hasPointerChanged(true);
|
Q_EMIT hasPointerChanged(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (device->isTouch()) {
|
if (device->isTouch()) {
|
||||||
m_touch++;
|
m_touch++;
|
||||||
if (m_touch == 1) {
|
if (m_touch == 1) {
|
||||||
emit hasTouchChanged(true);
|
Q_EMIT hasTouchChanged(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (device->isTabletModeSwitch()) {
|
if (device->isTabletModeSwitch()) {
|
||||||
m_tabletModeSwitch++;
|
m_tabletModeSwitch++;
|
||||||
if (m_tabletModeSwitch == 1) {
|
if (m_tabletModeSwitch == 1) {
|
||||||
emit hasTabletModeSwitchChanged(true);
|
Q_EMIT hasTabletModeSwitchChanged(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
applyDeviceConfig(device);
|
applyDeviceConfig(device);
|
||||||
|
@ -371,7 +371,7 @@ void Connection::processEvents()
|
||||||
// enable possible leds
|
// enable possible leds
|
||||||
libinput_device_led_update(device->device(), static_cast<libinput_led>(toLibinputLEDS(m_leds)));
|
libinput_device_led_update(device->device(), static_cast<libinput_led>(toLibinputLEDS(m_leds)));
|
||||||
|
|
||||||
emit deviceAdded(device);
|
Q_EMIT deviceAdded(device);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_DEVICE_REMOVED: {
|
case LIBINPUT_EVENT_DEVICE_REMOVED: {
|
||||||
|
@ -382,36 +382,36 @@ void Connection::processEvents()
|
||||||
}
|
}
|
||||||
auto device = *it;
|
auto device = *it;
|
||||||
m_devices.erase(it);
|
m_devices.erase(it);
|
||||||
emit deviceRemoved(device);
|
Q_EMIT deviceRemoved(device);
|
||||||
|
|
||||||
if (device->isKeyboard()) {
|
if (device->isKeyboard()) {
|
||||||
m_keyboard--;
|
m_keyboard--;
|
||||||
if (device->isAlphaNumericKeyboard()) {
|
if (device->isAlphaNumericKeyboard()) {
|
||||||
m_alphaNumericKeyboard--;
|
m_alphaNumericKeyboard--;
|
||||||
if (m_alphaNumericKeyboard == 0) {
|
if (m_alphaNumericKeyboard == 0) {
|
||||||
emit hasAlphaNumericKeyboardChanged(false);
|
Q_EMIT hasAlphaNumericKeyboardChanged(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_keyboard == 0) {
|
if (m_keyboard == 0) {
|
||||||
emit hasKeyboardChanged(false);
|
Q_EMIT hasKeyboardChanged(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (device->isPointer()) {
|
if (device->isPointer()) {
|
||||||
m_pointer--;
|
m_pointer--;
|
||||||
if (m_pointer == 0) {
|
if (m_pointer == 0) {
|
||||||
emit hasPointerChanged(false);
|
Q_EMIT hasPointerChanged(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (device->isTouch()) {
|
if (device->isTouch()) {
|
||||||
m_touch--;
|
m_touch--;
|
||||||
if (m_touch == 0) {
|
if (m_touch == 0) {
|
||||||
emit hasTouchChanged(false);
|
Q_EMIT hasTouchChanged(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (device->isTabletModeSwitch()) {
|
if (device->isTabletModeSwitch()) {
|
||||||
m_tabletModeSwitch--;
|
m_tabletModeSwitch--;
|
||||||
if (m_tabletModeSwitch == 0) {
|
if (m_tabletModeSwitch == 0) {
|
||||||
emit hasTabletModeSwitchChanged(false);
|
Q_EMIT hasTabletModeSwitchChanged(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
device->deleteLater();
|
device->deleteLater();
|
||||||
|
@ -419,21 +419,21 @@ void Connection::processEvents()
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_KEYBOARD_KEY: {
|
case LIBINPUT_EVENT_KEYBOARD_KEY: {
|
||||||
KeyEvent *ke = static_cast<KeyEvent*>(event.data());
|
KeyEvent *ke = static_cast<KeyEvent*>(event.data());
|
||||||
emit keyChanged(ke->key(), ke->state(), ke->time(), ke->device());
|
Q_EMIT keyChanged(ke->key(), ke->state(), ke->time(), ke->device());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_POINTER_AXIS: {
|
case LIBINPUT_EVENT_POINTER_AXIS: {
|
||||||
PointerEvent *pe = static_cast<PointerEvent*>(event.data());
|
PointerEvent *pe = static_cast<PointerEvent*>(event.data());
|
||||||
const auto axes = pe->axis();
|
const auto axes = pe->axis();
|
||||||
for (const InputRedirection::PointerAxis &axis : axes) {
|
for (const InputRedirection::PointerAxis &axis : axes) {
|
||||||
emit pointerAxisChanged(axis, pe->axisValue(axis), pe->discreteAxisValue(axis),
|
Q_EMIT pointerAxisChanged(axis, pe->axisValue(axis), pe->discreteAxisValue(axis),
|
||||||
pe->axisSource(), pe->time(), pe->device());
|
pe->axisSource(), pe->time(), pe->device());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_POINTER_BUTTON: {
|
case LIBINPUT_EVENT_POINTER_BUTTON: {
|
||||||
PointerEvent *pe = static_cast<PointerEvent*>(event.data());
|
PointerEvent *pe = static_cast<PointerEvent*>(event.data());
|
||||||
emit pointerButtonChanged(pe->button(), pe->buttonState(), pe->time(), pe->device());
|
Q_EMIT pointerButtonChanged(pe->button(), pe->buttonState(), pe->time(), pe->device());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_POINTER_MOTION: {
|
case LIBINPUT_EVENT_POINTER_MOTION: {
|
||||||
|
@ -455,12 +455,12 @@ void Connection::processEvents()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit pointerMotion(delta, deltaNonAccel, latestTime, latestTimeUsec, pe->device());
|
Q_EMIT pointerMotion(delta, deltaNonAccel, latestTime, latestTimeUsec, pe->device());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE: {
|
case LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE: {
|
||||||
PointerEvent *pe = static_cast<PointerEvent*>(event.data());
|
PointerEvent *pe = static_cast<PointerEvent*>(event.data());
|
||||||
emit pointerMotionAbsolute(pe->absolutePos(), pe->absolutePos(m_size), pe->time(), pe->device());
|
Q_EMIT pointerMotionAbsolute(pe->absolutePos(), pe->absolutePos(m_size), pe->time(), pe->device());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_TOUCH_DOWN: {
|
case LIBINPUT_EVENT_TOUCH_DOWN: {
|
||||||
|
@ -471,13 +471,13 @@ void Connection::processEvents()
|
||||||
const QPointF globalPos =
|
const QPointF globalPos =
|
||||||
devicePointToGlobalPosition(te->absolutePos(output->modeSize()),
|
devicePointToGlobalPosition(te->absolutePos(output->modeSize()),
|
||||||
output);
|
output);
|
||||||
emit touchDown(te->id(), globalPos, te->time(), te->device());
|
Q_EMIT touchDown(te->id(), globalPos, te->time(), te->device());
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_TOUCH_UP: {
|
case LIBINPUT_EVENT_TOUCH_UP: {
|
||||||
TouchEvent *te = static_cast<TouchEvent*>(event.data());
|
TouchEvent *te = static_cast<TouchEvent*>(event.data());
|
||||||
emit touchUp(te->id(), te->time(), te->device());
|
Q_EMIT touchUp(te->id(), te->time(), te->device());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_TOUCH_MOTION: {
|
case LIBINPUT_EVENT_TOUCH_MOTION: {
|
||||||
|
@ -488,53 +488,53 @@ void Connection::processEvents()
|
||||||
const QPointF globalPos =
|
const QPointF globalPos =
|
||||||
devicePointToGlobalPosition(te->absolutePos(output->modeSize()),
|
devicePointToGlobalPosition(te->absolutePos(output->modeSize()),
|
||||||
output);
|
output);
|
||||||
emit touchMotion(te->id(), globalPos, te->time(), te->device());
|
Q_EMIT touchMotion(te->id(), globalPos, te->time(), te->device());
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_TOUCH_CANCEL: {
|
case LIBINPUT_EVENT_TOUCH_CANCEL: {
|
||||||
emit touchCanceled(event->device());
|
Q_EMIT touchCanceled(event->device());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_TOUCH_FRAME: {
|
case LIBINPUT_EVENT_TOUCH_FRAME: {
|
||||||
emit touchFrame(event->device());
|
Q_EMIT touchFrame(event->device());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_GESTURE_PINCH_BEGIN: {
|
case LIBINPUT_EVENT_GESTURE_PINCH_BEGIN: {
|
||||||
PinchGestureEvent *pe = static_cast<PinchGestureEvent*>(event.data());
|
PinchGestureEvent *pe = static_cast<PinchGestureEvent*>(event.data());
|
||||||
emit pinchGestureBegin(pe->fingerCount(), pe->time(), pe->device());
|
Q_EMIT pinchGestureBegin(pe->fingerCount(), pe->time(), pe->device());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_GESTURE_PINCH_UPDATE: {
|
case LIBINPUT_EVENT_GESTURE_PINCH_UPDATE: {
|
||||||
PinchGestureEvent *pe = static_cast<PinchGestureEvent*>(event.data());
|
PinchGestureEvent *pe = static_cast<PinchGestureEvent*>(event.data());
|
||||||
emit pinchGestureUpdate(pe->scale(), pe->angleDelta(), pe->delta(), pe->time(), pe->device());
|
Q_EMIT pinchGestureUpdate(pe->scale(), pe->angleDelta(), pe->delta(), pe->time(), pe->device());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_GESTURE_PINCH_END: {
|
case LIBINPUT_EVENT_GESTURE_PINCH_END: {
|
||||||
PinchGestureEvent *pe = static_cast<PinchGestureEvent*>(event.data());
|
PinchGestureEvent *pe = static_cast<PinchGestureEvent*>(event.data());
|
||||||
if (pe->isCancelled()) {
|
if (pe->isCancelled()) {
|
||||||
emit pinchGestureCancelled(pe->time(), pe->device());
|
Q_EMIT pinchGestureCancelled(pe->time(), pe->device());
|
||||||
} else {
|
} else {
|
||||||
emit pinchGestureEnd(pe->time(), pe->device());
|
Q_EMIT pinchGestureEnd(pe->time(), pe->device());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN: {
|
case LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN: {
|
||||||
SwipeGestureEvent *se = static_cast<SwipeGestureEvent*>(event.data());
|
SwipeGestureEvent *se = static_cast<SwipeGestureEvent*>(event.data());
|
||||||
emit swipeGestureBegin(se->fingerCount(), se->time(), se->device());
|
Q_EMIT swipeGestureBegin(se->fingerCount(), se->time(), se->device());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE: {
|
case LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE: {
|
||||||
SwipeGestureEvent *se = static_cast<SwipeGestureEvent*>(event.data());
|
SwipeGestureEvent *se = static_cast<SwipeGestureEvent*>(event.data());
|
||||||
emit swipeGestureUpdate(se->delta(), se->time(), se->device());
|
Q_EMIT swipeGestureUpdate(se->delta(), se->time(), se->device());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_GESTURE_SWIPE_END: {
|
case LIBINPUT_EVENT_GESTURE_SWIPE_END: {
|
||||||
SwipeGestureEvent *se = static_cast<SwipeGestureEvent*>(event.data());
|
SwipeGestureEvent *se = static_cast<SwipeGestureEvent*>(event.data());
|
||||||
if (se->isCancelled()) {
|
if (se->isCancelled()) {
|
||||||
emit swipeGestureCancelled(se->time(), se->device());
|
Q_EMIT swipeGestureCancelled(se->time(), se->device());
|
||||||
} else {
|
} else {
|
||||||
emit swipeGestureEnd(se->time(), se->device());
|
Q_EMIT swipeGestureEnd(se->time(), se->device());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -542,10 +542,10 @@ void Connection::processEvents()
|
||||||
SwitchEvent *se = static_cast<SwitchEvent*>(event.data());
|
SwitchEvent *se = static_cast<SwitchEvent*>(event.data());
|
||||||
switch (se->state()) {
|
switch (se->state()) {
|
||||||
case SwitchEvent::State::Off:
|
case SwitchEvent::State::Off:
|
||||||
emit switchToggledOff(se->time(), se->timeMicroseconds(), se->device());
|
Q_EMIT switchToggledOff(se->time(), se->timeMicroseconds(), se->device());
|
||||||
break;
|
break;
|
||||||
case SwitchEvent::State::On:
|
case SwitchEvent::State::On:
|
||||||
emit switchToggledOn(se->time(), se->timeMicroseconds(), se->device());
|
Q_EMIT switchToggledOn(se->time(), se->timeMicroseconds(), se->device());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Q_UNREACHABLE();
|
Q_UNREACHABLE();
|
||||||
|
@ -581,7 +581,7 @@ void Connection::processEvents()
|
||||||
#else
|
#else
|
||||||
const QPointF globalPos;
|
const QPointF globalPos;
|
||||||
#endif
|
#endif
|
||||||
emit tabletToolEvent(tabletEventType,
|
Q_EMIT tabletToolEvent(tabletEventType,
|
||||||
globalPos, tte->pressure(),
|
globalPos, tte->pressure(),
|
||||||
tte->xTilt(), tte->yTilt(), tte->rotation(),
|
tte->xTilt(), tte->yTilt(), tte->rotation(),
|
||||||
tte->isTipDown(), tte->isNearby(), createTabletId(tte->tool(), event->device()->groupUserData()), tte->time());
|
tte->isTipDown(), tte->isNearby(), createTabletId(tte->tool(), event->device()->groupUserData()), tte->time());
|
||||||
|
@ -589,14 +589,14 @@ void Connection::processEvents()
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_TABLET_TOOL_BUTTON: {
|
case LIBINPUT_EVENT_TABLET_TOOL_BUTTON: {
|
||||||
auto *tabletEvent = static_cast<TabletToolButtonEvent *>(event.data());
|
auto *tabletEvent = static_cast<TabletToolButtonEvent *>(event.data());
|
||||||
emit tabletToolButtonEvent(tabletEvent->buttonId(),
|
Q_EMIT tabletToolButtonEvent(tabletEvent->buttonId(),
|
||||||
tabletEvent->isButtonPressed(),
|
tabletEvent->isButtonPressed(),
|
||||||
createTabletId(tabletEvent->tool(), event->device()->groupUserData()));
|
createTabletId(tabletEvent->tool(), event->device()->groupUserData()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_TABLET_PAD_BUTTON: {
|
case LIBINPUT_EVENT_TABLET_PAD_BUTTON: {
|
||||||
auto *tabletEvent = static_cast<TabletPadButtonEvent *>(event.data());
|
auto *tabletEvent = static_cast<TabletPadButtonEvent *>(event.data());
|
||||||
emit tabletPadButtonEvent(tabletEvent->buttonId(),
|
Q_EMIT tabletPadButtonEvent(tabletEvent->buttonId(),
|
||||||
tabletEvent->isButtonPressed(),
|
tabletEvent->isButtonPressed(),
|
||||||
{ event->device()->groupUserData() });
|
{ event->device()->groupUserData() });
|
||||||
break;
|
break;
|
||||||
|
@ -604,7 +604,7 @@ void Connection::processEvents()
|
||||||
case LIBINPUT_EVENT_TABLET_PAD_RING: {
|
case LIBINPUT_EVENT_TABLET_PAD_RING: {
|
||||||
auto *tabletEvent = static_cast<TabletPadRingEvent *>(event.data());
|
auto *tabletEvent = static_cast<TabletPadRingEvent *>(event.data());
|
||||||
tabletEvent->position();
|
tabletEvent->position();
|
||||||
emit tabletPadRingEvent(tabletEvent->number(),
|
Q_EMIT tabletPadRingEvent(tabletEvent->number(),
|
||||||
tabletEvent->position(),
|
tabletEvent->position(),
|
||||||
tabletEvent->source() == LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER,
|
tabletEvent->source() == LIBINPUT_TABLET_PAD_RING_SOURCE_FINGER,
|
||||||
{ event->device()->groupUserData() });
|
{ event->device()->groupUserData() });
|
||||||
|
@ -612,7 +612,7 @@ void Connection::processEvents()
|
||||||
}
|
}
|
||||||
case LIBINPUT_EVENT_TABLET_PAD_STRIP: {
|
case LIBINPUT_EVENT_TABLET_PAD_STRIP: {
|
||||||
auto *tabletEvent = static_cast<TabletPadStripEvent *>(event.data());
|
auto *tabletEvent = static_cast<TabletPadStripEvent *>(event.data());
|
||||||
emit tabletPadStripEvent(tabletEvent->number(),
|
Q_EMIT tabletPadStripEvent(tabletEvent->number(),
|
||||||
tabletEvent->position(),
|
tabletEvent->position(),
|
||||||
tabletEvent->source() == LIBINPUT_TABLET_PAD_STRIP_SOURCE_FINGER,
|
tabletEvent->source() == LIBINPUT_TABLET_PAD_STRIP_SOURCE_FINGER,
|
||||||
{ event->device()->groupUserData() });
|
{ event->device()->groupUserData() });
|
||||||
|
@ -625,19 +625,19 @@ void Connection::processEvents()
|
||||||
}
|
}
|
||||||
if (wasSuspended) {
|
if (wasSuspended) {
|
||||||
if (m_keyboardBeforeSuspend && !m_keyboard) {
|
if (m_keyboardBeforeSuspend && !m_keyboard) {
|
||||||
emit hasKeyboardChanged(false);
|
Q_EMIT hasKeyboardChanged(false);
|
||||||
}
|
}
|
||||||
if (m_alphaNumericKeyboardBeforeSuspend && !m_alphaNumericKeyboard) {
|
if (m_alphaNumericKeyboardBeforeSuspend && !m_alphaNumericKeyboard) {
|
||||||
emit hasAlphaNumericKeyboardChanged(false);
|
Q_EMIT hasAlphaNumericKeyboardChanged(false);
|
||||||
}
|
}
|
||||||
if (m_pointerBeforeSuspend && !m_pointer) {
|
if (m_pointerBeforeSuspend && !m_pointer) {
|
||||||
emit hasPointerChanged(false);
|
Q_EMIT hasPointerChanged(false);
|
||||||
}
|
}
|
||||||
if (m_touchBeforeSuspend && !m_touch) {
|
if (m_touchBeforeSuspend && !m_touch) {
|
||||||
emit hasTouchChanged(false);
|
Q_EMIT hasTouchChanged(false);
|
||||||
}
|
}
|
||||||
if (m_tabletModeSwitchBeforeSuspend && !m_tabletModeSwitch) {
|
if (m_tabletModeSwitchBeforeSuspend && !m_tabletModeSwitch) {
|
||||||
emit hasTabletModeSwitchChanged(false);
|
Q_EMIT hasTabletModeSwitchChanged(false);
|
||||||
}
|
}
|
||||||
wasSuspended = false;
|
wasSuspended = false;
|
||||||
}
|
}
|
||||||
|
@ -809,7 +809,7 @@ void Connection::updateLEDs(Xkb::LEDs leds)
|
||||||
|
|
||||||
QStringList Connection::devicesSysNames() const {
|
QStringList Connection::devicesSysNames() const {
|
||||||
QStringList sl;
|
QStringList sl;
|
||||||
foreach (Device *d, m_devices) {
|
Q_FOREACH (Device *d, m_devices) {
|
||||||
sl.append(d->sysName());
|
sl.append(d->sysName());
|
||||||
}
|
}
|
||||||
return sl;
|
return sl;
|
||||||
|
|
|
@ -316,7 +316,7 @@ void Device::setPointerAcceleration(qreal acceleration)
|
||||||
if (libinput_device_config_accel_set_speed(m_device, acceleration) == LIBINPUT_CONFIG_STATUS_SUCCESS) {
|
if (libinput_device_config_accel_set_speed(m_device, acceleration) == LIBINPUT_CONFIG_STATUS_SUCCESS) {
|
||||||
if (m_pointerAcceleration != acceleration) {
|
if (m_pointerAcceleration != acceleration) {
|
||||||
m_pointerAcceleration = acceleration;
|
m_pointerAcceleration = acceleration;
|
||||||
emit pointerAccelerationChanged();
|
Q_EMIT pointerAccelerationChanged();
|
||||||
writeEntry(ConfigKey::PointerAcceleration, QString::number(acceleration, 'f', 3));
|
writeEntry(ConfigKey::PointerAcceleration, QString::number(acceleration, 'f', 3));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,7 @@ void Device::setScrollButton(quint32 button)
|
||||||
if (m_scrollButton != button) {
|
if (m_scrollButton != button) {
|
||||||
m_scrollButton = button;
|
m_scrollButton = button;
|
||||||
writeEntry(ConfigKey::ScrollButton, m_scrollButton);
|
writeEntry(ConfigKey::ScrollButton, m_scrollButton);
|
||||||
emit scrollButtonChanged();
|
Q_EMIT scrollButtonChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -351,7 +351,7 @@ void Device::setPointerAccelerationProfile(bool set, enum libinput_config_accel
|
||||||
if (libinput_device_config_accel_set_profile(m_device, profile) == LIBINPUT_CONFIG_STATUS_SUCCESS) {
|
if (libinput_device_config_accel_set_profile(m_device, profile) == LIBINPUT_CONFIG_STATUS_SUCCESS) {
|
||||||
if (m_pointerAccelerationProfile != profile) {
|
if (m_pointerAccelerationProfile != profile) {
|
||||||
m_pointerAccelerationProfile = profile;
|
m_pointerAccelerationProfile = profile;
|
||||||
emit pointerAccelerationProfileChanged();
|
Q_EMIT pointerAccelerationProfileChanged();
|
||||||
writeEntry(ConfigKey::PointerAccelerationProfile, (quint32) profile);
|
writeEntry(ConfigKey::PointerAccelerationProfile, (quint32) profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -372,7 +372,7 @@ void Device::setClickMethod(bool set, enum libinput_config_click_method method)
|
||||||
if (libinput_device_config_click_set_method(m_device, method) == LIBINPUT_CONFIG_STATUS_SUCCESS) {
|
if (libinput_device_config_click_set_method(m_device, method) == LIBINPUT_CONFIG_STATUS_SUCCESS) {
|
||||||
if (m_clickMethod != method) {
|
if (m_clickMethod != method) {
|
||||||
m_clickMethod = method;
|
m_clickMethod = method;
|
||||||
emit clickMethodChanged();
|
Q_EMIT clickMethodChanged();
|
||||||
writeEntry(ConfigKey::ClickMethod, (quint32) method);
|
writeEntry(ConfigKey::ClickMethod, (quint32) method);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -397,7 +397,7 @@ void Device::setScrollMethod(bool set, enum libinput_config_scroll_method method
|
||||||
if (libinput_device_config_scroll_set_method(m_device, method) == LIBINPUT_CONFIG_STATUS_SUCCESS) {
|
if (libinput_device_config_scroll_set_method(m_device, method) == LIBINPUT_CONFIG_STATUS_SUCCESS) {
|
||||||
if (!isCurrent) {
|
if (!isCurrent) {
|
||||||
m_scrollMethod = method;
|
m_scrollMethod = method;
|
||||||
emit scrollMethodChanged();
|
Q_EMIT scrollMethodChanged();
|
||||||
writeEntry(ConfigKey::ScrollMethod, (quint32) method);
|
writeEntry(ConfigKey::ScrollMethod, (quint32) method);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -418,7 +418,7 @@ void Device::setLmrTapButtonMap(bool set)
|
||||||
if (m_tapButtonMap != map) {
|
if (m_tapButtonMap != map) {
|
||||||
m_tapButtonMap = map;
|
m_tapButtonMap = map;
|
||||||
writeEntry(ConfigKey::LmrTapButtonMap, set);
|
writeEntry(ConfigKey::LmrTapButtonMap, set);
|
||||||
emit tapButtonMapChanged();
|
Q_EMIT tapButtonMapChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -450,7 +450,7 @@ void Device::method(bool set) \
|
||||||
if (m_##variable != set) { \
|
if (m_##variable != set) { \
|
||||||
m_##variable = set; \
|
m_##variable = set; \
|
||||||
writeEntry(ConfigKey::key, m_##variable); \
|
writeEntry(ConfigKey::key, m_##variable); \
|
||||||
emit variable##Changed(); \
|
Q_EMIT variable##Changed(); \
|
||||||
}\
|
}\
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
@ -470,7 +470,7 @@ void Device::method(bool set) \
|
||||||
if (m_##variable != set) { \
|
if (m_##variable != set) { \
|
||||||
m_##variable = set; \
|
m_##variable = set; \
|
||||||
writeEntry(ConfigKey::key, m_##variable); \
|
writeEntry(ConfigKey::key, m_##variable); \
|
||||||
emit variable##Changed(); \
|
Q_EMIT variable##Changed(); \
|
||||||
}\
|
}\
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
@ -489,7 +489,7 @@ void Device::setScrollFactor(qreal factor)
|
||||||
if (m_scrollFactor != factor) {
|
if (m_scrollFactor != factor) {
|
||||||
m_scrollFactor = factor;
|
m_scrollFactor = factor;
|
||||||
writeEntry(ConfigKey::ScrollFactor, m_scrollFactor);
|
writeEntry(ConfigKey::ScrollFactor, m_scrollFactor);
|
||||||
emit scrollFactorChanged();
|
Q_EMIT scrollFactorChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -455,7 +455,7 @@ void AnimationEffect::clipWindow(const EffectWindow *w, const AniData &anim, Win
|
||||||
WindowQuadList filtered;
|
WindowQuadList filtered;
|
||||||
if (clip.left() != geo.left()) {
|
if (clip.left() != geo.left()) {
|
||||||
quads = quads.splitAtX(clip.left());
|
quads = quads.splitAtX(clip.left());
|
||||||
foreach (const WindowQuad &quad, quads) {
|
Q_FOREACH (const WindowQuad &quad, quads) {
|
||||||
if (quad.right() >= clip.left())
|
if (quad.right() >= clip.left())
|
||||||
filtered << quad;
|
filtered << quad;
|
||||||
}
|
}
|
||||||
|
@ -464,7 +464,7 @@ void AnimationEffect::clipWindow(const EffectWindow *w, const AniData &anim, Win
|
||||||
}
|
}
|
||||||
if (clip.right() != geo.right()) {
|
if (clip.right() != geo.right()) {
|
||||||
quads = quads.splitAtX(clip.left());
|
quads = quads.splitAtX(clip.left());
|
||||||
foreach (const WindowQuad &quad, quads) {
|
Q_FOREACH (const WindowQuad &quad, quads) {
|
||||||
if (quad.right() <= clip.right())
|
if (quad.right() <= clip.right())
|
||||||
filtered << quad;
|
filtered << quad;
|
||||||
}
|
}
|
||||||
|
@ -473,7 +473,7 @@ void AnimationEffect::clipWindow(const EffectWindow *w, const AniData &anim, Win
|
||||||
}
|
}
|
||||||
if (clip.top() != geo.top()) {
|
if (clip.top() != geo.top()) {
|
||||||
quads = quads.splitAtY(clip.top());
|
quads = quads.splitAtY(clip.top());
|
||||||
foreach (const WindowQuad &quad, quads) {
|
Q_FOREACH (const WindowQuad &quad, quads) {
|
||||||
if (quad.top() >= clip.top())
|
if (quad.top() >= clip.top())
|
||||||
filtered << quad;
|
filtered << quad;
|
||||||
}
|
}
|
||||||
|
@ -482,7 +482,7 @@ void AnimationEffect::clipWindow(const EffectWindow *w, const AniData &anim, Win
|
||||||
}
|
}
|
||||||
if (clip.bottom() != geo.bottom()) {
|
if (clip.bottom() != geo.bottom()) {
|
||||||
quads = quads.splitAtY(clip.bottom());
|
quads = quads.splitAtY(clip.bottom());
|
||||||
foreach (const WindowQuad &quad, quads) {
|
Q_FOREACH (const WindowQuad &quad, quads) {
|
||||||
if (quad.bottom() <= clip.bottom())
|
if (quad.bottom() <= clip.bottom())
|
||||||
filtered << quad;
|
filtered << quad;
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,7 @@ void EffectQuickView::update()
|
||||||
QOpenGLFramebufferObject::bindDefault();
|
QOpenGLFramebufferObject::bindDefault();
|
||||||
d->m_glcontext->doneCurrent();
|
d->m_glcontext->doneCurrent();
|
||||||
}
|
}
|
||||||
emit repaintNeeded();
|
Q_EMIT repaintNeeded();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectQuickView::forwardMouseEvent(QEvent *e)
|
void EffectQuickView::forwardMouseEvent(QEvent *e)
|
||||||
|
@ -261,7 +261,7 @@ void EffectQuickView::setVisible(bool visible)
|
||||||
d->m_visible = visible;
|
d->m_visible = visible;
|
||||||
|
|
||||||
if (visible){
|
if (visible){
|
||||||
emit d->m_renderControl->renderRequested();
|
Q_EMIT d->m_renderControl->renderRequested();
|
||||||
} else {
|
} else {
|
||||||
// deferred to not change GL context
|
// deferred to not change GL context
|
||||||
QTimer::singleShot(0, this, [this]() {
|
QTimer::singleShot(0, this, [this]() {
|
||||||
|
@ -317,7 +317,7 @@ void EffectQuickView::setGeometry(const QRect &rect)
|
||||||
{
|
{
|
||||||
const QRect oldGeometry = d->m_view->geometry();
|
const QRect oldGeometry = d->m_view->geometry();
|
||||||
d->m_view->setGeometry(rect);
|
d->m_view->setGeometry(rect);
|
||||||
emit geometryChanged(oldGeometry, rect);
|
Q_EMIT geometryChanged(oldGeometry, rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectQuickView::Private::releaseResources()
|
void EffectQuickView::Private::releaseResources()
|
||||||
|
|
|
@ -1011,7 +1011,7 @@ WindowQuadList WindowQuadList::makeGrid(int maxQuadSize) const
|
||||||
double top = first().top();
|
double top = first().top();
|
||||||
double bottom = first().bottom();
|
double bottom = first().bottom();
|
||||||
|
|
||||||
foreach (const WindowQuad &quad, *this) {
|
Q_FOREACH (const WindowQuad &quad, *this) {
|
||||||
#if !defined(QT_NO_DEBUG)
|
#if !defined(QT_NO_DEBUG)
|
||||||
if (quad.isTransformed())
|
if (quad.isTransformed())
|
||||||
qFatal("Splitting quads is allowed only in pre-paint calls!");
|
qFatal("Splitting quads is allowed only in pre-paint calls!");
|
||||||
|
@ -1269,10 +1269,10 @@ void WindowQuadList::makeArrays(float **vertices, float **texcoords, const QSize
|
||||||
|
|
||||||
WindowQuadList WindowQuadList::select(WindowQuadType type) const
|
WindowQuadList WindowQuadList::select(WindowQuadType type) const
|
||||||
{
|
{
|
||||||
foreach (const WindowQuad & q, *this) {
|
Q_FOREACH (const WindowQuad & q, *this) {
|
||||||
if (q.type() != type) { // something else than ones to select, make a copy and filter
|
if (q.type() != type) { // something else than ones to select, make a copy and filter
|
||||||
WindowQuadList ret;
|
WindowQuadList ret;
|
||||||
foreach (const WindowQuad & q, *this) {
|
Q_FOREACH (const WindowQuad & q, *this) {
|
||||||
if (q.type() == type)
|
if (q.type() == type)
|
||||||
ret.append(q);
|
ret.append(q);
|
||||||
}
|
}
|
||||||
|
@ -1287,7 +1287,7 @@ WindowQuadList WindowQuadList::filterOut(WindowQuadType type) const
|
||||||
for (const WindowQuad & q : *this) {
|
for (const WindowQuad & q : *this) {
|
||||||
if (q.type() == type) { // something to filter out, make a copy and filter
|
if (q.type() == type) { // something to filter out, make a copy and filter
|
||||||
WindowQuadList ret;
|
WindowQuadList ret;
|
||||||
foreach (const WindowQuad & q, *this) {
|
Q_FOREACH (const WindowQuad & q, *this) {
|
||||||
if (q.type() != type)
|
if (q.type() != type)
|
||||||
ret.append(q);
|
ret.append(q);
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ Application::~Application()
|
||||||
|
|
||||||
void Application::notifyStarted()
|
void Application::notifyStarted()
|
||||||
{
|
{
|
||||||
emit started();
|
Q_EMIT started();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::destroyAtoms()
|
void Application::destroyAtoms()
|
||||||
|
@ -278,7 +278,7 @@ void Application::createWorkspace()
|
||||||
|
|
||||||
// create workspace.
|
// create workspace.
|
||||||
(void) new Workspace();
|
(void) new Workspace();
|
||||||
emit workspaceCreated();
|
Q_EMIT workspaceCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::createInput()
|
void Application::createInput()
|
||||||
|
@ -295,7 +295,7 @@ void Application::createScreens()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Screens::create(this);
|
Screens::create(this);
|
||||||
emit screensCreated();
|
Q_EMIT screensCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::createAtoms()
|
void Application::createAtoms()
|
||||||
|
@ -597,7 +597,7 @@ void Application::initPlatform(const KPluginMetaData &plugin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit platformCreated();
|
Q_EMIT platformCreated();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ void OnScreenNotification::setVisible(bool visible)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_visible = visible;
|
m_visible = visible;
|
||||||
emit visibleChanged();
|
Q_EMIT visibleChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString OnScreenNotification::message() const
|
QString OnScreenNotification::message() const
|
||||||
|
@ -113,7 +113,7 @@ void OnScreenNotification::setMessage(const QString &message)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_message = message;
|
m_message = message;
|
||||||
emit messageChanged();
|
Q_EMIT messageChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString OnScreenNotification::iconName() const
|
QString OnScreenNotification::iconName() const
|
||||||
|
@ -127,7 +127,7 @@ void OnScreenNotification::setIconName(const QString &iconName)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_iconName = iconName;
|
m_iconName = iconName;
|
||||||
emit iconNameChanged();
|
Q_EMIT iconNameChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
int OnScreenNotification::timeout() const
|
int OnScreenNotification::timeout() const
|
||||||
|
@ -141,7 +141,7 @@ void OnScreenNotification::setTimeout(int timeout)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_timer->setInterval(timeout);
|
m_timer->setInterval(timeout);
|
||||||
emit timeoutChanged();
|
Q_EMIT timeoutChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnScreenNotification::show()
|
void OnScreenNotification::show()
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue