summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authorshuall <shualloret@gmail.com>2016-10-29 04:09:26 +0200
committershuall <shualloret@gmail.com>2016-10-29 04:09:26 +0200
commit0b758e08f2bca283eb930ede8165bfa26e6cacea (patch)
tree47417c636eec013619413c60ed459e8c7135268a /window.c
parent878d97068cb6c8ae044332ac3c8218fcad635b42 (diff)
downloadnsxiv-0b758e08f2bca283eb930ede8165bfa26e6cacea.tar.zst
added support for XEMBED into other windows (ie tabbed) with -w
Diffstat (limited to 'window.c')
-rw-r--r--window.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/window.c b/window.c
index ad08787..18f45b0 100644
--- a/window.c
+++ b/window.c
@@ -133,6 +133,7 @@ void win_init(win_t *win)
win->bar.l.buf = emalloc(win->bar.l.size);
win->bar.r.buf = emalloc(win->bar.r.size);
win->bar.h = options->hide_bar ? 0 : barheight;
+ win->embed = options->embed;
INIT_ATOM_(WM_DELETE_WINDOW);
INIT_ATOM_(_NET_WM_NAME);
@@ -197,7 +198,10 @@ void win_open(win_t *win)
win->y = 0;
}
- win->xwin = XCreateWindow(e->dpy, RootWindow(e->dpy, e->scr),
+ if (!(win->embed)) {
+ win->embed = RootWindow(e->dpy, e->scr);
+ }
+ win->xwin = XCreateWindow(e->dpy, win->embed,
win->x, win->y, win->w, win->h, 0,
e->depth, InputOutput, e->vis, 0, NULL);
if (win->xwin == None)