Index: group.c =================================================================== --- group.c (revision 1583) +++ group.c (working copy) @@ -312,6 +312,8 @@ CompWindow *w; for (w = s->windows; w; w = w->next) { if ((gs->wMask & w->type) && + ( !(w->wmType & CompWindowTypeDockMask) || gs->wMask & CompWindowTypeDockMask ) && + ( !(w->wmType & CompWindowTypeDesktopMask) || gs->wMask & CompWindowTypeDesktopMask ) && !w->invisible && TOLRNC_MIN(reg.extents.x1, WIN_X(w), tolerance * WIN_WIDTH(w)) && TOLRNC_MIN(reg.extents.y1, WIN_Y(w), tolerance * WIN_HEIGHT(w)) && @@ -435,8 +437,8 @@ gw->orgPosX = WIN_X(cw); gw->orgPosY = WIN_Y(cw); // center the window to the main window - gw->destinationX = WIN_X(main) + (WIN_WIDTH(main) / 2) - (WIN_WIDTH(cw) / 2); - gw->destinationY = WIN_Y(main) + (WIN_HEIGHT(main) / 2) - (WIN_HEIGHT(cw) / 2); + gw->destinationX = WIN_X(main) + ((WIN_WIDTH(main) - WIN_WIDTH(cw) ) >> 1 ); + gw->destinationY = WIN_Y(main) + ((WIN_HEIGHT(main) - WIN_HEIGHT(cw) ) >> 1 ); gw->animate = TRUE; } @@ -1020,10 +1022,14 @@ GROUP_DISPLAY(d); GROUP_SCREEN(w->screen); GROUP_WINDOW(w); - + + if ( w->invisible || !( gs->wMask & w->type && + ( !(w->wmType & CompWindowTypeDockMask) || gs->wMask & CompWindowTypeDockMask ) && + ( !(w->wmType & CompWindowTypeDesktopMask) || gs->wMask & CompWindowTypeDesktopMask ) ) ) + return; + // select singe window - if ((gs->wMask & w->type) && - !w->invisible && !gw->inSelection && !gw->inGroup) { + if (!gw->inSelection && !gw->inGroup) { groupAddWindowToSelection(d, w); @@ -1031,16 +1037,14 @@ addWindowDamage(w); } // unselect single window - else if ((gs->wMask & w->type) && - !w->invisible && gw->inSelection && !gw->inGroup) { + else if (gw->inSelection && !gw->inGroup) { groupDeleteSelectionWindow(d, w); gw->inSelection = FALSE; addWindowDamage(w); } // select group - else if ((gs->wMask & w->type) && - !w->invisible && !gw->inSelection && gw->inGroup) { + else if (!gw->inSelection && gw->inGroup) { int index = groupFindGroupAtDisplay(gd, gw->groupID); if (index == -1) @@ -1058,8 +1062,7 @@ } } // Unselect group - else if ((gs->wMask & w->type) && - !w->invisible && gw->inSelection && gw->inGroup) { + else if (gw->inSelection && gw->inGroup) { int index = groupFindGroupAtDisplay(gd, gw->groupID); if (index == -1) return; @@ -1859,7 +1862,7 @@ int x1, x2, y1, y2, width, height; width = BORDER_WIDTH * (group->nWins + 1) + THUMB_SIZE * group->nWins; height = BORDER_WIDTH * 2 + THUMB_SIZE; - x1 = WIN_X(group->topTab) + WIN_WIDTH(group->topTab) / 2 - width / 2; + x1 = WIN_X(group->topTab) + ((WIN_WIDTH(group->topTab) - width ) >> 1 ); y1 = WIN_Y(group->topTab) + 10; x2 = x1 + width; y2 = y1 + height;