speedie 2023-04-30 00:45:48 +02:00
parent 683e051106
commit 2956763fae
2 changed files with 2 additions and 1 deletions

View file

@ -24,7 +24,7 @@ create_window(int x, int y, int w, int h)
PointerMotionMask; // we need pointer for selecting entries using the mouse PointerMotionMask; // we need pointer for selecting entries using the mouse
// create client // create client
win = XCreateWindow(dpy, parentwin, x, y, w, h, borderwidth, win = XCreateWindow(dpy, root, x, y, w, h, borderwidth,
depth, InputOutput, visual, depth, InputOutput, visual,
CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &swa); CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &swa);

View file

@ -661,6 +661,7 @@ setupdisplay(void)
// embed spmenu inside parent window // embed spmenu inside parent window
if (embed) { if (embed) {
XReparentWindow(dpy, win, parentwin, x, y);
XSelectInput(dpy, parentwin, FocusChangeMask | SubstructureNotifyMask); XSelectInput(dpy, parentwin, FocusChangeMask | SubstructureNotifyMask);
if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) { if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) {
for (i = 0; i < du && dws[i] != win; ++i) for (i = 0; i < du && dws[i] != win; ++i)