summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-02-11 09:39:44 +0100
committerDanny Baumann <dannybaumann@web.de>2008-02-11 09:39:44 +0100
commitc5e079036df0f4b135a8d1871a114c6321f0aee8 (patch)
treee418c367e0858cd5b81f077c330090bc093ff69d
parenta0380511834922d1624d5e61bfb04711a5a612ea (diff)
downloadput-c5e079036df0f4b135a8d1871a114c6321f0aee8.tar.gz
put-c5e079036df0f4b135a8d1871a114c6321f0aee8.tar.bz2
Use putToViewport, which validates the face parameter.
-rw-r--r--put.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/put.c b/put.c
index 87b948d..cddc7bf 100644
--- a/put.c
+++ b/put.c
@@ -712,8 +712,10 @@ putInitiate (CompDisplay *d,
if (typeString)
type = putTypeFromString (typeString);
- return putInitiateCommon (d, action, state,
- option, nOption, type);
+ if (type == PutViewport)
+ return putToViewport (d, action, state, option, nOption);
+ else
+ return putInitiateCommon (d, action, state, option, nOption, type);
}
static Bool
@@ -749,6 +751,9 @@ putToViewport (CompDisplay *d,
}
}
+ if (face < 0)
+ return FALSE;
+
/* setup the options for putInitiate */
o[0].type = CompOptionTypeInt;
o[0].name = "x";