summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-09-05 13:30:17 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-09-05 13:30:17 +0800
commita3115e3062811781039b27e8051eaacf3caada9f (patch)
tree9a1cd683d187e3053908ec8e859a957d0f186871
parent8d8fda701587021ea51029fee6b986c9d84ca977 (diff)
downloadvignetting-a3115e3062811781039b27e8051eaacf3caada9f.tar.gz
vignetting-a3115e3062811781039b27e8051eaacf3caada9f.tar.bz2
Only apply vignetting to windows where it makes sense
-rw-r--r--src/vignetting.cpp10
-rw-r--r--vignetting.xml.in5
2 files changed, 14 insertions, 1 deletions
diff --git a/src/vignetting.cpp b/src/vignetting.cpp
index be8d1d4..7d8df81 100644
--- a/src/vignetting.cpp
+++ b/src/vignetting.cpp
@@ -185,6 +185,12 @@ VigScreen::optionChanged (CompOption *opt,
{
case VignettingOptions::Quality:
renderVignette ();
+ break;
+ case VignettingOptions::WindowMatch:
+ foreach (CompWindow *w, screen->windows ())
+ GLWindow::get (w)->glDrawSetEnabled (VigWindow::get (w),
+ opt->value ().match ().evaluate (w));
+ break;
default:
break;
}
@@ -200,7 +206,9 @@ VigWindow::VigWindow (CompWindow *w) :
cWindow (CompositeWindow::get (w)),
gWindow (GLWindow::get (w))
{
- GLWindowInterface::setHandler (gWindow);
+ bool enabled =
+ VigScreen::get (screen)->optionGetWindowMatch ().evaluate (w);
+ GLWindowInterface::setHandler (gWindow, enabled);
}
VigWindow::~VigWindow ()
diff --git a/vignetting.xml.in b/vignetting.xml.in
index 469ee57..b08adac 100644
--- a/vignetting.xml.in
+++ b/vignetting.xml.in
@@ -26,6 +26,11 @@
</relation>
</deps>
<options>
+ <option name="window_match" type="match">
+ <_short>Window Match</_short>
+ <_long>Which windows should be vignetted</_long>
+ <default>Normal | Dialog | Modal Dialog | Desktop</default>
+ </option>
<option name="quality" type="int">
<_short>Quality</_short>
<_long>Quality of Vignette Rendering</_long>