]> Pileus Git - wmpus/blobdiff - sys-xcb.c
Fix multi-monitor fullscreen
[wmpus] / sys-xcb.c
index 7942776381f4e71532778be39c1ddf06f44cbf58..0ab47b0850993c4ac2e1e6b9c2f5462f9a87084b 100644 (file)
--- a/sys-xcb.c
+++ b/sys-xcb.c
@@ -1105,8 +1105,8 @@ void sys_show(win_t *win, state_t state)
        if (state == ST_FULL || state == ST_MAX) {
                for (list_t *cur = screens; cur; cur = cur->next) {
                        full = max = *(win_t*)cur->data;
-                       if (win->x >= max.x && win->x <= max.x+max.w &&
-                           win->y >= max.y && win->y <= max.y+max.h)
+                       if (win->x >= max.x && win->x < max.x+max.w &&
+                           win->y >= max.y && win->y < max.y+max.h)
                                break;
                }
                for (list_t *cur = struts; cur; cur = cur->next) {
@@ -1239,7 +1239,7 @@ list_t *sys_info(void)
                        screen->w = info[i].width;
                        screen->h = info[i].height;
 
-                       screens = list_insert(NULL, screen);
+                       screens = list_insert(screens, screen);
 
                        printf("sys_info: xinerama screen - %dx%d @ %d,%d\n",
                                        screen->w, screen->h,
@@ -1258,7 +1258,7 @@ list_t *sys_info(void)
                screen->w = geom->width_in_pixels;
                screen->h = geom->height_in_pixels;
 
-               screens = list_insert(NULL, screen);
+               screens = list_insert(screens, screen);
 
                printf("sys_info: root screen - %dx%d\n",
                                screen->w, screen->h);