summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Ewmh.cc27
-rw-r--r--src/Ewmh.hh3
2 files changed, 25 insertions, 5 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index 31db7c5..6b38e86 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Ewmh.cc,v 1.31 2003/08/11 14:51:15 fluxgen Exp $ 22// $Id: Ewmh.cc,v 1.32 2003/08/27 21:06:04 fluxgen Exp $
23 23
24#include "Ewmh.hh" 24#include "Ewmh.hh"
25 25
@@ -74,6 +74,8 @@ void Ewmh::initForScreen(BScreen &screen) {
74 // states that we support: 74 // states that we support:
75 m_net_wm_state_sticky, 75 m_net_wm_state_sticky,
76 m_net_wm_state_shaded, 76 m_net_wm_state_shaded,
77 m_net_wm_state_maximized_horz,
78 m_net_wm_state_maximized_vert,
77 79
78 m_net_wm_desktop, 80 m_net_wm_desktop,
79 81
@@ -407,7 +409,9 @@ void Ewmh::createAtoms() {
407 m_net_wm_state = XInternAtom(disp, "_NET_WM_STATE", False); 409 m_net_wm_state = XInternAtom(disp, "_NET_WM_STATE", False);
408 m_net_wm_state_sticky = XInternAtom(disp, "_NET_WM_STATE_STICKY", False); 410 m_net_wm_state_sticky = XInternAtom(disp, "_NET_WM_STATE_STICKY", False);
409 m_net_wm_state_shaded = XInternAtom(disp, "_NET_WM_STATE_SHADED", False); 411 m_net_wm_state_shaded = XInternAtom(disp, "_NET_WM_STATE_SHADED", False);
410 412 m_net_wm_state_maximized_horz = XInternAtom(disp, "_NET_WM_STATE_MAXIMIZED_HORZ", False);
413 m_net_wm_state_maximized_vert = XInternAtom(disp, "_NET_WM_STATE_MAXIMIZED_VERT", False);
414
411 m_net_wm_strut = XInternAtom(disp, "_NET_WM_STRUT", False); 415 m_net_wm_strut = XInternAtom(disp, "_NET_WM_STRUT", False);
412 m_net_wm_icon_geometry = XInternAtom(disp, "_NET_WM_ICON_GEOMETRY", False); 416 m_net_wm_icon_geometry = XInternAtom(disp, "_NET_WM_ICON_GEOMETRY", False);
413 m_net_wm_icon = XInternAtom(disp, "_NET_WM_ICON", False); 417 m_net_wm_icon = XInternAtom(disp, "_NET_WM_ICON", False);
@@ -428,7 +432,16 @@ void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) const {
428 if ((value && !win.isShaded()) || 432 if ((value && !win.isShaded()) ||
429 (!value && win.isShaded())) 433 (!value && win.isShaded()))
430 win.shade(); 434 win.shade();
431 } 435 } else if (state == m_net_wm_state_maximized_horz ) { // maximized Horizontal
436 if ((value && !win.isMaximized()) ||
437 (!value && win.isMaximized()))
438 win.maximizeHorizontal();
439 } else if (state == m_net_wm_state_maximized_vert) { // maximized Vertical
440 if ((value && !win.isMaximized()) ||
441 (!value && win.isMaximized()))
442 win.maximizeVertical();
443 }
444
432 445
433} 446}
434 447
@@ -436,8 +449,14 @@ void Ewmh::setState(FluxboxWindow &win, Atom state, bool value) const {
436void Ewmh::toggleState(FluxboxWindow &win, Atom state) const { 449void Ewmh::toggleState(FluxboxWindow &win, Atom state) const {
437 if (state == m_net_wm_state_sticky) { 450 if (state == m_net_wm_state_sticky) {
438 win.stick(); 451 win.stick();
439 } else if (state == m_net_wm_state_shaded) 452 } else if (state == m_net_wm_state_shaded){
440 win.shade(); 453 win.shade();
454 } else if (state == m_net_wm_state_maximized_horz ) { // maximized Horizontal
455 win.maximizeHorizontal();
456 } else if (state == m_net_wm_state_maximized_vert) { // maximized Vertical
457 win.maximizeVertical();
458 }
459
441} 460}
442 461
443 462
diff --git a/src/Ewmh.hh b/src/Ewmh.hh
index ffc660f..08de6cf 100644
--- a/src/Ewmh.hh
+++ b/src/Ewmh.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Ewmh.hh,v 1.10 2003/07/28 15:06:33 rathnor Exp $ 22// $Id: Ewmh.hh,v 1.11 2003/08/27 21:06:04 fluxgen Exp $
23 23
24#include "AtomHandler.hh" 24#include "AtomHandler.hh"
25 25
@@ -75,6 +75,7 @@ private:
75 // application window properties 75 // application window properties
76 Atom m_net_properties, m_net_wm_name, m_net_wm_desktop, m_net_wm_window_type, 76 Atom m_net_properties, m_net_wm_name, m_net_wm_desktop, m_net_wm_window_type,
77 m_net_wm_state, m_net_wm_state_sticky, m_net_wm_state_shaded, 77 m_net_wm_state, m_net_wm_state_sticky, m_net_wm_state_shaded,
78 m_net_wm_state_maximized_horz, m_net_wm_state_maximized_vert,
78 m_net_wm_strut, m_net_wm_icon_geometry, m_net_wm_icon, m_net_wm_pid, 79 m_net_wm_strut, m_net_wm_icon_geometry, m_net_wm_icon, m_net_wm_pid,
79 m_net_wm_handled_icons; 80 m_net_wm_handled_icons;
80 81