aboutsummaryrefslogtreecommitdiff
path: root/src/Ewmh.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ewmh.hh')
-rw-r--r--src/Ewmh.hh85
1 files changed, 85 insertions, 0 deletions
diff --git a/src/Ewmh.hh b/src/Ewmh.hh
new file mode 100644
index 0000000..206f36e
--- /dev/null
+++ b/src/Ewmh.hh
@@ -0,0 +1,85 @@
1// Ewmh.hh for fluxbox
2// Copyright (c) 2002 Henrik Kinnunen (fluxgen@fluxbox.org)
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"),
6// to deal in the Software without restriction, including without limitation
7// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8// and/or sell copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice shall be included in
12// all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE.
21
22// $Id: Ewmh.hh,v 1.9 2003/07/04 14:06:20 rathnor Exp $
23
24#include "AtomHandler.hh"
25
26#include <X11/Xatom.h>
27#include <vector>
28
29class Ewmh:public AtomHandler {
30public:
31
32 Ewmh();
33 ~Ewmh();
34 void initForScreen(BScreen &screen);
35 void setupFrame(FluxboxWindow &win);
36 void setupClient(WinClient &winclient) {}
37
38 void updateClientList(BScreen &screen);
39 void updateWorkspaceNames(BScreen &screen);
40 void updateCurrentWorkspace(BScreen &screen);
41 void updateWorkspaceCount(BScreen &screen);
42
43 void updateState(FluxboxWindow &win);
44 void updateLayer(FluxboxWindow &win);
45 void updateHints(FluxboxWindow &win);
46 void updateWorkspace(FluxboxWindow &win);
47
48
49 bool checkClientMessage(const XClientMessageEvent &ce,
50 BScreen * screen, FluxboxWindow * const win);
51
52 bool propertyNotify(FluxboxWindow &win, Atom the_property);
53 //ignore these ones
54 void updateFrameClose(FluxboxWindow &win) {}
55 void updateClientClose(WinClient &winclient) {}
56
57private:
58
59 enum { STATE_REMOVE = 0, STATE_ADD = 1, STATE_TOGGLE = 2};
60
61 void setState(FluxboxWindow &win, Atom state, bool value) const;
62 void toggleState(FluxboxWindow &win, Atom state) const;
63 void createAtoms();
64 void updateStrut(FluxboxWindow &win);
65
66 // root window properties
67 Atom m_net_supported, m_net_client_list, m_net_client_list_stacking,
68 m_net_number_of_desktops, m_net_desktop_geometry, m_net_desktop_viewport,
69 m_net_current_desktop, m_net_desktop_names, m_net_active_window, m_net_workarea,
70 m_net_supporting_wm_check, m_net_virtual_roots, m_net_moveresize_window;
71
72 // root window messages
73 Atom m_net_close_window, m_net_wm_moveresize;
74
75 // application window properties
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,
78 m_net_wm_strut, m_net_wm_icon_geometry, m_net_wm_icon, m_net_wm_pid,
79 m_net_wm_handled_icons;
80
81 // application protocols
82 Atom m_net_wm_ping;
83
84 std::vector<Window> m_windows;
85};