summaryrefslogtreecommitdiff
path: root/plugins/scale/src/scale.cpp
diff options
context:
space:
mode:
authorJoel Bosveld <Joel.Bosveld@gmail.com>2009-07-07 16:37:13 +0800
committerJoel Bosveld <Joel.Bosveld@gmail.com>2009-07-07 16:45:05 +0800
commit700b18bffb6924b484464093d999349c010c4595 (patch)
tree78e210f5eed4dea31f16c8e576797d55fd9fe74d /plugins/scale/src/scale.cpp
parentb51c40029a9f776429cabcd745482cb5f04c9b11 (diff)
downloadcompiz-with-glib-mainloop-700b18bffb6924b484464093d999349c010c4595.tar.gz
compiz-with-glib-mainloop-700b18bffb6924b484464093d999349c010c4595.tar.bz2
scale: when only scaling windows on current output, only display on current one
Diffstat (limited to 'plugins/scale/src/scale.cpp')
-rw-r--r--plugins/scale/src/scale.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/plugins/scale/src/scale.cpp b/plugins/scale/src/scale.cpp
index e3accee..334033c 100644
--- a/plugins/scale/src/scale.cpp
+++ b/plugins/scale/src/scale.cpp
@@ -286,7 +286,7 @@ ScaleWindow::setScaledPaintAttributes (GLWindowPaintAttrib& attrib)
{
int moMode, output;
- moMode = priv->spScreen->optionGetMultioutputMode ();
+ moMode = priv->spScreen->getMultioutputMode ();
switch (moMode) {
case ScaleOptions::MultioutputModeOnCurrentOutputDevice:
@@ -483,7 +483,7 @@ PrivateScaleScreen::layoutSlots ()
int i;
int moMode;
- moMode = optionGetMultioutputMode ();
+ moMode = getMultioutputMode ();
/* if we have only one head, we don't need the
additional effort of the all outputs mode */
@@ -1603,6 +1603,19 @@ PrivateScaleScreen::updateOpacity ()
opacity = (OPAQUE * optionGetOpacity ()) / 100;
}
+/* When we are only scaling windows on the current output, over-ride the
+ * multioutput mode so that windows will only be displayed on the current
+ * output, regardless of the setting.
+ */
+int
+PrivateScaleScreen::getMultioutputMode ()
+{
+ if (type == ScaleTypeOutput)
+ return MultioutputModeOnCurrentOutputDevice;
+
+ return optionGetMultioutputMode ();
+}
+
PrivateScaleWindow::PrivateScaleWindow (CompWindow *w) :
window (w),