From b7a0dadd7b37646c928da525e8ecbb03cadee99d Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Sat, 8 Aug 2015 23:40:32 +0200 Subject: [PATCH] * Bug fix in FDialog (use GlobalPos to move) * Don't check mouse click position on titlebar again while FDialog is in move --- ChangeLog | 5 +++++ src/fdialog.cpp | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index bd39eacb..d890b991 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-08-08 Markus Gans + * Bug fix in FDialog (use GlobalPos to move) + * Don't check mouse click position on titlebar again + while FDialog is in move + 2015-07-26 Markus Gans * init() method for the FStatusKey constructor to avoid code duplication diff --git a/src/fdialog.cpp b/src/fdialog.cpp index f8c75224..3a8417ce 100644 --- a/src/fdialog.cpp +++ b/src/fdialog.cpp @@ -504,15 +504,9 @@ void FDialog::onMouseUp (FMouseEvent* event) //---------------------------------------------------------------------- void FDialog::onMouseMove (FMouseEvent* event) { - int titlebar_x = TitleBarClickPos.getX(); - int titlebar_y = TitleBarClickPos.getY(); - if ( event->getButton() == LeftButton ) { - if ( ! TitleBarClickPos.isNull() - && titlebar_x >= xpos+xmin+3 - && titlebar_x <= xpos+xmin-1+width - && titlebar_y == ypos+ymin-1 ) + if ( ! TitleBarClickPos.isNull() ) { FPoint currentPos(getGeometry().getX(), getGeometry().getY()); FPoint deltaPos = event->getGlobalPos() - TitleBarClickPos; @@ -693,7 +687,7 @@ void FDialog::move (int x, int y) xpos = x; ypos = y; - putArea (x, y, vwin); + putArea (getGlobalPos(), vwin); if ( getGeometry().overlap(oldGeometry) ) {