panel: Set _NET_WM_PID (fixes issue #651)
This commit is contained in:
15
src/panel.c
15
src/panel.c
@@ -20,6 +20,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
@@ -814,15 +816,24 @@ void set_panel_properties(Panel *p)
|
|||||||
g_free(name);
|
g_free(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long pid = getpid();
|
||||||
|
XChangeProperty(server.display,
|
||||||
|
p->main_win,
|
||||||
|
server.atom._NET_WM_PID,
|
||||||
|
XA_CARDINAL,
|
||||||
|
32,
|
||||||
|
PropModeReplace,
|
||||||
|
(unsigned char *)&pid,
|
||||||
|
1);
|
||||||
|
|
||||||
// Dock
|
// Dock
|
||||||
long val = server.atom._NET_WM_WINDOW_TYPE_DOCK;
|
|
||||||
XChangeProperty(server.display,
|
XChangeProperty(server.display,
|
||||||
p->main_win,
|
p->main_win,
|
||||||
server.atom._NET_WM_WINDOW_TYPE,
|
server.atom._NET_WM_WINDOW_TYPE,
|
||||||
XA_ATOM,
|
XA_ATOM,
|
||||||
32,
|
32,
|
||||||
PropModeReplace,
|
PropModeReplace,
|
||||||
(unsigned char *)&val,
|
(unsigned char *)&server.atom._NET_WM_WINDOW_TYPE_DOCK,
|
||||||
1);
|
1);
|
||||||
|
|
||||||
place_panel_all_desktops(p);
|
place_panel_all_desktops(p);
|
||||||
|
|||||||
Reference in New Issue
Block a user