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) {
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,
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);