aboutsummaryrefslogtreecommitdiff
path: root/src/Ewmh.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-10-02 16:26:05 (GMT)
committerfluxgen <fluxgen>2002-10-02 16:26:05 (GMT)
commit93ae8f2d2f6bf69832f01f4952ac194c88a0849a (patch)
tree533b68409c65d9934a8533ba7b6447f94a0fdeca /src/Ewmh.hh
parent086ee7d26617da471434971aa26a584996900824 (diff)
downloadfluxbox-93ae8f2d2f6bf69832f01f4952ac194c88a0849a.zip
fluxbox-93ae8f2d2f6bf69832f01f4952ac194c88a0849a.tar.bz2
initial import
Diffstat (limited to 'src/Ewmh.hh')
-rw-r--r--src/Ewmh.hh75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/Ewmh.hh b/src/Ewmh.hh
new file mode 100644
index 0000000..2344045
--- /dev/null
+++ b/src/Ewmh.hh
@@ -0,0 +1,75 @@
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.1 2002/10/02 16:26:05 fluxgen 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(const BScreen &screen);
35 void setupWindow(FluxboxWindow &win);
36
37 void updateClientList(const BScreen &screen);
38 void updateWorkspaceNames(const BScreen &screen);
39 void updateCurrentWorkspace(const BScreen &screen);
40 void updateWorkspaceCount(const BScreen &screen);
41
42 void updateState(FluxboxWindow &win);
43 void updateHints(FluxboxWindow &win);
44 void updateWorkspace(FluxboxWindow &win);
45
46
47 bool checkClientMessage(const XClientMessageEvent &ce,
48 BScreen *screen, FluxboxWindow *win);
49private:
50
51 enum { STATE_REMOVE = 0, STATE_ADD = 1, STATE_TOGGLE = 2};
52
53 void setState(FluxboxWindow &win, Atom flags) const;
54 void createAtoms();
55
56 // root window properties
57 Atom m_net_supported, m_net_client_list, m_net_client_list_stacking,
58 m_net_number_of_desktops, m_net_desktop_geometry, m_net_desktop_viewport,
59 m_net_current_desktop, m_net_desktop_names, m_net_active_window, m_net_workarea,
60 m_net_supporting_wm_check, m_net_virtual_roots;
61
62 // root window messages
63 Atom m_net_close_window, m_net_wm_moveresize;
64
65 // application window properties
66 Atom m_net_properties, m_net_wm_name, m_net_wm_desktop, m_net_wm_window_type,
67 m_net_wm_state, m_net_wm_state_sticky, m_net_wm_state_shaded,
68 m_net_wm_strut, m_net_wm_icon_geometry, m_net_wm_icon, m_net_wm_pid,
69 m_net_wm_handled_icons;
70
71 // application protocols
72 Atom m_net_wm_ping;
73
74 std::vector<Window> m_windows;
75};