summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-05-27 08:45:29 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-05-27 08:45:29 +0000
commit2d5991c4c67b9ead40df34cfdb73434231956116 (patch)
tree01b2fcd4ca61840d1d585b9a517341015748ae03 /gfx
parenta33eb60e76b3c333bf50b7183e1e6a078b6cdc27 (diff)
downloadfpGUI-2d5991c4c67b9ead40df34cfdb73434231956116.tar.xz
* Minor improvement in setting the window title under X11.
* Thanks to Felipe for fixing the TFBitmap issue, the Base Style in the GUI can now use bitmaps under Linux as well.
Diffstat (limited to 'gfx')
-rw-r--r--gfx/x11/gfx_x11.pas19
1 files changed, 16 insertions, 3 deletions
diff --git a/gfx/x11/gfx_x11.pas b/gfx/x11/gfx_x11.pas
index 868281b9..d10ed0fd 100644
--- a/gfx/x11/gfx_x11.pas
+++ b/gfx/x11/gfx_x11.pas
@@ -273,6 +273,8 @@ uses
GELImage
,fpGFX
,fpUTF8Utils
+ ,Xatom
+ ,CTypes {,keysym ,libc , }
;
resourcestring
@@ -821,12 +823,12 @@ begin
else
raise EX11Error.CreateFmt(SWindowUnsupportedPixelFormat, [Attr.Depth]);
end;
-
+
if Attr.Depth >= 16 then
begin
- PixelFormat.RedMask := Visual^.red_mask;
+ PixelFormat.RedMask := Visual^.red_mask;
PixelFormat.GreenMask := Visual^.green_mask;
- PixelFormat.BlueMask := Visual^.blue_mask;
+ PixelFormat.BlueMask := Visual^.blue_mask;
end;
end;
@@ -868,6 +870,7 @@ begin
else
FStride := AWidth * (FormatTypeBPPTable[APixelFormat.FormatType] shr 3);
end;
+
GetMem(FData, FStride * Height);
end;
@@ -1689,8 +1692,18 @@ begin
end;
procedure TX11Window.SetTitle(const ATitle: String);
+var
+ tp: TXTextProperty;
begin
+ tp.value := PCUChar(ATitle);
+ tp.encoding := XA_WM_NAME;
+ tp.format := 8;
+ tp.nitems := UTF8Length(ATitle);
+
+ XSetWMName(GFApplication.Handle, Handle, @tp);
XStoreName(GFApplication.Handle, Handle, PChar(ATitle));
+ XSetIconName(GFApplication.Handle, Handle, PChar(ATitle));
+ XSetWMIconName(GFApplication.Handle, Handle, @tp);
end;
procedure TX11Window.DoSetCursor;