29 #if !defined(_ANDROID)
35 #include <libFreeWRL.h>
37 #include "fwBareWindow.h"
39 XTextProperty windowName;
43 void frontendUpdateButtons() {}
49 void getBareWindowedGLwin (Window *win)
54 void openBareMainWindow (
int argc,
char **argv)
57 Xdpy = XOpenDisplay(0);
58 if (!Xdpy) { fprintf(stderr,
"No display!\n");exit(-1);}
69 attr.background_pixel = 0;
70 attr.border_pixel = 0;
71 attr.colormap = colormap;
73 attr.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask | PointerMotionMask | LeaveWindowMask | MapNotify | ButtonPressMask | ButtonReleaseMask | FocusChangeMask;
75 if (params->fullscreen) {
76 mask = CWBackPixel | CWColormap | CWOverrideRedirect | CWSaveUnder | CWBackingStore | CWEventMask;
77 attr.override_redirect =
true;
78 attr.backing_store = NotUseful;
79 attr.save_under =
false;
81 mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
84 Xwin = XCreateWindow(Xdpy, Xroot_window, 0, 0,
85 params->width, params->height,
86 0, Xvi->depth, InputOutput, Xvi->visual, mask, &attr);
91 if (params->winToEmbedInto != INT_ID_UNDEFINED) {
92 DEBUG_MSG(
"create_main_window: reparent %ld to %ld\n",
94 params->winToEmbedInto);
95 XReparentWindow(Xdpy, Xwin, (Window) params->winToEmbedInto, 0, 0);
99 if (!RUNNINGASPLUGIN) {
100 XMapWindow(Xdpy, Xwin);
104 if (params->fullscreen) {
105 XMoveWindow(Xdpy, Xwin, 0, 0);
106 XRaiseWindow(Xdpy, Xwin);
108 #ifdef HAVE_XF86_VMODE
109 XF86VidModeSetViewPort(Xdpy, Xscreen, 0, 0);
111 XGrabPointer(Xdpy, Xwin, TRUE, 0, GrabModeAsync, GrabModeAsync, Xwin, None, CurrentTime);
112 XGrabKeyboard(Xdpy, Xwin, TRUE, GrabModeAsync, GrabModeAsync, CurrentTime);
114 WM_DELETE_WINDOW = XInternAtom(Xdpy,
"WM_DELETE_WINDOW", FALSE);
115 XSetWMProtocols(Xdpy, Xwin, &WM_DELETE_WINDOW, 1);