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