summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-12-24 11:05:55 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-12-24 11:05:55 +0800
commit86493819db2cc050a4b233d2390405868a903bad (patch)
treeca44573a2818251d526d1e19f11b0c70e14c5862
parentb3c2c2203307d903c9c4cf980023cf6d275e2be1 (diff)
parent07f258e4a9df005681158a006e9ea062e5bbab95 (diff)
downloadcompiz-with-glib-mainloop-86493819db2cc050a4b233d2390405868a903bad.tar.gz
compiz-with-glib-mainloop-86493819db2cc050a4b233d2390405868a903bad.tar.bz2
Merge branch 'master' of git://git.compiz.org/compiz/core into glibmm-experimental
-rw-r--r--plugins/decor/src/decor.cpp3
-rw-r--r--plugins/rotate/src/rotate.cpp6
-rw-r--r--plugins/scale/src/scale.cpp11
3 files changed, 14 insertions, 6 deletions
diff --git a/plugins/decor/src/decor.cpp b/plugins/decor/src/decor.cpp
index 0070271..49b382f 100644
--- a/plugins/decor/src/decor.cpp
+++ b/plugins/decor/src/decor.cpp
@@ -647,8 +647,7 @@ DecorWindow::shiftY ()
static bool
decorOffsetMove (CompWindow *w, XWindowChanges xwc, unsigned int mask)
{
- CompOption::Vector o;
- o.resize (1);
+ CompOption::Vector o (1);
o.at (0).setName ("window", CompOption::TypeInt);
o.at (0).value ().set ((int) w->id ());
diff --git a/plugins/rotate/src/rotate.cpp b/plugins/rotate/src/rotate.cpp
index d72802c..add76d5 100644
--- a/plugins/rotate/src/rotate.cpp
+++ b/plugins/rotate/src/rotate.cpp
@@ -196,6 +196,7 @@ RotateScreen::preparePaint (int msSinceLastPaint)
if (fabs (mYrot) < 0.1f)
{
+ CompOption::Vector o (0);
float xrot;
int tx;
@@ -237,6 +238,8 @@ RotateScreen::preparePaint (int msSinceLastPaint)
screen->focusDefaultWindow ();
mMoveWindow = 0;
+
+ screen->handleCompizEvent ("rotate", "end_viewport_switch", o);
}
break;
}
@@ -386,6 +389,7 @@ RotateScreen::initiate (CompAction *action,
CompAction::State state,
CompOption::Vector &options)
{
+ CompOption::Vector o (0);
if (screen->vpSize ().width () < 2)
return false;
@@ -412,6 +416,8 @@ RotateScreen::initiate (CompAction *action,
else
cubeScreen->rotationState (CubeScreen::RotationChange);
+ screen->handleCompizEvent ("rotate", "start_viewport_switch", o);
+
if (!mGrabIndex)
{
mGrabIndex = screen->pushGrab (screen->invisibleCursor (), "rotate");
diff --git a/plugins/scale/src/scale.cpp b/plugins/scale/src/scale.cpp
index 8fbcbb3..6939aa4 100644
--- a/plugins/scale/src/scale.cpp
+++ b/plugins/scale/src/scale.cpp
@@ -1438,8 +1438,7 @@ PrivateScaleScreen::handleEvent (XEvent *event)
}
break;
case ButtonPress:
- if (event->xbutton.button == Button1 &&
- screen->root () == event->xbutton.root &&
+ if (screen->root () == event->xbutton.root &&
grabIndex &&
state != ScaleScreen::In)
{
@@ -1449,12 +1448,16 @@ PrivateScaleScreen::handleEvent (XEvent *event)
o.push_back (CompOption ("root", CompOption::TypeInt));
o[0].value ().set ((int) screen->root ());
- if (selectWindowAt (button->x_root, button->y_root, true))
+ /* Button1 terminates scale mode, other buttons can select
+ * windows */
+ if (selectWindowAt (button->x_root, button->y_root, true) &&
+ event->xbutton.button == Button1)
{
scaleTerminate (&optionGetInitiateEdge (), 0, o);
scaleTerminate (&optionGetInitiateKey (), 0, o);
}
- else if (optionGetShowDesktop ())
+ else if (optionGetShowDesktop () &&
+ event->xbutton.button == Button1)
{
CompPoint pointer (button->x_root, button->y_root);
CompRect workArea (screen->workArea ());