以下代碼如何刪除窗口邊框?Xlib這是如何(去除窗飾)的工作?
//note the struct is declared elsewhere, is here just for clarity.
//code is from [http://tonyobryan.com/index.php?article=9][1]
typedef struct Hints
{
unsigned long flags;
unsigned long functions;
unsigned long decorations;
long inputMode;
unsigned long status;
} Hints;
//code to remove decoration
Hints hints;
Atom property;
hints.flags = 2;
hints.decorations = 0;
property = XInternAtom(display, "_MOTIF_WM_HINTS", true);
XChangeProperty(display,window,property,property,32,PropModeReplace,(unsigned char *)&hints,5);
XMapWindow(display, window);
到目前爲止,我已經收集是一個Atom是一種類似於窗口,並顯示標識的,但我無法揣摩出提示結構或「_MOTIF_WM_HINTS」是從哪裏來的。任何人都可以爲我解釋所有這些代碼嗎?在此先感謝,埃爾。
這是你的信息來源,或者目的? http://tonyobryan.com/index.php?article=9 – xanatos
這是我的源代碼片段。提示結構在其他地方聲明,但爲了清晰起見,此處顯示。我讀過那篇文章,並沒有解釋提示結構(「我認爲這個結構來自Motif,但我不確定」......) – Ell
是的,它其實不是我的源頭,好點。 – Ell