diff options
Diffstat (limited to 'gfx/x11')
-rw-r--r-- | gfx/x11/fpgfxpackage.lpk | 6 | ||||
-rw-r--r-- | gfx/x11/fpgfxpackage.pas | 3 | ||||
-rw-r--r-- | gfx/x11/gfx_x11.pas | 20 |
3 files changed, 20 insertions, 9 deletions
diff --git a/gfx/x11/fpgfxpackage.lpk b/gfx/x11/fpgfxpackage.lpk index 773211b0..12033342 100644 --- a/gfx/x11/fpgfxpackage.lpk +++ b/gfx/x11/fpgfxpackage.lpk @@ -21,7 +21,7 @@ <License Value="Modified LGPL "/> <Version Minor="3"/> - <Files Count="8"> + <Files Count="9"> <Item1> <Filename Value="../gfxbase.pas"/> <UnitName Value="GfxBase"/> @@ -54,6 +54,10 @@ <Filename Value="../gelimage.pas"/> <UnitName Value="GELImage"/> </Item8> + <Item9> + <Filename Value="../commandlineparams.pas"/> + <UnitName Value="CommandLineParams"/> + </Item9> </Files> <RequiredPkgs Count="1"> <Item1> diff --git a/gfx/x11/fpgfxpackage.pas b/gfx/x11/fpgfxpackage.pas index a089c522..84c4bda2 100644 --- a/gfx/x11/fpgfxpackage.pas +++ b/gfx/x11/fpgfxpackage.pas @@ -7,7 +7,8 @@ unit fpgfxpackage; interface uses - GfxBase, GFX_X11, gfxinterface, schar16, unitkeys, fpgfx, GELDirty, GELImage; + GfxBase, GFX_X11, gfxinterface, schar16, unitkeys, fpgfx, GELDirty, GELImage, + CommandLineParams; implementation diff --git a/gfx/x11/gfx_x11.pas b/gfx/x11/gfx_x11.pas index 06b41c9c..1f217621 100644 --- a/gfx/x11/gfx_x11.pas +++ b/gfx/x11/gfx_x11.pas @@ -210,9 +210,7 @@ type TX11Application = class(TFCustomApplication) private - DoBreakRun: Boolean; FDirtyList: TDirtyList; - FDisplayName: String; FDefaultFont: TX11FontResourceImpl; FEventFilter: TX11EventFilter; Handle: PDisplay; @@ -1031,8 +1029,8 @@ var WindowEntry: TFCustomWindow; Event: TFEvent; begin - DoBreakRun := False; - + inherited Run; + while (not (QuitWhenLastWindowCloses and (Forms.Count = 0))) and (DoBreakRun = False) do begin @@ -1243,8 +1241,14 @@ end; procedure TX11Application.Initialize(ADisplayName: String = ''); begin - if Length(ADisplayName) = 0 then FDisplayName := XDisplayName(nil) - else FDisplayName := ADisplayName; + if Length(ADisplayName) = 0 then + begin + // Maybe it was passed as a -display parameter. Lets check first! + if FDisplayName = '' then + FDisplayName := XDisplayName(nil) + end + else + FDisplayName := ADisplayName; Handle := XOpenDisplay(PChar(DisplayName)); @@ -1262,7 +1266,9 @@ begin if not Assigned(FDefaultFont) then begin - {$IFNDEF XftSupport} FDefaultFont.FontData := XLoadQueryFont(Handle, 'fixed'); {$ENDIF} + {$IFNDEF XftSupport} + FDefaultFont.FontData := XLoadQueryFont(Handle, 'fixed'); + {$ENDIF} if not Assigned(FDefaultFont) then raise EX11Error.Create(SNoDefaultFont); end; |