aboutsummaryrefslogtreecommitdiff
path: root/src/FbAtoms.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbAtoms.cc')
-rw-r--r--src/FbAtoms.cc130
1 files changed, 130 insertions, 0 deletions
diff --git a/src/FbAtoms.cc b/src/FbAtoms.cc
new file mode 100644
index 0000000..e19ba21
--- /dev/null
+++ b/src/FbAtoms.cc
@@ -0,0 +1,130 @@
1// FbAtom.cc
2// Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.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: FbAtoms.cc,v 1.2 2002/03/18 20:29:16 fluxgen Exp $
23
24#include "FbAtoms.hh"
25
26FbAtoms::FbAtoms(Display *display):m_init(false) {
27 if (display)
28 initAtoms(display);
29}
30
31FbAtoms::~FbAtoms() {
32
33}
34
35void FbAtoms::initAtoms(Display *display) {
36 if (m_init) //already done init?
37 return;
38 else
39 m_init = true;
40
41 xa_wm_colormap_windows =
42 XInternAtom(display, "WM_COLORMAP_WINDOWS", False);
43 xa_wm_protocols = XInternAtom(display, "WM_PROTOCOLS", False);
44 xa_wm_state = XInternAtom(display, "WM_STATE", False);
45 xa_wm_change_state = XInternAtom(display, "WM_CHANGE_STATE", False);
46 xa_wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", False);
47 xa_wm_take_focus = XInternAtom(display, "WM_TAKE_FOCUS", False);
48 motif_wm_hints = XInternAtom(display, "_MOTIF_WM_HINTS", False);
49
50 blackbox_hints = XInternAtom(display, "_BLACKBOX_HINTS", False);
51 blackbox_attributes = XInternAtom(display, "_BLACKBOX_ATTRIBUTES", False);
52 blackbox_change_attributes =
53 XInternAtom(display, "_BLACKBOX_CHANGE_ATTRIBUTES", False);
54
55 blackbox_structure_messages =
56 XInternAtom(display, "_BLACKBOX_STRUCTURE_MESSAGES", False);
57 blackbox_notify_startup =
58 XInternAtom(display, "_BLACKBOX_NOTIFY_STARTUP", False);
59 blackbox_notify_window_add =
60 XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_ADD", False);
61 blackbox_notify_window_del =
62 XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_DEL", False);
63 blackbox_notify_current_workspace =
64 XInternAtom(display, "_BLACKBOX_NOTIFY_CURRENT_WORKSPACE", False);
65 blackbox_notify_workspace_count =
66 XInternAtom(display, "_BLACKBOX_NOTIFY_WORKSPACE_COUNT", False);
67 blackbox_notify_window_focus =
68 XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_FOCUS", False);
69 blackbox_notify_window_raise =
70 XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_RAISE", False);
71 blackbox_notify_window_lower =
72 XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_LOWER", False);
73
74 blackbox_change_workspace =
75 XInternAtom(display, "_BLACKBOX_CHANGE_WORKSPACE", False);
76 blackbox_change_window_focus =
77 XInternAtom(display, "_BLACKBOX_CHANGE_WINDOW_FOCUS", False);
78 blackbox_cycle_window_focus =
79 XInternAtom(display, "_BLACKBOX_CYCLE_WINDOW_FOCUS", False);
80
81#ifdef NEWWMSPEC
82
83 net_supported = XInternAtom(display, "_NET_SUPPORTED", False);
84 net_client_list = XInternAtom(display, "_NET_CLIENT_LIST", False);
85 net_client_list_stacking = XInternAtom(display, "_NET_CLIENT_LIST_STACKING", False);
86 net_number_of_desktops = XInternAtom(display, "_NET_NUMBER_OF_DESKTOPS", False);
87 net_desktop_geometry = XInternAtom(display, "_NET_DESKTOP_GEOMETRY", False);
88 net_desktop_viewport = XInternAtom(display, "_NET_DESKTOP_VIEWPORT", False);
89 net_current_desktop = XInternAtom(display, "_NET_CURRENT_DESKTOP", False);
90 net_desktop_names = XInternAtom(display, "_NET_DESKTOP_NAMES", False);
91 net_active_window = XInternAtom(display, "_NET_ACTIVE_WINDOW", False);
92 net_workarea = XInternAtom(display, "_NET_WORKAREA", False);
93 net_supporting_wm_check = XInternAtom(display, "_NET_SUPPORTING_WM_CHECK", False);
94 net_virtual_roots = XInternAtom(display, "_NET_VIRTUAL_ROOTS", False);
95
96 net_close_window = XInternAtom(display, "_NET_CLOSE_WINDOW", False);
97 net_wm_moveresize = XInternAtom(display, "_NET_WM_MOVERESIZE", False);
98
99 net_properties = XInternAtom(display, "_NET_PROPERTIES", False);
100 net_wm_name = XInternAtom(display, "_NET_WM_NAME", False);
101 net_wm_desktop = XInternAtom(display, "_NET_WM_DESKTOP", False);
102 net_wm_window_type = XInternAtom(display, "_NET_WM_WINDOW_TYPE", False);
103 net_wm_state = XInternAtom(display, "_NET_WM_STATE", False);
104 net_wm_strut = XInternAtom(display, "_NET_WM_STRUT", False);
105 net_wm_icon_geometry = XInternAtom(display, "_NET_WM_ICON_GEOMETRY", False);
106 net_wm_icon = XInternAtom(display, "_NET_WM_ICON", False);
107 net_wm_pid = XInternAtom(display, "_NET_WM_PID", False);
108 net_wm_handled_icons = XInternAtom(display, "_NET_WM_HANDLED_ICONS", False);
109
110 net_wm_ping = XInternAtom(display, "_NET_WM_PING", False);
111
112#endif // NEWWMSPEC
113
114#ifdef GNOME
115
116 gnome_wm_win_layer = XInternAtom(display, "_WIN_LAYER", False);
117 gnome_wm_win_state = XInternAtom(display, "_WIN_STATE", False);
118 gnome_wm_win_hints = XInternAtom(display, "_WIN_HINTS", False);
119 gnome_wm_win_app_state = XInternAtom(display, "_WIN_APP_STATE", False);
120 gnome_wm_win_expanded_size = XInternAtom(display, "_WIN_EXPANDED_SIZE", False);
121 gnome_wm_win_icons = XInternAtom(display, "_WIN_ICONS", False);
122 gnome_wm_win_workspace = XInternAtom(display, "_WIN_WORKSPACE", False);
123 gnome_wm_win_workspace_count = XInternAtom(display, "_WIN_WORKSPACE_COUNT", False);
124 gnome_wm_win_workspace_names = XInternAtom(display, "_WIN_WORKSPACE_NAMES", False);
125 gnome_wm_win_client_list = XInternAtom(display, "_WIN_CLIENT_LIST", False);
126 gnome_wm_prot = XInternAtom(display, "_WIN_PROTOCOLS", False);
127 gnome_wm_supporting_wm_check = XInternAtom(display, "_WIN_SUPPORTING_WM_CHECK", False);
128
129#endif // GNOME
130}