0
xlib에서 테두리없이 창을 만들려고합니다 (팝업?). 이 코드를 사용하고 있습니다 :테두리가없는 창은 항상 맨 위에 있습니다.
#include <stdio.h>
#include <X11/Xlib.h>
int main(int argc, char **argv)
{
Display *display = NULL;
Window window;
XSetWindowAttributes attribs;
display = XOpenDisplay(NULL);
if(!display)
{
printf("Cannot to open display.");
return 1;
}
attribs.override_redirect = 1;
window = XCreateWindow(display, RootWindow(display, 0), 20, 20, 400, 300, 0, CopyFromParent, CopyFromParent, CopyFromParent, CWOverrideRedirect, &attribs);
XSetWindowBackground(display, window, 0x00F0FF);
XClearWindow(display, window);
XMapWindow(display, window);
XFlush(display);
getchar();
return 0;
}
테두리가없는 창을 만들지 만이 창은 항상 위에 있습니다. 질문 : xlib에서 일반 윈도우로 표시하는 이유와 그 동작.
예, 그게 전부입니다. 도와 주셔서 감사합니다 :) – Popiel