summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-02-12 12:45:47 +0100
committerDanny Baumann <dannybaumann@web.de>2008-02-12 12:45:47 +0100
commitf7f30123a6286959e87cd941d9d5d58e09b56f44 (patch)
tree67d71b0e2eda1f9e878c7366c45fb205688ea4f1
parent68789a5504f8f0e860355eb7cf83bdd7df94e7d4 (diff)
parent1181800614d3d65fa180b434e7512078eb0abc70 (diff)
downloadshelf-f7f30123a6286959e87cd941d9d5d58e09b56f44.tar.gz
shelf-f7f30123a6286959e87cd941d9d5d58e09b56f44.tar.bz2
Merge branch 'master' of git+ssh://maniac@git.opencompositing.org/git/fusion/plugins/shelf
-rw-r--r--shelf.c17
-rw-r--r--shelf.xml.in4
2 files changed, 21 insertions, 0 deletions
diff --git a/shelf.c b/shelf.c
index e2059aa..e7a8067 100644
--- a/shelf.c
+++ b/shelf.c
@@ -449,6 +449,22 @@ shelfTrigger (CompDisplay *d,
return TRUE;
}
+/* Reset window to 1.0f scale */
+static Bool
+shelfReset (CompDisplay *d,
+ CompAction *action,
+ CompActionState state,
+ CompOption *option,
+ int nOption)
+{
+ CompWindow *w = findWindowAtDisplay (d, d->activeWindow);
+ if (!w)
+ return TRUE;
+
+ shelfScaleWindow (w, 1.0f);
+ return TRUE;
+}
+
/* Returns the ratio to multiply by to get a window that's 1/ration the
* size of the screen.
*/
@@ -873,6 +889,7 @@ shelfInitDisplay (CompPlugin *p,
}
shelfSetTriggerKeyInitiate (d, shelfTrigger);
+ shelfSetResetKeyInitiate (d, shelfReset);
shelfSetTriggerscreenKeyInitiate (d, shelfTriggerScreen);
shelfSetIncButtonInitiate (d, shelfInc);
shelfSetDecButtonInitiate (d, shelfDec);
diff --git a/shelf.xml.in b/shelf.xml.in
index 7eed12a..579ef4f 100644
--- a/shelf.xml.in
+++ b/shelf.xml.in
@@ -12,6 +12,10 @@
<_long> Scale a window down to a portion of it's size. </_long>
<default>&lt;Super&gt;l</default>
</option>
+ <option name="reset_key" type="key">
+ <_short>Reset the window to original size</_short>
+ <_long>Resets the currently focused window to original size</_long>
+ </option>
<option name="triggerscreen_key" type="key">
<_short>Trigger scale down to screen</_short>
<_long> Scale a window down to a ration of the screen size. Respectively half, a third or a sixth of the screen.</_long>