diff options
author | sekelsenmat <sekelsenmat@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-12 07:24:59 +0000 |
---|---|---|
committer | sekelsenmat <sekelsenmat@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-12 07:24:59 +0000 |
commit | 651f4edf0db58e02dab94e87d06e26b54f13a22b (patch) | |
tree | 02ad288862c56687bc933adfd9a684ab5652cb4e /gfx/x11 | |
parent | 69e6c6fc970d14602875f290f9fcb3cfff2911bb (diff) | |
download | fpGUI-651f4edf0db58e02dab94e87d06e26b54f13a22b.tar.xz |
Removed use of the dirty list on X11
Diffstat (limited to 'gfx/x11')
-rw-r--r-- | gfx/x11/gfx_x11.pas | 60 |
1 files changed, 2 insertions, 58 deletions
diff --git a/gfx/x11/gfx_x11.pas b/gfx/x11/gfx_x11.pas index 2d5d6c41..8ee0aa5d 100644 --- a/gfx/x11/gfx_x11.pas +++ b/gfx/x11/gfx_x11.pas @@ -198,14 +198,12 @@ type TX11Application = class(TFCustomApplication) private - FDirtyList: TDirtyList; FDefaultFont: TX11FontResourceImpl; FEventFilter: TX11EventFilter; Handle: PDisplay; FWMProtocols: TAtom; // Atom for "WM_PROTOCOLS" FWMDeleteWindow: TAtom; // Atom for "WM_DELETE_WINDOW" FWMHints: TAtom; // Atom for "_MOTIF_WM_HINTS" - property DirtyList: TDirtyList read FDirtyList; function FindWindowByXID(XWindowID: X.TWindow): TFCustomWindow; public { default methods } @@ -231,7 +229,6 @@ type FXEvent: PXEvent; function StartComposing(const Event: TXEvent): TKeySym; procedure EndComposing; - procedure Expose(var Event: TXExposeEvent); message X.Expose; procedure Configure(var Event: TXConfigureEvent); message X.ConfigureNotify; procedure ClientMessage(var Event: TXClientMessageEvent); message X.ClientMessage; protected @@ -256,7 +253,6 @@ type procedure SetMinMaxClientSize(const AMinSize, AMaxSize: TSize); override; procedure Show; override; procedure Invalidate; override; - procedure PaintInvalidRegion; override; procedure CaptureMouse; override; procedure ReleaseMouse; override; { Event processing methods } @@ -983,7 +979,6 @@ constructor TX11Application.Create; begin inherited Create; - FDirtyList := TDirtyList.Create; end; @@ -997,8 +992,6 @@ begin TFCustomWindow(Forms[i]).Free; end; - DirtyList.Free; - if Assigned(FDefaultFont) then begin FDefaultFont.Free; @@ -1028,12 +1021,11 @@ begin while (not (QuitWhenLastWindowCloses and (Forms.Count = 0))) and (DoBreakRun = False) do begin - if Assigned(OnIdle) or Assigned(DirtyList.First) then + if Assigned(OnIdle) then begin if not XCheckMaskEvent(Handle, MaxInt, @XEvent) then begin - if Assigned(DirtyList.First) then DirtyList.PaintAll - else if Assigned(OnIdle) then OnIdle(Self); + if Assigned(OnIdle) then OnIdle(Self); continue; end; @@ -1389,8 +1381,6 @@ begin if FCurCursorHandle <> 0 then XFreeCursor(GFApplication.Handle, FCurCursorHandle); - GFApplication.DirtyList.ClearQueueForWindow(Self); - GFApplication.RemoveWindow(Self); XDestroyWindow(GFApplication.Handle, Handle); @@ -1524,24 +1514,10 @@ begin end; procedure TX11Window.Invalidate; -{var - ARect: TRect;} begin -{ ARect.Left := Left; - ARect.Top := Top; - ARect.Right := Left + Width; - ARect.Bottom := Top + Height; - - GFApplication.DirtyList.AddRect(Self, ARect); } - EvPaint(); end; -procedure TX11Window.PaintInvalidRegion; -begin - GFApplication.DirtyList.PaintQueueForWindow(Self); -end; - procedure TX11Window.CaptureMouse; begin XGrabPointer(GFApplication.Handle, Handle, @@ -1912,38 +1888,6 @@ begin OnKeyChar(Self, FComposeBuffer[i]); end; -procedure TX11Window.Expose(var Event: TXExposeEvent); -{var - IsNotEmpty: Boolean; -begin -WriteLn('Expose'); - if Assigned(OnPaint) then - with Event do - begin - if not IsExposing then - begin - IsExposing := True; - Canvas.SaveState; - Canvas.EmptyClipRect; - end; - IsNotEmpty := Canvas.UnionClipRect(Rect(x, y, x + Width, y + Height)); - if Count = 0 then - begin - if IsNotEmpty then - OnPaint(Self, Canvas.GetClipRect); - IsExposing := False; - Canvas.RestoreState; - end; - end; -end;} -var - r: TRect; -begin - with Event do - r := Rect(x, y, x + Width, y + Height); - GFApplication.DirtyList.AddRect(Self, r); -end; - procedure TX11Window.Configure(var Event: TXConfigureEvent); begin while XCheckTypedWindowEvent(GFApplication.Handle, Handle, |