summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-04-27 18:13:48 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-04-27 18:13:48 +0000
commit1bca93f58c45a5d0d36e68b527f20ad008832f33 (patch)
treea284755ddb01984d78bd34bd1a81bd323e4f1c5b /src
parent6830f6782e4bb7f55104caedfd6d10b52398344c (diff)
downloadfpGUI-1bca93f58c45a5d0d36e68b527f20ad008832f33.tar.xz
* Fixed the issue with screen flicker in the TfpgForm.OnPaint event handler.
* Fixed the issue where you still had to call Canvas.BeginDraw and Canvas.EndDraw inside HandlePaint. * Fixed the issue where custom painting in the OnPaint event handler of a Form did not show until the form was resized or revealed.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/gfx_widget.pas2
-rw-r--r--src/gui/gui_form.pas5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/gfx_widget.pas b/src/corelib/gfx_widget.pas
index 58fe8e84..72014f3c 100644
--- a/src/corelib/gfx_widget.pas
+++ b/src/corelib/gfx_widget.pas
@@ -573,7 +573,7 @@ end;
procedure TfpgWidget.RePaint;
begin
if HasHandle then
- HandlePaint;
+ fpgSendMessage(self, self, FPGM_PAINT);
end;
procedure TfpgWidget.SetFocus;
diff --git a/src/gui/gui_form.pas b/src/gui/gui_form.pas
index 8e0c51ec..a284ae54 100644
--- a/src/gui/gui_form.pas
+++ b/src/gui/gui_form.pas
@@ -155,6 +155,7 @@ begin
else
ActiveWidget.SetFocus;
end;
+
if Assigned(FOnActivate) then
FOnActivate(self);
end;
@@ -170,10 +171,8 @@ end;
procedure TfpgForm.HandlePaint;
begin
- Canvas.BeginDraw;
- inherited;
+ inherited HandlePaint;
Canvas.Clear(FBackgroundColor);
- Canvas.EndDraw(0, 0, FWidth, FHeight);
end;
procedure TfpgForm.AdjustWindowStyle;