- if (sm_overlayWindow)
- return FALSE;
-
- Display *dpy = (Display*) wxGetDisplay();
- Pixmap screenPixmap = RootWindow(dpy, DefaultScreen(dpy));
-
- int x = 0;
- int y = 0;
- int width, height;
- wxDisplaySize(&width, &height);
-
- if (rect)
- {
- x = rect->x; y = rect->y;
- width = rect->width; height = rect->height;
- }
- sm_overlayWindowX = x;
- sm_overlayWindowY = y;
-
- XSetWindowAttributes attributes;
- attributes.override_redirect = True;
- unsigned long valueMask = CWOverrideRedirect;
-
- sm_overlayWindow = (WXWindow) XCreateWindow(dpy, screenPixmap, x, y, width, height, 0,
- wxDisplayDepth(), InputOutput,
- DefaultVisual(dpy, 0), valueMask,
- & attributes);
-
- if (sm_overlayWindow)
- {
- XMapWindow(dpy, (Window) sm_overlayWindow);
- return TRUE;
- }
- else
- return FALSE;
+ if (sm_overlayWindow)
+ return false;
+
+ Display *dpy = (Display*) wxGetDisplay();
+ Pixmap screenPixmap = RootWindow(dpy, DefaultScreen(dpy));
+
+ int x = 0;
+ int y = 0;
+ int width, height;
+ wxDisplaySize(&width, &height);
+
+ if (rect)
+ {
+ x = rect->x; y = rect->y;
+ width = rect->width; height = rect->height;
+ }
+ sm_overlayWindowX = x;
+ sm_overlayWindowY = y;
+
+ XSetWindowAttributes attributes;
+ attributes.override_redirect = True;
+ unsigned long valueMask = CWOverrideRedirect;
+
+ sm_overlayWindow = (WXWindow) XCreateWindow(dpy, screenPixmap, x, y, width, height, 0,
+ wxDisplayDepth(), InputOutput,
+ DefaultVisual(dpy, 0), valueMask,
+ & attributes);
+
+ if (sm_overlayWindow)
+ {
+ XMapWindow(dpy, (Window) sm_overlayWindow);
+ return true;
+ }
+ else
+ return false;