summaryrefslogtreecommitdiff
path: root/src/corelib/gdi
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-02-18 14:56:38 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-02-18 14:56:38 +0000
commitcaa8b667cca6e32c52466422ee14c689f35038b4 (patch)
tree3c31dcff7f1c3be545ecb1bd531415e85e31e7a5 /src/corelib/gdi
parent80edb8c64ec1ce85e4ffdd90c9302ea4bd97855b (diff)
downloadfpGUI-caa8b667cca6e32c52466422ee14c689f35038b4.tar.xz
* I think I fixed the issue with PopupWindows taking focus
under Windows. * I think I fixed the click selection issues in ComboBoxes. * Also I believe the Calendar component now works under Windows. * Menuse should now works correctly. All the above tested on Win2k. * Due to the above changes I had to modify resizer component in the UI Designer. There is still one minor issue, but that should be fixed soon.
Diffstat (limited to 'src/corelib/gdi')
-rw-r--r--src/corelib/gdi/gfx_gdi.pas34
1 files changed, 20 insertions, 14 deletions
diff --git a/src/corelib/gdi/gfx_gdi.pas b/src/corelib/gdi/gfx_gdi.pas
index e0ab498c..cd926cb0 100644
--- a/src/corelib/gdi/gfx_gdi.pas
+++ b/src/corelib/gdi/gfx_gdi.pas
@@ -644,8 +644,8 @@ begin
writeln('fpGFX/GDI:', w.ClassName + ': MouseButtonDown event');
{$ENDIF}
mcode := FPGM_MOUSEDOWN;
- if PopupListFirst = nil then
- SetCapture(w.WinHandle);
+// if PopupListFirst = nil then
+// SetCapture(w.WinHandle);
end;
WM_LBUTTONUP,
@@ -656,8 +656,8 @@ begin
writeln('fpGFX/GDI:', w.ClassName + ': MouseButtonUp event');
{$ENDIF}
mcode := FPGM_MOUSEUP;
- if PopupListFirst = nil then
- ReleaseCapture;
+// if PopupListFirst = nil then
+// ReleaseCapture;
end;
//WM_LBUTTONDBLCLK:
//mcode := FPGM_DOUBLECLICK;
@@ -799,33 +799,36 @@ begin
WM_NCACTIVATE:
begin
{$IFDEF DEBUG}
- write(w.ClassName + ': ');
- writeln('WM_NCACTIVATE');
+ write(w.ClassName + ': WM_NCACTIVATE');
{$ENDIF}
+ if (PopupListFirst <> nil) and (PopupListFirst.Visible) then
+ begin
+ {$IFDEF DEBUG}
+ writeln(' Blockmsg = True (part 1) : ' + PopupListFirst.ClassName);
+ {$ENDIF}
+ // This is ugly but needed for now to get TfpgCombobox to work
+// if PopupListFirst.ClassName <> 'TDropDownWindow' then
+ if not (PopupListFirst is TfpgPopupWindow) then
+ blockmsg := True;
+ end else
if (wapplication.TopModalForm <> nil) then
begin
if (wParam = 0) and (wapplication.TopModalForm = w) then
begin
{$IFDEF DEBUG}
- writeln(' Blockmsg = True (part 1)');
+ writeln(' Blockmsg = True (part 2)');
{$ENDIF}
blockmsg := True;
end
else if (wParam <> 0) and (wapplication.TopModalForm <> w) then
begin
{$IFDEF DEBUG}
- writeln(' Blockmsg = True (part 2)');
+ writeln(' Blockmsg = True (part 3)');
{$ENDIF}
blockmsg := True;
end;
end;
- //if (PopupListFirst <> nil) and (PopupListFirst.Visible) then
- //begin
- //writeln(' Blockmsg = True (part 3)');
- //blockmsg := True;
- //end;
-
if not blockmsg then
Result := Windows.DefWindowProc(hwnd, uMsg, wParam, lParam);
end;
@@ -1287,6 +1290,9 @@ end;
procedure TfpgWindowImpl.ReleaseMouse;
begin
Windows.ReleaseCapture;
+// if PopupListFirst <> nil then
+// Windows.SetCapture(PopupListFirst^.);
+// if GfxFirstPopup <> nil then SetCapture(GfxFirstPopup^.wg.WinHandle);
end;
function TfpgWindowImpl.HandleIsValid: boolean;