diff options
author | rathnor <rathnor> | 2003-09-23 13:52:05 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-09-23 13:52:05 (GMT) |
commit | a4c41f621b97084516299a322d62750f2e86b6a9 (patch) | |
tree | 8c7d95e18fc86611f74156664967aa24ceb75447 /src/Ewmh.hh | |
parent | 36d598600becf7cf6797d33d41e106ba8beb26e6 (diff) | |
download | fluxbox-a4c41f621b97084516299a322d62750f2e86b6a9.zip fluxbox-a4c41f621b97084516299a322d62750f2e86b6a9.tar.bz2 |
add support for _NET_WM_STATE_FULLSCREEN
Diffstat (limited to 'src/Ewmh.hh')
-rw-r--r-- | src/Ewmh.hh | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/Ewmh.hh b/src/Ewmh.hh index 08de6cf..c4419ba 100644 --- a/src/Ewmh.hh +++ b/src/Ewmh.hh | |||
@@ -19,12 +19,13 @@ | |||
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.11 2003/08/27 21:06:04 fluxgen Exp $ | 22 | // $Id: Ewmh.hh,v 1.12 2003/09/23 13:52:05 rathnor Exp $ |
23 | 23 | ||
24 | #include "AtomHandler.hh" | 24 | #include "AtomHandler.hh" |
25 | 25 | ||
26 | #include <X11/Xatom.h> | 26 | #include <X11/Xatom.h> |
27 | #include <vector> | 27 | #include <vector> |
28 | #include <map> | ||
28 | 29 | ||
29 | class Ewmh:public AtomHandler { | 30 | class Ewmh:public AtomHandler { |
30 | public: | 31 | public: |
@@ -50,16 +51,25 @@ public: | |||
50 | BScreen * screen, WinClient * const winclient); | 51 | BScreen * screen, WinClient * const winclient); |
51 | 52 | ||
52 | bool propertyNotify(WinClient &winclient, Atom the_property); | 53 | bool propertyNotify(WinClient &winclient, Atom the_property); |
53 | //ignore these ones | 54 | void updateFrameClose(FluxboxWindow &win); |
54 | void updateFrameClose(FluxboxWindow &win) {} | 55 | |
56 | //ignore this one | ||
55 | void updateClientClose(WinClient &winclient) {} | 57 | void updateClientClose(WinClient &winclient) {} |
56 | 58 | ||
59 | void setFullscreen(FluxboxWindow &win, bool value); | ||
60 | |||
57 | private: | 61 | private: |
58 | 62 | ||
63 | typedef struct WindowState { | ||
64 | WindowState(int x, int y, unsigned int width, unsigned int height, int layer, unsigned int decor); | ||
65 | int x, y, layer; | ||
66 | unsigned int width, height, decor; | ||
67 | } WindowState; | ||
68 | |||
59 | enum { STATE_REMOVE = 0, STATE_ADD = 1, STATE_TOGGLE = 2}; | 69 | enum { STATE_REMOVE = 0, STATE_ADD = 1, STATE_TOGGLE = 2}; |
60 | 70 | ||
61 | void setState(FluxboxWindow &win, Atom state, bool value) const; | 71 | void setState(FluxboxWindow &win, Atom state, bool value); |
62 | void toggleState(FluxboxWindow &win, Atom state) const; | 72 | void toggleState(FluxboxWindow &win, Atom state); |
63 | void createAtoms(); | 73 | void createAtoms(); |
64 | void updateStrut(WinClient &winclient); | 74 | void updateStrut(WinClient &winclient); |
65 | 75 | ||
@@ -76,6 +86,7 @@ private: | |||
76 | Atom m_net_properties, m_net_wm_name, m_net_wm_desktop, m_net_wm_window_type, | 86 | 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, | 87 | 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, | 88 | m_net_wm_state_maximized_horz, m_net_wm_state_maximized_vert, |
89 | m_net_wm_state_fullscreen, | ||
79 | m_net_wm_strut, m_net_wm_icon_geometry, m_net_wm_icon, m_net_wm_pid, | 90 | m_net_wm_strut, m_net_wm_icon_geometry, m_net_wm_icon, m_net_wm_pid, |
80 | m_net_wm_handled_icons; | 91 | m_net_wm_handled_icons; |
81 | 92 | ||
@@ -83,4 +94,11 @@ private: | |||
83 | Atom m_net_wm_ping; | 94 | Atom m_net_wm_ping; |
84 | 95 | ||
85 | std::vector<Window> m_windows; | 96 | std::vector<Window> m_windows; |
97 | typedef std::map<FluxboxWindow *, WindowState *> SavedState; | ||
98 | SavedState m_savedstate; | ||
99 | |||
100 | WindowState *getState(FluxboxWindow &win); | ||
101 | void clearState(FluxboxWindow &win); | ||
102 | void saveState(FluxboxWindow &win, WindowState *state); | ||
103 | |||
86 | }; | 104 | }; |