rWMHints.icon_pixmap:= nIconPixmap;
rClassHint.res_name:= argv[0];
rClassHint.res_class:= psPrgClass;
XSetWMProperties(prDisplay, nWnd, @prWindowName, @prIconName, argv, argc, @rSizeHints, @rWMHints, @rClassHint);
end;
var
prDisplay: PDisplay; (* Указатель на структуру Display *)
nScreenNum: integer;
prGC: TGC;
rEvent: TXEvent;
nWnd: TWindow;
begin
prDisplay:= XOpenDisplay(nil);
if prDisplay = nil then begin
writeln('Can not connect to the X server!');
halt (1);
end;
nScreenNum:= XDefaultScreen(prDisplay);
nWnd:= XCreateSimpleWindow(prDisplay, XRootWindow (prDisplay, nScreenNum), WND_X, WND_Y, WND_WDT, WND_HGH, WND_BORDER_WDT, XBlackPixel (prDisplay, nScreenNum),
XWhitePixel (prDisplay, nScreenNum));
SetWindowManagerHints(prDisplay, PRG_CLASS, argv, argc, nWnd, WND_X, WND_Y, WND_WDT, WND_HGH, WND_MIN_WDT, WND_MIN_HGH, WND_TITLE, WND_ICON_TITLE, 0);
XSelectInput(prDisplay, nWnd, ExposureMask OR KeyPressMask);