summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-03-12 02:14:34 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-03-12 02:14:34 +0800
commit285a62449f79c1416dcaf6e7dddb8f74d2a6b3eb (patch)
tree0db91fc620ac7d50ddcf66df6ec95f88ae19c032
parent55997d7b3d8863212006e87c6780d522b9a0b5ea (diff)
downloadstaticswitcher-285a62449f79c1416dcaf6e7dddb8f74d2a6b3eb.tar.gz
staticswitcher-285a62449f79c1416dcaf6e7dddb8f74d2a6b3eb.tar.bz2
Update for core API change
-rw-r--r--src/staticswitcher.cpp10
-rw-r--r--staticswitcher.xml.in9
2 files changed, 14 insertions, 5 deletions
diff --git a/src/staticswitcher.cpp b/src/staticswitcher.cpp
index 988ae09..8e85f8d 100644
--- a/src/staticswitcher.cpp
+++ b/src/staticswitcher.cpp
@@ -282,7 +282,7 @@ StaticSwitchScreen::createPopup ()
::screen->setWindowProp (popupWindow, Atoms::winDesktop, 0xffffffff);
- setSelectedWindowHint ();
+ setSelectedWindowHint (false);
updatePopupWindow ();
}
@@ -374,7 +374,7 @@ StaticSwitchScreen::initiate (SwitchWindowSelection selection,
showPopup ();
}
- setSelectedWindowHint ();
+ setSelectedWindowHint (optionGetFocusOnSwitch ());
}
lastActiveWindow = screen->activeWindow ();
@@ -451,7 +451,7 @@ switchTerminate (CompAction *action,
w->moveInputFocusTo ();
}
- ss->setSelectedWindowHint ();
+ ss->setSelectedWindowHint (false);
ss->lastActiveNum = 0;
@@ -505,7 +505,7 @@ switchInitiateCommon (CompAction *action,
action->setState (action->state () | CompAction::StateTermButton);
}
- ss->switchToWindow (nextWindow, ss->optionGetAutoChangeVp ());
+ ss->switchToWindow (nextWindow, ss->optionGetAutoChangeVp (), ss->optionGetFocusOnSwitch ());
return false;
}
@@ -606,7 +606,7 @@ StaticSwitchScreen::windowRemove (CompWindow *w)
if (popup)
CompositeWindow::get (popup)->addDamage ();
- setSelectedWindowHint ();
+ setSelectedWindowHint (optionGetFocusOnSwitch ());
}
if (old != selectedWindow)
diff --git a/staticswitcher.xml.in b/staticswitcher.xml.in
index 4f3a6fd..ef1e8a0 100644
--- a/staticswitcher.xml.in
+++ b/staticswitcher.xml.in
@@ -213,6 +213,15 @@
</desc>
</option>
<subgroup>
+ <option name="focus_on_switch" type="bool">
+ <_short>Focus on Switch</_short>
+ <_long>Focus windows when they are visible during the switch</_long>
+ </option>
+ <option name="bring_to_front" type="bool">
+ <_short>Bring To Front</_short>
+ <_long>Bring selected window to front</_long>
+ <default>true</default>
+ </option>
<_short>Selected Window Highlight</_short>
<option name="highlight_mode" type="int">
<_short>Highlight Mode</_short>