aboutsummaryrefslogtreecommitdiff
path: root/src/Gnome.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Gnome.hh')
-rw-r--r--src/Gnome.hh96
1 files changed, 96 insertions, 0 deletions
diff --git a/src/Gnome.hh b/src/Gnome.hh
new file mode 100644
index 0000000..abdd8bf
--- /dev/null
+++ b/src/Gnome.hh
@@ -0,0 +1,96 @@
1// Gnome.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: Gnome.hh,v 1.1 2002/09/07 20:32:44 fluxgen Exp $
23
24#ifndef GNOME_HH
25#define GNOME_HH
26
27#include "AtomHandler.hh"
28
29#include <X11/Xatom.h>
30#include <vector>
31
32class Gnome:public AtomHandler {
33public:
34 enum GnomeLayer {
35 WIN_LAYER_DESKTOP = 0,
36 WIN_LAYER_BELOW = 2,
37 WIN_LAYER_NORMAL = 4,
38 WIN_LAYER_ONTOP = 6,
39 WIN_LAYER_DOCK = 8,
40 WIN_LAYER_ABOVE_DOCK = 10,
41 WIN_LAYER_MENU = 12
42 };
43
44 enum GnomeState {
45 WIN_STATE_STICKY = (1<<0), // everyone knows sticky
46 WIN_STATE_MINIMIZED = (1<<1), // Reserved - definition is unclear
47 WIN_STATE_MAXIMIZED_VERT = (1<<2), // window in maximized V state
48 WIN_STATE_MAXIMIZED_HORIZ = (1<<3), // window in maximized H state
49 WIN_STATE_HIDDEN = (1<<4), // not on taskbar but window visible
50 WIN_STATE_SHADED = (1<<5), // shaded (MacOS / Afterstep style)
51 WIN_STATE_HID_WORKSPACE = (1<<6), // not on current desktop
52 WIN_STATE_HID_TRANSIENT = (1<<7), // owner of transient is hidden
53 WIN_STATE_FIXED_POSITION = (1<<8), // window is fixed in position even
54 WIN_STATE_ARRANGE_IGNORE = (1<<9) // ignore for auto arranging
55 };
56
57 enum GnomeHints {
58 WIN_HINTS_SKIP_FOCUS = (1<<0), // skip this window
59 WIN_HINTS_SKIP_WINLIST = (1<<1), // do not show in window list
60 WIN_HINTS_SKIP_TASKBAR = (1<<2), // do not show on taskbar
61 WIN_HINTS_GROUP_TRANSIENT = (1<<3), // Reserved - definition is unclear
62 WIN_HINTS_FOCUS_ON_CLICK = (1<<4) // app only accepts focus if clicked
63 };
64
65 Gnome();
66 ~Gnome();
67 void initForScreen(const BScreen &screen);
68
69 void updateClientList(const BScreen &screen);
70 void updateWorkspaceNames(const BScreen &screen);
71 void updateCurrentWorkspace(const BScreen &screen);
72 void updateWorkspaceCount(const BScreen &screen);
73
74 void updateState(FluxboxWindow *win);
75 void updateHints(FluxboxWindow *win);
76 void updateWorkspace(FluxboxWindow *win);
77
78
79 bool checkClientMessage(const XClientMessageEvent &ce, BScreen *screen, FluxboxWindow *win);
80
81private:
82 void setLayer(GnomeLayer layer);
83 void setState(FluxboxWindow *win, int state);
84 void setLayer(int layer);
85 void createAtoms();
86 Atom m_gnome_wm_win_layer, m_gnome_wm_win_state, m_gnome_wm_win_hints,
87 m_gnome_wm_win_app_state, m_gnome_wm_win_expanded_size,
88 m_gnome_wm_win_icons, m_gnome_wm_win_workspace,
89 m_gnome_wm_win_workspace_count, m_gnome_wm_win_workspace_names,
90 m_gnome_wm_win_client_list;
91 Atom m_gnome_wm_prot;
92 Atom m_gnome_wm_supporting_wm_check;
93 std::vector<Window> m_gnomewindows;
94};
95
96#endif // GNOME_HH