summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-27 12:57:16 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-27 12:57:16 +0000
commit316a16c5f3337ad23ecdfdd6444c0b72af3f2406 (patch)
treea4209a054dc20164758f01c619533b09ca120acc /src/corelib
parent4fd4e5cc02054005ce8a9aae976350aefc54a94e (diff)
downloadfpGUI-316a16c5f3337ad23ecdfdd6444c0b72af3f2406.tar.xz
* Implemented List Mediators with tiOPF support and added a demo.
* Added a quick workaround for the InvertCaret function causing a AV. * MenuBar now keeps the current menu focused even if you open more than 2 levels deep of Popup Menus. * Added some TODO entries to Widgets. Also published some missing properties. * Fixed repainting issue with TfpgComobBox when you set the Width from code and made the component focusable. Not sure why it wasn't! * Updated Lazarus IDE code template for new fpGUI applications.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/fpgfx.pas20
-rw-r--r--src/corelib/gfx_widget.pas2
-rw-r--r--src/corelib/x11/gfx_x11.pas8
3 files changed, 23 insertions, 7 deletions
diff --git a/src/corelib/fpgfx.pas b/src/corelib/fpgfx.pas
index 064b964a..6cc4aa69 100644
--- a/src/corelib/fpgfx.pas
+++ b/src/corelib/fpgfx.pas
@@ -1128,13 +1128,21 @@ begin
Exit; //==>
// we could not be sure about the buffer contents!
- FCanvas.BeginDraw(False);
try
- // this works well on narrow characters like 'i' or 'l' in non-mono fonts
- FCanvas.XORFillRectangle($FFFFFF, FLeft, FTop, FWidth, FHeight);
- FVisible := not FVisible;
- finally
- FCanvas.EndDraw(FLeft, FTop, FWidth, FHeight);
+ FCanvas.BeginDraw(False);
+ try
+ // this works well on narrow characters like 'i' or 'l' in non-mono fonts
+ FCanvas.XORFillRectangle($FFFFFF, FLeft, FTop, FWidth, FHeight);
+ FVisible := not FVisible;
+ finally
+ FCanvas.EndDraw(FLeft, FTop, FWidth, FHeight);
+ end;
+ except
+ {$Note This occurs every now and again with TfpgMemo and CaretInvert painting! }
+ // Investigate this.
+ {$IFDEF DEBUG}
+ writeln('TfpgCaret.InvertCaret cause an exception');
+ {$ENDIF}
end;
end;
diff --git a/src/corelib/gfx_widget.pas b/src/corelib/gfx_widget.pas
index 2032eb3d..644362f8 100644
--- a/src/corelib/gfx_widget.pas
+++ b/src/corelib/gfx_widget.pas
@@ -409,7 +409,7 @@ begin
begin
AllocateWindowHandle;
DoSetWindowVisible(True);
-
+
for n := 0 to ComponentCount - 1 do
begin
c := Components[n];
diff --git a/src/corelib/x11/gfx_x11.pas b/src/corelib/x11/gfx_x11.pas
index 250ebf7f..aa3b36a9 100644
--- a/src/corelib/x11/gfx_x11.pas
+++ b/src/corelib/x11/gfx_x11.pas
@@ -1307,6 +1307,14 @@ var
pmh: longword;
GcValues: TXGcValues;
begin
+ if Assigned(TfpgWindowImpl(awin)) then
+ begin
+ // This occurs every now and again with TfpgMemo and InvertCaret painting!
+ // Investigate this.
+ if not TfpgWindowImpl(awin).HasHandle then
+ raise Exception.Create(' Window doesn''t have a Handle');
+ end;
+
XGetGeometry(xapplication.display, TfpgWindowImpl(awin).FWinHandle, @rw, @x, @y, @w, @h, @bw, @d);
if FDrawing and buffered and (FBufferPixmap > 0) then