diff options
-rw-r--r-- | gfx/gdi/gfx_gdi.pas | 9 | ||||
-rw-r--r-- | gfx/x11/gfx_x11.pas | 8 |
2 files changed, 11 insertions, 6 deletions
diff --git a/gfx/gdi/gfx_gdi.pas b/gfx/gdi/gfx_gdi.pas index d131bd11..fa285bdf 100644 --- a/gfx/gdi/gfx_gdi.pas +++ b/gfx/gdi/gfx_gdi.pas @@ -1654,11 +1654,12 @@ begin r.Right := PaintStruct.rcPaint.Right; r.Bottom := PaintStruct.rcPaint.Bottom; - OldCanvas := Canvas; - FCanvas := TGDICanvas.Create(PaintStruct.hdc); + // graemeg: What is this extra canvas used for???? +// OldCanvas := Canvas; +// FCanvas := TGDICanvas.Create(PaintStruct.hdc); OnPaint(Self, r); - Canvas.Free; - FCanvas := OldCanvas; +// Canvas.Free; +// FCanvas := OldCanvas; end; Windows.EndPaint(Handle, @PaintStruct); end; diff --git a/gfx/x11/gfx_x11.pas b/gfx/x11/gfx_x11.pas index d825c78f..f49228cb 100644 --- a/gfx/x11/gfx_x11.pas +++ b/gfx/x11/gfx_x11.pas @@ -1663,11 +1663,15 @@ begin end; etMouseWheel: begin - + // it's handled in etMousePressed end; etPaint: begin - if Assigned(OnPaint) then OnPaint(Self, Rect(AEvent.X, AEvent.Y, AEvent.Width, AEvent.Height)); +// if Assigned(OnPaint) then OnPaint(Self, Rect(AEvent.X, AEvent.Y, AEvent.Width, AEvent.Height)); + // We are ignoring the rectangle from the XEvent and rather use the + // full window rectangle. + if Assigned(OnPaint) then + OnPaint(Self, Rect(0, 0, Width, Height)); end; etMove: begin |