# # # patch "src/Screen.cc" # from [6f9fe04392b1de51a743bc511a272bd3858e1d43] # to [3be8071d0f7970a770ba59d14f5f76510f277699] # ============================================================ --- src/Screen.cc 6f9fe04392b1de51a743bc511a272bd3858e1d43 +++ src/Screen.cc 3be8071d0f7970a770ba59d14f5f76510f277699 @@ -2054,8 +2054,10 @@ void BScreen::placeWindow(BlackboxWindow case WindowTypeDialog: { BlackboxWindow *w = win->findTransientFor(); bt::Rect p = w ? w->frameRect() : usableArea; - const int x = static_cast(p.x() + (p.width() - r.width()) / 2); - const int y = static_cast(p.y() + (p.height() - r.height()) / 2); + const int x = static_cast(p.x() + + static_cast(p.width() - r.width()) / 2); + const int y = static_cast(p.y() + + static_cast(p.height() - r.height()) / 2); r.setPos(x, y); break; } @@ -2116,9 +2118,11 @@ bool BScreen::centerPlacement(bt::Rect & bool BScreen::centerPlacement(bt::Rect &rect, const bt::Rect &avail) { const int x = - static_cast(avail.x() + (avail.width() - rect.width()) / 2); + static_cast(avail.x() + + static_cast((avail.width() - rect.width())) / 2); const int y = - static_cast(avail.y() + (avail.height() - rect.height()) / 2); + static_cast(avail.y() + + static_cast((avail.height() - rect.height())) / 2); rect.setPos(x, y); return true; }