diff options
author | Thomas Lübking <thomas.luebking@gmail.com> | 2016-07-27 21:39:32 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2016-07-30 16:38:28 (GMT) |
commit | dc226902a7c94ee2c2f7304c389324c88ff5a60c (patch) | |
tree | 61f560f5e05699e86cbbbe2031779d9dea12bc3b /src | |
parent | 58491165d366005e102b0e9ea632dbb54ea8791d (diff) | |
download | fluxbox-dc226902a7c94ee2c2f7304c389324c88ff5a60c.zip fluxbox-dc226902a7c94ee2c2f7304c389324c88ff5a60c.tar.bz2 |
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)
Diffstat (limited to 'src')
-rw-r--r-- | src/Window.cc | 4 |
1 files 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() { | |||
522 | layerItem().setLayer(twin->layerItem().getLayer()); | 522 | layerItem().setLayer(twin->layerItem().getLayer()); |
523 | m_state.layernum = twin->layerNum(); | 523 | m_state.layernum = twin->layerNum(); |
524 | m_workspace_number = twin->workspaceNumber(); | 524 | m_workspace_number = twin->workspaceNumber(); |
525 | const int x = twin->frame().x() + (twin->frame().width() - frame().width())/2; | 525 | const int x = twin->frame().x() + int(twin->frame().width() - frame().width())/2; |
526 | const int y = twin->frame().y() + (twin->frame().height() - frame().height())/2; | 526 | const int y = twin->frame().y() + int(twin->frame().height() - frame().height())/2; |
527 | frame().move(x, y); | 527 | frame().move(x, y); |
528 | m_placed = true; | 528 | m_placed = true; |
529 | } else // if no parent then set default layer | 529 | } else // if no parent then set default layer |