diff options
| author | Aaahh Ahh <woohoomoo2u@gmail.com> | 2017-11-26 14:49:53 -0500 |
|---|---|---|
| committer | Aaahh Ahh <woohoomoo2u@gmail.com> | 2017-11-26 14:49:53 -0500 |
| commit | 0d1fe7095bdd58ad9d15d659e4be5bac7b5a3aea (patch) | |
| tree | 8f4e7a792073b45cc257c851b097eee08bf4a44a | |
| parent | 099ea746dae5da88db6038a81631a0ddeeb0cc47 (diff) | |
Add force desktop window type flag
https://github.com/valgusk/xwinwrap/commit/2c6e94889cab1ca182d0e7c174cb23dd6a5678b4
This flag places xwinwrap behind desktop icons on ubuntu
| -rw-r--r-- | xwinwrap.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -133,12 +133,13 @@ static void sigHandler (int sig) static void usage (void) { fprintf(stderr, "%s \n", NAME); - fprintf (stderr, "\nUsage: %s [-g {w}x{h}+{x}+{y}] [-ni] [-argb] [-fs] [-s] [-st] [-sp] [-a] " + fprintf (stderr, "\nUsage: %s [-g {w}x{h}+{x}+{y}] [-ni] [-argb] [-fdt] [-fs] [-s] [-st] [-sp] [-a] [-d] " "[-b] [-nf] [-o OPACITY] [-sh SHAPE] [-ov]-- COMMAND ARG1...\n", NAME); fprintf (stderr, "Options:\n \ -g - Specify Geometry (w=width, h=height, x=x-coord, y=y-coord. ex: -g 640x480+100+100)\n \ -ni - Ignore Input\n \ -argb - RGB\n \ + -fdt - force WID window a desktop type window\n \ -fs - Full Screen\n \ -un - Undecorated\n \ -s - Sticky\n \ @@ -275,6 +276,7 @@ int main(int argc, char **argv) bool have_argb_visual = false; bool noInput = false; bool argb = false; + bool set_desktop_type = false; bool fullscreen = false; bool noFocus = false; bool override = false; @@ -309,6 +311,10 @@ int main(int argc, char **argv) { argb = true; } + else if (strcmp (argv[i], "-fdt") == 0) + { + set_desktop_type = true; + } else if (strcmp (argv[i], "-fs") == 0) { fullscreen = 1; @@ -526,7 +532,12 @@ int main(int argc, char **argv) xa = ATOM(_NET_WM_WINDOW_TYPE); Atom prop; - prop = ATOM(_NET_WM_WINDOW_TYPE_NORMAL); + if (set_desktop_type) + { + prop = ATOM(_NET_WM_WINDOW_TYPE_DESKTOP); + } else { + prop = ATOM(_NET_WM_WINDOW_TYPE_NORMAL); + } XChangeProperty(display, window.window, xa, XA_ATOM, 32, PropModeReplace, (unsigned char *) &prop, 1); |
