aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Ewmh.cc28
-rw-r--r--src/Ewmh.hh18
2 files changed, 41 insertions, 5 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index 6f12ab7..0fbd75b 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -103,6 +103,7 @@ void Ewmh::initForScreen(BScreen &screen) {
103 // window properties 103 // window properties
104 m_net_wm_strut, 104 m_net_wm_strut,
105 m_net_wm_state, 105 m_net_wm_state,
106
106 // states that we support: 107 // states that we support:
107 m_net_wm_state_sticky, 108 m_net_wm_state_sticky,
108 m_net_wm_state_shaded, 109 m_net_wm_state_shaded,
@@ -143,6 +144,7 @@ void Ewmh::initForScreen(BScreen &screen) {
143 m_net_close_window, 144 m_net_close_window,
144 m_net_moveresize_window, 145 m_net_moveresize_window,
145 m_net_workarea, 146 m_net_workarea,
147 m_net_restack_window,
146 148
147 // desktop properties 149 // desktop properties
148 m_net_wm_desktop, 150 m_net_wm_desktop,
@@ -770,7 +772,30 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce,
770 winclient->fbwindow()->moveResizeForClient(ce.data.l[1], ce.data.l[2], 772 winclient->fbwindow()->moveResizeForClient(ce.data.l[1], ce.data.l[2],
771 ce.data.l[3], ce.data.l[4], win_gravity); 773 ce.data.l[3], ce.data.l[4], win_gravity);
772 return true; 774 return true;
773 } 775 } else if (ce.message_type == m_net_restack_window) {
776#ifndef DEBUG
777 cerr << "Ewmh: restack window" << endl;
778#endif // DEBUG
779 if (winclient == 0 || winclient->fbwindow() == 0)
780 return true;
781
782 // ce.data.l[0] = source indication
783 // ce.data.l[1] = sibling window
784 // ce.data.l[2] = detail
785
786
787 WinClient *above_win = Fluxbox::instance()->searchWindow(ce.data.l[1]);
788 if (above_win == 0 || above_win->fbwindow() == 0 ||
789 above_win == winclient) // this would be very wrong :)
790 return true;
791
792 // this might break the transient_for layering
793 winclient->layerItem().stackBelowItem(&winclient->layerItem(),
794 &above_win->layerItem());
795
796 return true;
797
798 }
774 799
775 // we didn't handle the ce.message_type here 800 // we didn't handle the ce.message_type here
776 return false; 801 return false;
@@ -805,6 +830,7 @@ void Ewmh::createAtoms() {
805 830
806 m_net_close_window = XInternAtom(disp, "_NET_CLOSE_WINDOW", False); 831 m_net_close_window = XInternAtom(disp, "_NET_CLOSE_WINDOW", False);
807 m_net_moveresize_window = XInternAtom(disp, "_NET_MOVERESIZE_WINDOW", False); 832 m_net_moveresize_window = XInternAtom(disp, "_NET_MOVERESIZE_WINDOW", False);
833 m_net_restack_window = XInternAtom(disp, "_NET_RESTACK_WINDOW", False);
808 834
809 // TODO: implement this one 835 // TODO: implement this one
810 m_net_wm_moveresize = XInternAtom(disp, "_NET_WM_MOVERESIZE", False); 836 m_net_wm_moveresize = XInternAtom(disp, "_NET_WM_MOVERESIZE", False);
diff --git a/src/Ewmh.hh b/src/Ewmh.hh
index b1f5d39..497665a 100644
--- a/src/Ewmh.hh
+++ b/src/Ewmh.hh
@@ -82,10 +82,20 @@ private:
82 void setupState(FluxboxWindow &win); 82 void setupState(FluxboxWindow &win);
83 83
84 // root window properties 84 // root window properties
85 Atom m_net_supported, m_net_client_list, m_net_client_list_stacking, 85 Atom m_net_supported,
86 m_net_number_of_desktops, m_net_desktop_geometry, m_net_desktop_viewport, 86 m_net_client_list,
87 m_net_current_desktop, m_net_desktop_names, m_net_active_window, m_net_workarea, 87 m_net_client_list_stacking,
88 m_net_supporting_wm_check, m_net_virtual_roots, m_net_moveresize_window; 88 m_net_number_of_desktops,
89 m_net_desktop_geometry,
90 m_net_desktop_viewport,
91 m_net_current_desktop,
92 m_net_desktop_names,
93 m_net_active_window,
94 m_net_workarea,
95 m_net_supporting_wm_check,
96 m_net_virtual_roots,
97 m_net_moveresize_window,
98 m_net_restack_window;
89 99
90 // root window messages 100 // root window messages
91 Atom m_net_close_window, m_net_wm_moveresize; 101 Atom m_net_close_window, m_net_wm_moveresize;