_NET_WM_WINDOW_TYPE needs to be atom.

master
Christoph Lohmann 13 years ago
parent 6e23a19d2f
commit 5c97d98c63
  1. 11
      svkbd.c

@ -20,7 +20,7 @@
/* enums */ /* enums */
enum { ColFG, ColBG, ColLast }; enum { ColFG, ColBG, ColLast };
enum { NetWMWindowType, NetLast }; enum { NetWMWindowType, NetWMWindowTypeDock, NetLast };
/* typedefs */ /* typedefs */
typedef unsigned int uint; typedef unsigned int uint;
@ -93,7 +93,6 @@ static Bool running = True;
static KeySym pressedmod = 0; static KeySym pressedmod = 0;
static int rows = 0, ww = 0, wh = 0, wx = 0, wy = 0; static int rows = 0, ww = 0, wh = 0, wx = 0, wy = 0;
static char *name = "svkbd"; static char *name = "svkbd";
static char *wintype = "_NET_WM_WINDOW_TYPE_TOOLBAR";
/* configuration, allows nested code to access above variables */ /* configuration, allows nested code to access above variables */
#include "config.h" #include "config.h"
#include "layout.h" #include "layout.h"
@ -346,6 +345,7 @@ setup(void) {
/* init atoms */ /* init atoms */
netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False); netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
netatom[NetWMWindowTypeDock] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DOCK", False);
/* init appearance */ /* init appearance */
countrows(); countrows();
@ -401,10 +401,9 @@ setup(void) {
XFree(wmh); XFree(wmh);
XFree(str.value); XFree(str.value);
XStringListToTextProperty(&wintype, 1, &str); XChangeProperty(dpy, win, netatom[NetWMWindowType], XA_ATOM,
XSetTextProperty(dpy, win, &str, netatom[NetWMWindowType]); 32, PropModeReplace,
XFree(str.value); (unsigned char *)&netatom[NetWMWindowTypeDock], 1);
XMapRaised(dpy, win); XMapRaised(dpy, win);
updatekeys(); updatekeys();
drawkeyboard(); drawkeyboard();

Loading…
Cancel
Save