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)
Thomas Lübking thomas.luebking@gmail.com
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
src/Window.cc
→
src/Window.cc
@@ -522,8 +522,8 @@ if (twin && twin != this) {
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