summaryrefslogtreecommitdiff
path: root/shelf.c
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2008-02-12 12:03:27 +0100
committerKristian Lyngstol <kristian@bohemians.org>2008-02-12 12:03:27 +0100
commit1181800614d3d65fa180b434e7512078eb0abc70 (patch)
treef93a569d755311606b0f2aa9bba3b707d46f763f /shelf.c
parenta1d9b5534f23fc72515f1de84745c704cce1b6b0 (diff)
downloadshelf-1181800614d3d65fa180b434e7512078eb0abc70.tar.gz
shelf-1181800614d3d65fa180b434e7512078eb0abc70.tar.bz2
Add a reset binding
Diffstat (limited to 'shelf.c')
-rw-r--r--shelf.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/shelf.c b/shelf.c
index e450f1a..6413192 100644
--- a/shelf.c
+++ b/shelf.c
@@ -446,6 +446,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.
*/
@@ -870,6 +886,7 @@ shelfInitDisplay (CompPlugin *p,
}
shelfSetTriggerKeyInitiate (d, shelfTrigger);
+ shelfSetResetKeyInitiate (d, shelfReset);
shelfSetTriggerscreenKeyInitiate (d, shelfTriggerScreen);
shelfSetIncButtonInitiate (d, shelfInc);
shelfSetDecButtonInitiate (d, shelfDec);