diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp
index ce6587c6a5..5e4a8421b7 100644
--- a/effects/cube/cube.cpp
+++ b/effects/cube/cube.cpp
@@ -52,7 +52,6 @@ KWIN_EFFECT_SUPPORTED(cube, CubeEffect::supported())
CubeEffect::CubeEffect()
: activated(false)
- , mousePolling(false)
, cube_painting(false)
, keyboard_grab(false)
, schedule_close(false)
@@ -122,8 +121,6 @@ CubeEffect::CubeEffect()
connect(effects, SIGNAL(tabBoxAdded(int)), this, SLOT(slotTabBoxAdded(int)));
connect(effects, SIGNAL(tabBoxClosed()), this, SLOT(slotTabBoxClosed()));
connect(effects, SIGNAL(tabBoxUpdated()), this, SLOT(slotTabBoxUpdated()));
- 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);
}
@@ -1900,10 +1897,6 @@ void CubeEffect::setActive(bool active)
connect(watcher, SIGNAL(finished()), SLOT(slotWallPaperLoaded()));
watcher->setFuture(QtConcurrent::run(this, &CubeEffect::loadWallPaper, wallpaperPath));
}
- if (!mousePolling) {
- effects->startMousePolling();
- mousePolling = true;
- }
activated = true;
activeScreen = effects->activeScreen();
keyboard_grab = effects->grabKeyboard(this);
@@ -1935,18 +1928,13 @@ void CubeEffect::setActive(bool active)
m_rotationMatrix.setToIdentity();
effects->addRepaintFull();
} else {
- if (mousePolling) {
- effects->stopMousePolling();
- mousePolling = false;
- }
schedule_close = true;
// we have to add a repaint, to start the deactivating
effects->addRepaintFull();
}
}
-void CubeEffect::slotMouseChanged(const QPoint& pos, const QPoint& oldpos, Qt::MouseButtons buttons,
- Qt::MouseButtons oldbuttons, Qt::KeyboardModifiers, Qt::KeyboardModifiers)
+void CubeEffect::windowInputMouseEvent(QEvent* e)
{
if (!activated)
return;
@@ -1954,8 +1942,15 @@ void CubeEffect::slotMouseChanged(const QPoint& pos, const QPoint& oldpos, Qt::M
return;
if (stop)
return;
- QRect rect = effects->clientArea(FullArea, activeScreen, effects->currentDesktop());
- if (buttons.testFlag(Qt::LeftButton)) {
+
+ QMouseEvent *mouse = dynamic_cast< QMouseEvent* >(e);
+ if (!mouse)
+ return;
+
+ static QPoint oldpos;
+ if (mouse->type() == QEvent::MouseMove && mouse->buttons().testFlag(Qt::LeftButton)) {
+ const QPoint pos = mouse->pos();
+ QRect rect = effects->clientArea(FullArea, activeScreen, effects->currentDesktop());
bool repaint = false;
// vertical movement only if there is not a rotation
if (!verticalRotating) {
@@ -1991,25 +1986,15 @@ void CubeEffect::slotMouseChanged(const QPoint& pos, const QPoint& oldpos, Qt::M
rotateCube();
effects->addRepaintFull();
}
+ oldpos = pos;
}
- if (!oldbuttons.testFlag(Qt::LeftButton) && buttons.testFlag(Qt::LeftButton)) {
- effects->defineCursor(Qt::ClosedHandCursor);
- }
- if (oldbuttons.testFlag(Qt::LeftButton) && !buttons.testFlag(Qt::LeftButton)) {
- effects->defineCursor(Qt::OpenHandCursor);
- if (closeOnMouseRelease)
- setActive(false);
- }
- if (oldbuttons.testFlag(Qt::RightButton) && !buttons.testFlag(Qt::RightButton)) {
- // end effect on right mouse button
- setActive(false);
- }
-}
-void CubeEffect::windowInputMouseEvent(QEvent* e)
-{
- QMouseEvent *mouse = dynamic_cast< QMouseEvent* >(e);
- if (mouse && mouse->type() == QEvent::MouseButtonRelease) {
+ else if (mouse->type() == QEvent::MouseButtonPress && mouse->button() == Qt::LeftButton) {
+ oldpos = mouse->pos();
+ }
+
+ else if (mouse->type() == QEvent::MouseButtonRelease) {
+ effects->defineCursor(Qt::OpenHandCursor);
if (mouse->button() == Qt::XButton1) {
if (!rotating && !start) {
rotating = true;
@@ -2026,8 +2011,7 @@ void CubeEffect::windowInputMouseEvent(QEvent* e)
}
}
effects->addRepaintFull();
- }
- if (mouse->button() == Qt::XButton2) {
+ } else if (mouse->button() == Qt::XButton2) {
if (!rotating && !start) {
rotating = true;
if (invertMouse)
@@ -2043,6 +2027,8 @@ void CubeEffect::windowInputMouseEvent(QEvent* e)
}
}
effects->addRepaintFull();
+ } else if (mouse->button() == Qt::RightButton || (mouse->button() == Qt::LeftButton && closeOnMouseRelease)) {
+ setActive(false);
}
}
}
diff --git a/effects/cube/cube.h b/effects/cube/cube.h
index 2de304570a..4fb15adfd2 100644
--- a/effects/cube/cube.h
+++ b/effects/cube/cube.h
@@ -137,8 +137,6 @@ private slots:
void slotTabBoxAdded(int mode);
void slotTabBoxUpdated();
void slotTabBoxClosed();
- void slotMouseChanged(const QPoint& pos, const QPoint& oldpos, Qt::MouseButtons buttons,
- Qt::MouseButtons oldbuttons, Qt::KeyboardModifiers modifiers, Qt::KeyboardModifiers oldmodifiers);
void slotCubeCapLoaded();
void slotWallPaperLoaded();
private:
@@ -171,7 +169,6 @@ private:
QImage loadCubeCap(const QString &capPath);
QImage loadWallPaper(const QString &file);
bool activated;
- bool mousePolling;
bool cube_painting;
bool keyboard_grab;
bool schedule_close;
diff --git a/effects/startupfeedback/startupfeedback.cpp b/effects/startupfeedback/startupfeedback.cpp
index e0dc7c4445..ca1964d763 100644
--- a/effects/startupfeedback/startupfeedback.cpp
+++ b/effects/startupfeedback/startupfeedback.cpp
@@ -164,10 +164,6 @@ void StartupFeedbackEffect::prePaintScreen(ScreenPrePaintData& data, int time)
default:
break; // nothing
}
- data.paint.unite(m_dirtyRect);
- m_dirtyRect = QRect();
- m_currentGeometry = feedbackRect();
- data.paint.unite(m_currentGeometry);
}
effects->prePaintScreen(data, time);
}
@@ -243,18 +239,9 @@ void StartupFeedbackEffect::paintScreen(int mask, QRegion region, ScreenPaintDat
void StartupFeedbackEffect::postPaintScreen()
{
if (m_active) {
- switch(m_type) {
- case BouncingFeedback: // fall through
- case BlinkingFeedback:
- // repaint the icon
- m_dirtyRect = m_currentGeometry;
- effects->addRepaint(m_dirtyRect);
- break;
- case PassiveFeedback: // fall through
- default:
- // no need to repaint - no change
- break;
- }
+ m_dirtyRect = m_currentGeometry; // ensure the now dirty region is cleaned on the next pass
+ if (m_type == BlinkingFeedback || m_type == BouncingFeedback)
+ effects->addRepaint(m_dirtyRect); // we also have to trigger a repaint
}
effects->postPaintScreen();
}
@@ -324,7 +311,7 @@ void StartupFeedbackEffect::start(const QString& icon)
iconPixmap = SmallIcon("system-run");
prepareTextures(iconPixmap);
m_dirtyRect = m_currentGeometry = feedbackRect();
- effects->addRepaintFull();
+ effects->addRepaint(m_dirtyRect);
}
void StartupFeedbackEffect::stop()
diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp
index 3a59df84e7..b30db54038 100644
--- a/kcmkwin/kwinrules/ruleswidget.cpp
+++ b/kcmkwin/kwinrules/ruleswidget.cpp
@@ -123,7 +123,6 @@ RulesWidget::RulesWidget(QWidget* parent)
SETUP(disableglobalshortcuts, force);
SETUP(blockcompositing, force);
- connect (machine_match, SIGNAL(currentIndexChanged(int)), SLOT(machineMatchChanged()));
connect (shortcut_edit, SIGNAL(clicked()), SLOT(shortcutEditClicked()));
edit_reg_wmclass->hide();
diff --git a/kcmkwin/kwinrules/ruleswidgetbase.ui b/kcmkwin/kwinrules/ruleswidgetbase.ui
index 70f568753b..a2faad9814 100644
--- a/kcmkwin/kwinrules/ruleswidgetbase.ui
+++ b/kcmkwin/kwinrules/ruleswidgetbase.ui
@@ -6,7 +6,7 @@
0
0
- 630
+ 486
588
@@ -2597,7 +2597,7 @@ but this may sometimes fail or superact.
detectClicked()
- 321
+ 285
124
@@ -2613,7 +2613,7 @@ but this may sometimes fail or superact.
wmclassMatchChanged()
- 301
+ 297
196
@@ -2629,7 +2629,7 @@ but this may sometimes fail or superact.
roleMatchChanged()
- 301
+ 297
254
@@ -2638,5 +2638,37 @@ but this may sometimes fail or superact.
+
+ title_match
+ activated(int)
+ KWin::RulesWidgetBase
+ titleMatchChanged()
+
+
+ 231
+ 482
+
+
+ 242
+ 293
+
+
+
+
+ machine_match
+ activated(int)
+ KWin::RulesWidgetBase
+ machineMatchChanged()
+
+
+ 194
+ 509
+
+
+ 242
+ 293
+
+
+