Merge branch 'KDE/4.11'
This commit is contained in:
commit
0b4d56a326
5 changed files with 60 additions and 59 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>630</width>
|
||||
<width>486</width>
|
||||
<height>588</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -2597,7 +2597,7 @@ but this may sometimes fail or superact.
|
|||
<slot>detectClicked()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>321</x>
|
||||
<x>285</x>
|
||||
<y>124</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
|
@ -2613,7 +2613,7 @@ but this may sometimes fail or superact.
|
|||
<slot>wmclassMatchChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>301</x>
|
||||
<x>297</x>
|
||||
<y>196</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
|
@ -2629,7 +2629,7 @@ but this may sometimes fail or superact.
|
|||
<slot>roleMatchChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>301</x>
|
||||
<x>297</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
|
@ -2638,5 +2638,37 @@ but this may sometimes fail or superact.
|
|||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>title_match</sender>
|
||||
<signal>activated(int)</signal>
|
||||
<receiver>KWin::RulesWidgetBase</receiver>
|
||||
<slot>titleMatchChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>231</x>
|
||||
<y>482</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>242</x>
|
||||
<y>293</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>machine_match</sender>
|
||||
<signal>activated(int)</signal>
|
||||
<receiver>KWin::RulesWidgetBase</receiver>
|
||||
<slot>machineMatchChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>194</x>
|
||||
<y>509</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>242</x>
|
||||
<y>293</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
|
Loading…
Reference in a new issue