diff --git a/client.cpp b/client.cpp index 985fae91c8..b269502703 100644 --- a/client.cpp +++ b/client.cpp @@ -709,7 +709,8 @@ void Client::updateShape() } else if (app_noborder) { xcb_shape_mask(connection(), XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING, frameId(), 0, 0, XCB_PIXMAP_NONE); detectNoBorder(); - app_noborder = noborder = rules()->checkNoBorder(noborder); + app_noborder = noborder; + noborder = rules()->checkNoBorder(noborder || motif_noborder); updateDecoration(true); } diff --git a/effects/mouseclick/mouseclick.cpp b/effects/mouseclick/mouseclick.cpp index 8957d26737..dbdcc9dbb1 100644 --- a/effects/mouseclick/mouseclick.cpp +++ b/effects/mouseclick/mouseclick.cpp @@ -52,8 +52,6 @@ MouseClickEffect::MouseClickEffect() KGlobalAccel::self()->setShortcut(a, QList() << Qt::META + Qt::Key_Asterisk); connect(a, SIGNAL(triggered(bool)), this, SLOT(toggleEnabled())); - connect(effects, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)), - this, SLOT(slotMouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers))); reconfigure(ReconfigureAll); m_buttons[0] = new MouseButton(i18n("Left"), Qt::LeftButton); @@ -224,6 +222,17 @@ bool MouseClickEffect::isPressed(Qt::MouseButtons button, Qt::MouseButtons butto void MouseClickEffect::toggleEnabled() { m_enabled = !m_enabled; + + if (m_enabled) { + connect(effects, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)), + SLOT(slotMouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers))); + effects->startMousePolling(); + } else { + disconnect(effects, SIGNAL(mouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers)), + this, SLOT(slotMouseChanged(QPoint,QPoint,Qt::MouseButtons,Qt::MouseButtons,Qt::KeyboardModifiers,Qt::KeyboardModifiers))); + effects->stopMousePolling(); + } + if (m_clicks.size() > 0) { foreach (const MouseEvent* click, m_clicks) { delete click; @@ -235,12 +244,6 @@ void MouseClickEffect::toggleEnabled() m_buttons[i]->m_time = 0; m_buttons[i]->m_isPressed = false; } - - if (m_enabled) { - effects->startMousePolling(); - } else { - effects->stopMousePolling(); - } } bool MouseClickEffect::isActive() const