summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorDana Olson <dana@shineuponthee.com>2014-09-16 03:22:29 -0400
committerDana Olson <dana@shineuponthee.com>2014-09-16 03:22:29 -0400
commit29fa278c6a039adef517861376ee0beef5f550cf (patch)
tree30ad2aeae11abe3bc402cbc46803031fc3c28790 /platform/x11
parent103cc7ffda6f15fedacc4be4ae93283472c474c3 (diff)
re-added old method for openbox/lxde (possibly others)
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/os_x11.cpp13
-rw-r--r--platform/x11/os_x11.h9
2 files changed, 22 insertions, 0 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 4bb4816723..708c167c54 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -170,6 +170,19 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
// borderless fullscreen window mode
if (current_videomode.fullscreen) {
+ // needed for lxde/openbox, possibly others
+ Hints hints;
+ Atom property;
+ hints.flags = 2;
+ hints.decorations = 0;
+ property = XInternAtom(x11_display, "_MOTIF_WM_HINTS", True);
+ XChangeProperty(x11_display, x11_window, property, property, 32, PropModeReplace, (unsigned char *)&hints, 5);
+ XMapRaised(x11_display, x11_window);
+ XWindowAttributes xwa;
+ XGetWindowAttributes(x11_display, DefaultRootWindow(x11_display), &xwa);
+ XMoveResizeWindow(x11_display, x11_window, 0, 0, xwa.width, xwa.height);
+
+ // code for netwm-compliants
XEvent xev;
Atom wm_state = XInternAtom(x11_display, "_NET_WM_STATE", False);
Atom fullscreen = XInternAtom(x11_display, "_NET_WM_STATE_FULLSCREEN", False);
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index dd7278e76d..fedf41ad0f 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -49,6 +49,15 @@
#include <X11/Xlib.h>
#include <X11/Xcursor/Xcursor.h>
+// Hints for X11 fullscreen
+typedef struct {
+ unsigned long flags;
+ unsigned long functions;
+ unsigned long decorations;
+ long inputMode;
+ unsigned long status;
+} Hints;
+
#undef CursorShape
/**
@author Juan Linietsky <reduzio@gmail.com>