From dc226902a7c94ee2c2f7304c389324c88ff5a60c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Wed, 27 Jul 2016 23:39:32 +0200 Subject: 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) --- src/Window.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index b2c87b9..f6fd139 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -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 -- cgit v0.11.2