- windowHandle = XCreateWindow(xGlobalDisplay, DefaultRootWindow(xGlobalDisplay),
- 0,0,guiApp.desktop.size.w,guiApp.desktop.size.h,0, depth, InputOutput, visual ? visual : CopyFromParent,
- CWEventMask | (visual ? (CWColormap | CWBorderPixel) : 0)/*| CWOverrideRedirect*/, &attributes);
+ windowHandle = XCreateWindow(xGlobalDisplay,
+ DefaultRootWindow(xGlobalDisplay),
+ 0,0,
+ XDisplayWidth(xGlobalDisplay, DefaultScreen(xGlobalDisplay)),
+ XDisplayHeight(xGlobalDisplay, DefaultScreen(xGlobalDisplay)),
+ 0, depth, InputOutput, visual ? visual : CopyFromParent,
+ CWEventMask | (visual ? (CWColormap | CWBorderPixel) : 0) | CWOverrideRedirect,
+ &attributes);
+
+ {
+ XSizeHints hints = { 0 };
+ XSetWMNormalHints(xGlobalDisplay, windowHandle, &hints);
+ }
+
+ {
+ String caption = window.caption;
+ XChangeProperty(xGlobalDisplay, windowHandle, atoms[_net_wm_name],
+ atoms[utf8_string], 8, PropModeReplace, (byte *)window.caption, caption ? strlen(caption) : 0);
+ XChangeProperty(xGlobalDisplay, windowHandle, atoms[wm_name],
+ atoms[utf8_string], 8, PropModeReplace, (byte *)window.caption, caption ? strlen(caption) : 0);
+ }
+
+ SetNETWMState((X11Window)windowHandle, false, add, atoms[_net_wm_state_fullscreen], 0);
+ //SetNETWMState((X11Window)windowHandle, false, add, atoms[_net_wm_state_above], 0);
+ {
+ Atom hints[4];
+ int count;
+
+ hints[0] = atoms[_net_wm_window_type_normal];
+ count = 1;
+ XChangeProperty(xGlobalDisplay, windowHandle, atoms[_net_wm_window_type], XA_ATOM, 32,
+ PropModeReplace, (unsigned char*)&hints, count);
+ }
+
+ {
+ XWMHints xwmHints;
+ xwmHints.flags = InputHint;
+ xwmHints.input = 0;
+ XSetWMHints(xGlobalDisplay, windowHandle, &xwmHints);
+ }
+ {
+ Atom protocols[2] = { atoms[wm_delete_window], atoms[wm_take_focus] };
+ XSetWMProtocols(xGlobalDisplay, windowHandle, protocols, 2);
+ }