From dd58b45deaf2325c4411baa13fc71044face5673 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Mon, 21 Nov 2011 11:04:49 +0200 Subject: MDI: CaptureMouse and ReleaseMouse was called on the wrong widget. The behavior is now correct under both X11 and GDI platforms. --- prototypes/mdi/fpg_mdi.pas | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/prototypes/mdi/fpg_mdi.pas b/prototypes/mdi/fpg_mdi.pas index b5e769b6..ac127a33 100644 --- a/prototypes/mdi/fpg_mdi.pas +++ b/prototypes/mdi/fpg_mdi.pas @@ -103,9 +103,7 @@ procedure TfpgMDIChildForm.TitleMouseUp(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); begin FIsMouseDown := False; - {$IFDEF MSWINDOWS} - ReleaseMouse; - {$ENDIF} + Panel1.ReleaseMouse; end; procedure TfpgMDIChildForm.TitleMouseDown(Sender: TObject; AButton: TMouseButton; @@ -114,9 +112,7 @@ begin FMDIWorkArea.ActiveWindow := self; FIsMouseDown := True; FLastPos := Panel1.WindowToScreen(self, AMousePos); - {$IFDEF MSWINDOWS} - CaptureMouse; - {$ENDIF} + Panel1.CaptureMouse; end; procedure TfpgMDIChildForm.TitleMouseExit(Sender: TObject); -- cgit v1.2.3-70-g09d2