Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-04-15 09:01:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-04-15 09:01:34 +0400
commita6113b005908778bebfead6356061b0df13a5ce4 (patch)
tree77b8b4764f63f2817ffafd2265e60144cb693da6 /intern
parentc9a54805a571411f26ab83df838206c237a6c025 (diff)
Made X11 use _NET_WM_STATE_MAXIMIZED_HORZ and _NET_WM_STATE_MAXIMIZED_VERT when opening (if -p isnt given as an arg)
gsr and myself both wrote a patch for this, using gsr's. import_obj - another error in splitting fixed.
Diffstat (limited to 'intern')
-rwxr-xr-xintern/ghost/intern/GHOST_WindowX11.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index cb356e0796e..ecba86f9468 100755
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -36,6 +36,7 @@
// For standard X11 cursors
#include <X11/cursorfont.h>
+#include <X11/Xatom.h>
// For obscure full screen mode stuuf
// lifted verbatim from blut.
@@ -163,9 +164,28 @@ GHOST_WindowX11(
XChangeProperty(m_display, m_window,
atom, atom, 32,
PropModeReplace, (unsigned char *) &hints, 4);
- }
- }
-
+ }
+ } else if (state == GHOST_kWindowStateMaximized) {
+ // With this, xprop should report the following just after launch
+ // _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ
+ // After demaximization the right side is empty, though (maybe not the most correct then?)
+ Atom state, atomh, atomv;
+
+ state = XInternAtom(m_display, "_NET_WM_STATE", False);
+ atomh = XInternAtom(m_display, "_NET_WM_STATE_MAXIMIZED_HORZ", False);
+ atomv = XInternAtom(m_display, "_NET_WM_STATE_MAXIMIZED_VERT", False);
+ if (state == None ) {
+ GHOST_PRINT("Atom _NET_WM_STATE requested but not avaliable nor created.\n");
+ } else {
+ XChangeProperty(m_display, m_window,
+ state, XA_ATOM, 32,
+ PropModeAppend, (unsigned char *) &atomh, 1);
+ XChangeProperty(m_display, m_window,
+ state, XA_ATOM, 32,
+ PropModeAppend, (unsigned char *) &atomv, 1);
+ }
+ }
+
// Create some hints for the window manager on how
// we want this window treated.