summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-17 12:56:45 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-17 12:56:45 +0000
commit70de76e5c07ddd670aac92ec1be4309a28a3a7d8 (patch)
tree451bd6e723f3631c38c1c1773ccb6737d184e3cf /src/corelib
parentc1321047c231ec2e3aa5f161b4b8e58ffc0e39f4 (diff)
downloadfpGUI-70de76e5c07ddd670aac92ec1be4309a28a3a7d8.tar.xz
* Fixed the ComboBox flicker bug under Windows.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/gdi/gfx_gdi.pas45
1 files changed, 21 insertions, 24 deletions
diff --git a/src/corelib/gdi/gfx_gdi.pas b/src/corelib/gdi/gfx_gdi.pas
index a9d05438..e785c1e2 100644
--- a/src/corelib/gdi/gfx_gdi.pas
+++ b/src/corelib/gdi/gfx_gdi.pas
@@ -610,7 +610,7 @@ begin
WM_RBUTTONUP:
begin
{$IFDEF DEBUG}
- if not uMsg = WM_MOUSEMOVE then
+ if uMsg <> WM_MOUSEMOVE then
writeln('fpGFX/GDI: Found a mouse button event');
{$ENDIF}
// {$IFDEF DEBUG} write(w.ClassName + ': '); {$ENDIF}
@@ -619,31 +619,28 @@ begin
msgp.mouse.y := smallint((lParam and $FFFF0000) shr 16);
{ This closes popup windows when you click the mouse elsewhere }
- if (PopupListFirst <> nil) then
+ if uMsg = WM_LBUTTONDOWN then
begin
- pt.x := msgp.mouse.x;
- pt.y := msgp.mouse.y;
- ClientToScreen(w.WinHandle, pt);
- h := WindowFromPoint(pt);
- mw := GetMyWidgetFromHandle(h);
- pw := mw;
- while (pw <> nil) and (pw.Parent <> nil) do
- pw := TfpgWindowImpl(pw.Parent);
-
- if ((pw = nil) or (PopupListFind(pw.WinHandle) = nil)) and
- (not PopupDontCloseWidget(TfpgWidget(mw))) and
- ((uMsg = WM_LBUTTONDOWN) or (uMsg = WM_LBUTTONUP)) then
+ if (PopupListFirst <> nil) then
begin
- ClosePopups;
- fpgSendMessage(nil, mw, FPGM_POPUPCLOSE);
- end;
-// if mw <> nil then
-// begin // ????
-// ScreenToClient(mw.WinHandle, pt);
-// msgp.mouse.x := pt.x;
-// msgp.mouse.y := pt.y;
-// end;
- end; { if }
+ pt.x := msgp.mouse.x;
+ pt.y := msgp.mouse.y;
+ ClientToScreen(w.WinHandle, pt);
+ h := WindowFromPoint(pt);
+ mw := GetMyWidgetFromHandle(h);
+ pw := mw;
+ while (pw <> nil) and (pw.Parent <> nil) do
+ pw := TfpgWindowImpl(pw.Parent);
+
+ if ((pw = nil) or (PopupListFind(pw.WinHandle) = nil)) and
+ (not PopupDontCloseWidget(TfpgWidget(mw))) and
+ (uMsg = WM_LBUTTONDOWN) then
+ begin
+ ClosePopups;
+// fpgSendMessage(nil, mw, FPGM_POPUPCLOSE);
+ end;
+ end; { if }
+ end;
if (wapplication.TopModalForm <> nil) then
begin