Merge branch 'KDE/4.11'
Conflicts: kwin/effects/mouseclick/mouseclick.cpp plasma/generic/scriptengines/python/plasma-scriptengine-dataengine-python.desktop plasma/generic/scriptengines/python/plasma-scriptengine-runner-python.desktop plasma/generic/scriptengines/ruby/plasma-scriptengine-ruby-applet.desktop plasma/generic/scriptengines/ruby/plasma-scriptengine-ruby-dataengine.desktop
This commit is contained in:
commit
66375ad741
2 changed files with 13 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,8 +52,6 @@ MouseClickEffect::MouseClickEffect()
|
|||
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << 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
|
||||
|
|
Loading…
Reference in a new issue