aboutsummaryrefslogtreecommitdiff
path: root/xdeadzone.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-02-01 13:17:43 -0500
committerB. Watson <urchlay@slackware.uk>2024-02-01 13:17:43 -0500
commite194849bdaec6f61812cd0f3aca1235075acdeca (patch)
tree41b0c36829a60a29328d4a9569b849453da1cd51 /xdeadzone.c
parentf53d06bbec6ef3ae051c4af85870a7a88ca11ce2 (diff)
downloadxdeadzone-e194849bdaec6f61812cd0f3aca1235075acdeca.tar.gz
Do not allow "-n -i".
Diffstat (limited to 'xdeadzone.c')
-rw-r--r--xdeadzone.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xdeadzone.c b/xdeadzone.c
index e3446f9..2e43dc3 100644
--- a/xdeadzone.c
+++ b/xdeadzone.c
@@ -154,6 +154,9 @@ int main(int argc, char **argv) {
if(width == 0 || height == 0)
errmsg("bad geometry: width and height must be non-zero");
+ if(normal_window && !visible)
+ errmsg("cannot combine -i (invisible) with -n (normal window)");
+
if(!(d = XOpenDisplay(NULL)))
errmsg("can't open X display");
@@ -188,7 +191,7 @@ int main(int argc, char **argv) {
DefaultRootWindow(d),
x, y, width, height, 0,
CopyFromParent,
- InputOutput,
+ (visible ? InputOutput : InputOnly),
CopyFromParent,
(visible ? CWBackPixel : 0) | CWOverrideRedirect | CWEventMask,
&setattr);