summaryrefslogtreecommitdiff
path: root/shelf.c
diff options
context:
space:
mode:
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 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);