work on bar compatibility

This commit is contained in:
Akos Horvath 2022-08-03 11:10:58 +02:00
parent 3a87b3014b
commit c405f965a0

18
wm.c
View File

@ -926,12 +926,18 @@ void wm_mstack(Monitor *m)
c->y = sy;
c->w = m->info.width*wm_ms_p-wm_border_width*2;
c->h = (m->info.height-wm_border_width*2)-sy;
} else {
} else {
c->x = (m->info.width*wm_ms_p);
c->y = ((n-1)*m->info.height/(cc_sws-1))+sy;
c->w = (m->info.width - m->info.width*wm_ms_p)-wm_border_width*2;
c->h = (m->info.height/(cc_sws-1)-wm_border_width*2)-sy;
c->h = ((m->info.height-sy)/(cc_sws-1)-wm_border_width*2)+sy/cc_sws;
}
// else {
// c->x = (m->info.width*wm_ms_p);
// c->y = ((n-1)*m->info.height/(cc_sws-1));
// c->w = (m->info.width - m->info.width*wm_ms_p)-wm_border_width*2;
// c->h = (m->info.height/(cc_sws-1)-wm_border_width*2)-sy;
// }
n++;
ch = wm_client_to_xwchanges(*c);
@ -948,6 +954,8 @@ void wm_mstack(Monitor *m)
XConfigureWindow(wm_display, c->window, value_mask, &ch);
wm_client_show(c);
DEBUG_PRINT("%s %d. client next: 0x%x\n", __func__, n, c->next)
if (c->next == NULL)
{
@ -1082,12 +1090,14 @@ void wm_mainloop()
void wm_init()
{
signal(SIGINT, wm_sigint_handler);
XSetWindowAttributes xa;
Display *d;
signal(SIGINT, wm_sigint_handler);
DEBUG_PRINT("wm_init\n")
DEBUG_PRINT("pid: %ld\n", ((long)getpid()))
Display *d = wm_connect_display();
d = wm_connect_display();
wm_display = d;
wm_monitors_open_all(d);