fix transient dialog placement

dialogs can be bigger than the mainwindow and the unsigned dimensions
then overflow in the subtraction (the window would still be moved into
screen bounds but appear on ugly 0,0)
This commit is contained in:
Thomas Lübking 2016-07-27 23:39:32 +02:00 committed by Mathias Gumz
parent 58491165d3
commit dc226902a7

View file

@ -522,8 +522,8 @@ void FluxboxWindow::init() {
layerItem().setLayer(twin->layerItem().getLayer());
m_state.layernum = twin->layerNum();
m_workspace_number = twin->workspaceNumber();
const int x = twin->frame().x() + (twin->frame().width() - frame().width())/2;
const int y = twin->frame().y() + (twin->frame().height() - frame().height())/2;
const int x = twin->frame().x() + int(twin->frame().width() - frame().width())/2;
const int y = twin->frame().y() + int(twin->frame().height() - frame().height())/2;
frame().move(x, y);
m_placed = true;
} else // if no parent then set default layer