Update xwinwrap.c

This commit is contained in:
Maxim 2019-03-22 20:35:37 -05:00 committed by GitHub
parent 7a9f910885
commit aa771f7035
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 20 deletions

View File

@ -47,7 +47,7 @@
* Tech Blog: https://www.itdominator.com/ * Tech Blog: https://www.itdominator.com/
* *
* Changelog: * Changelog:
* 22-March-19: 1. Cleaned up code formatting. * 3-March-19: 1. Cleaned up code formatting.
* 2. Removed unused DEBUG_MSG reference. * 2. Removed unused DEBUG_MSG reference.
* 3. Moved functions to a more reasonable order. * 3. Moved functions to a more reasonable order.
* 4. Compile dev library list 32 & 64 bit: * 4. Compile dev library list 32 & 64 bit:
@ -95,7 +95,7 @@ static int nChildArgv = 0;
int debug = 0; int debug = 0;
char desktop_window_name[DESKTOP_WINDOW_NAME_MAX_SIZE]; char desktop_window_name[DESKTOP_WINDOW_NAME_MAX_SIZE];
static int addArguments (char **argv, int n) { static int addArguments(char **argv, int n) {
char **newArgv; char **newArgv;
int i; int i;
@ -112,7 +112,7 @@ static int addArguments (char **argv, int n) {
return n; return n;
} }
static void setWindowOpacity (Display *dpy, Window win, unsigned int opacity) { static void setWindowOpacity(Display *dpy, Window win, unsigned int opacity) {
CARD32 o; CARD32 o;
o = opacity; o = opacity;
XChangeProperty (dpy, win, XInternAtom (dpy, "_NET_WM_WINDOW_OPACITY", 0), XChangeProperty (dpy, win, XInternAtom (dpy, "_NET_WM_WINDOW_OPACITY", 0),
@ -120,13 +120,13 @@ static void setWindowOpacity (Display *dpy, Window win, unsigned int opacity) {
(unsigned char *) &o, 1); (unsigned char *) &o, 1);
} }
static Visual * findArgbVisual (Display *dpy, int scr) { static Visual * findArgbVisual(Display *dpy, int scr) {
XVisualInfo *xvi; XVisualInfo *xvi;
XVisualInfo template; XVisualInfo template;
int nvi; int nvi;
int i; int i;
XRenderPictFormat *format; XRenderPictFormat *format;
Visual *visual; Visual *visual;
template.screen = scr; template.screen = scr;
template.depth = 32; template.depth = 32;
@ -220,14 +220,14 @@ int main (int argc, char **argv) {
Window win; Window win;
Window root; Window root;
Window p_desktop = 0; Window p_desktop = 0;
int screen; int screen;
XSizeHints xsh; XSizeHints xsh;
XWMHints xwmh; XWMHints xwmh;
char widArg[256]; char widArg[256];
char *widArgv[] = { widArg }; char *widArgv[] = { widArg };
char *endArg = NULL; char *endArg = NULL;
int i; int i;
int status = 0; int status = 0;
unsigned int opacity = OPAQUE; unsigned int opacity = OPAQUE;
int x = 0; int x = 0;
int y = 0; int y = 0;
@ -237,8 +237,8 @@ int main (int argc, char **argv) {
int fullscreen = 0; int fullscreen = 0;
int noInput = 0; int noInput = 0;
int noFocus = 0; int noFocus = 0;
Atom state[256]; Atom state[256];
int nState = 0; int nState = 0;
int override = 0; int override = 0;
win_shape shape = SHAPE_RECT; win_shape shape = SHAPE_RECT;
Pixmap mask; Pixmap mask;