fixed DestroyComponent

git-svn-id: trunk@5038 -
This commit is contained in:
mattias 2004-01-10 00:46:46 +00:00
parent 3de0e677cc
commit e6a056de16
4 changed files with 37 additions and 1 deletions

View File

@ -534,6 +534,7 @@ type
{$IFDEF SYN_LAZARUS}
procedure StartPaintBuffer(const ClipRect: TRect);
procedure EndPaintBuffer(const ClipRect: TRect);
procedure EraseBackground(DC: HDC); override;
{$ENDIF}
procedure RecalcCharExtent;
procedure RedoItem; //sbs 2000-11-19
@ -3236,6 +3237,11 @@ begin
//writeln('TCustomSynEdit.EndPaintBuffer END');
{$ENDIF}
end;
procedure TCustomSynEdit.EraseBackground(DC: HDC);
begin
// we are painting everything ourselves, so not need to erase background
end;
{$ENDIF}
procedure TCustomSynEdit.Update;

View File

@ -305,6 +305,7 @@ begin
end;
function TDesignerDeviceContext.GetFormClientOrigin: TPoint;
// returns the Form Client Origin on desktop
begin
if not (ddcFormClientOriginValid in FFlags) then begin
FFormClientOrigin:=FForm.ClientOrigin;
@ -314,6 +315,8 @@ begin
end;
function TDesignerDeviceContext.GetFormOrigin: TPoint;
// returns the DC origin relative to the form client origin
// For example: The DC of the client area of the form itself will return 0,0
var
FormClientOrig, DCOrig: TPoint;
begin

View File

@ -4500,6 +4500,8 @@ begin
end;
FixWidget:=GetFixedWidget(Widget);
// clipboard widget
// Remove control accelerators - has to be done due to GTK+ bug?
{$IFNDef GTK2}
@ -4530,6 +4532,24 @@ begin
FreeWinWidgetInfo(PGtkCombo(Widget)^.Button);
end;
// update mouse capturing
if (MouseCaptureWidget=Widget) or (MouseCaptureWidget=FixWidget) then
MouseCaptureWidget:=nil;
// update clipboard widget
if (ClipboardWidget=Widget) or (ClipboardWidget=FixWidget) then
begin
// clipboard widget destroyed
if (Application<>nil) and (Application.MainForm<>nil)
and (Application.MainForm.HandleAllocated)
and (PGtkWidget(Application.MainForm.Handle)<>Widget) then
// there is still the main form left -> use it for clipboard
SetClipboardWidget(PGtkWidget(Application.MainForm.Handle))
else
// program closed -> close clipboard
SetClipboardWidget(nil);
end;
// update caret
if GtkWidgetIsA(Widget,GTKAPIWidget_GetType) then
DestroyCaret(HDC(Widget));
@ -8577,6 +8597,9 @@ end;
{ =============================================================================
$Log$
Revision 1.448 2004/01/10 00:46:46 mattias
fixed DestroyComponent
Revision 1.447 2004/01/09 20:03:13 mattias
implemented new statusbar methods in gtk intf

View File

@ -688,7 +688,8 @@ begin
{$IfDef DEBUG_CLIPBOARD}
writeln('[TgtkObject.ClipboardGetOwnerShip] C');
{$EndIf}
if gtk_selection_owner_set(ClipboardWidget, ClipboardTypeAtoms[ClipboardType],0)=GdkFalse
if gtk_selection_owner_set(ClipboardWidget,
ClipboardTypeAtoms[ClipboardType],0)=GdkFalse
then begin
{$IfDef DEBUG_CLIPBOARD}
writeln('[TgtkObject.ClipboardGetOwnerShip] D FAILED');
@ -9099,6 +9100,9 @@ end;
{ =============================================================================
$Log$
Revision 1.312 2004/01/10 00:46:46 mattias
fixed DestroyComponent
Revision 1.311 2004/01/09 20:03:13 mattias
implemented new statusbar methods in gtk intf