aboutsummaryrefslogtreecommitdiff
path: root/src/Window.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-09-07 20:16:43 (GMT)
committerfluxgen <fluxgen>2002-09-07 20:16:43 (GMT)
commit54d855ee5947d6575d04d2a26cf5132df1f003ec (patch)
tree89bd7d00fc08c8ea35c63758aa354348f76968e7 /src/Window.hh
parentd1bd3245b4e1c949874f1fa9d18cd223b20cc28f (diff)
downloadfluxbox_pavel-54d855ee5947d6575d04d2a26cf5132df1f003ec.zip
fluxbox_pavel-54d855ee5947d6575d04d2a26cf5132df1f003ec.tar.bz2
removed gnome stuff
Diffstat (limited to 'src/Window.hh')
-rw-r--r--src/Window.hh94
1 files changed, 21 insertions, 73 deletions
diff --git a/src/Window.hh b/src/Window.hh
index 6090d71..c01372f 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.hh,v 1.29 2002/08/30 14:06:40 fluxgen Exp $ 25// $Id: Window.hh,v 1.30 2002/09/07 20:13:55 fluxgen Exp $
26 26
27#ifndef WINDOW_HH 27#ifndef WINDOW_HH
28#define WINDOW_HH 28#define WINDOW_HH
@@ -30,6 +30,7 @@
30#include "BaseDisplay.hh" 30#include "BaseDisplay.hh"
31#include "Timer.hh" 31#include "Timer.hh"
32#include "Windowmenu.hh" 32#include "Windowmenu.hh"
33#include "Subject.hh"
33 34
34#include <X11/Xlib.h> 35#include <X11/Xlib.h>
35#include <X11/Xutil.h> 36#include <X11/Xutil.h>
@@ -51,41 +52,6 @@ class Tab;
51*/ 52*/
52class FluxboxWindow : public TimeoutHandler { 53class FluxboxWindow : public TimeoutHandler {
53public: 54public:
54 /// obsolete
55 enum Error{NOERROR=0, XGETWINDOWATTRIB, CANTFINDSCREEN};
56
57#ifdef GNOME
58 enum GnomeLayer {
59 WIN_LAYER_DESKTOP = 0,
60 WIN_LAYER_BELOW = 2,
61 WIN_LAYER_NORMAL = 4,
62 WIN_LAYER_ONTOP = 6,
63 WIN_LAYER_DOCK = 8,
64 WIN_LAYER_ABOVE_DOCK = 10,
65 WIN_LAYER_MENU = 12
66 };
67
68 enum GnomeState {
69 WIN_STATE_STICKY = (1<<0), // everyone knows sticky
70 WIN_STATE_MINIMIZED = (1<<1), // Reserved - definition is unclear
71 WIN_STATE_MAXIMIZED_VERT = (1<<2), // window in maximized V state
72 WIN_STATE_MAXIMIZED_HORIZ = (1<<3), // window in maximized H state
73 WIN_STATE_HIDDEN = (1<<4), // not on taskbar but window visible
74 WIN_STATE_SHADED = (1<<5), // shaded (MacOS / Afterstep style)
75 WIN_STATE_HID_WORKSPACE = (1<<6), // not on current desktop
76 WIN_STATE_HID_TRANSIENT = (1<<7), // owner of transient is hidden
77 WIN_STATE_FIXED_POSITION = (1<<8), // window is fixed in position even
78 WIN_STATE_ARRANGE_IGNORE = (1<<9) // ignore for auto arranging
79 };
80
81 enum GnomeHints {
82 WIN_HINTS_SKIP_FOCUS = (1<<0), // "alt-tab" skips this win
83 WIN_HINTS_SKIP_WINLIST = (1<<1), // do not show in window list
84 WIN_HINTS_SKIP_TASKBAR = (1<<2), // do not show on taskbar
85 WIN_HINTS_GROUP_TRANSIENT = (1<<3), // Reserved - definition is unclear
86 WIN_HINTS_FOCUS_ON_CLICK = (1<<4) // app only accepts focus if clicked
87 };
88#endif // GNOME
89 55
90 enum WinLayer { 56 enum WinLayer {
91 LAYER_BOTTOM = 0x01, 57 LAYER_BOTTOM = 0x01,
@@ -176,6 +142,13 @@ public:
176 const std::string className() const { return m_class_name; } 142 const std::string className() const { return m_class_name; }
177 const std::string instanceName() const { return m_instance_name; } 143 const std::string instanceName() const { return m_instance_name; }
178 bool isLowerTab() const; 144 bool isLowerTab() const;
145 // signals
146 FbTk::Subject &stateSig() { return m_statesig; }
147 const FbTk::Subject &stateSig() const { return m_statesig; }
148 FbTk::Subject &hintSig() { return m_hintsig; }
149 const FbTk::Subject &hintSig() const { return m_hintsig; }
150 FbTk::Subject &workspaceSig() { return m_workspacesig; }
151 const FbTk::Subject &workspaceSig() const { return m_workspacesig; }
179 //@} 152 //@}
180 153
181 inline void setWindowNumber(int n) { window_number = n; } 154 inline void setWindowNumber(int n) { window_number = n; }
@@ -218,8 +191,6 @@ public:
218 191
219 void setDecoration(Decoration decoration); 192 void setDecoration(Decoration decoration);
220 void toggleDecoration(); 193 void toggleDecoration();
221
222 static void showError(FluxboxWindow::Error error);
223 194
224#ifdef SHAPE 195#ifdef SHAPE
225 void shapeEvent(XShapeEvent *); 196 void shapeEvent(XShapeEvent *);
@@ -235,13 +206,19 @@ public:
235 unsigned long decorations; // Motif wm decorations 206 unsigned long decorations; // Motif wm decorations
236 } MwmHints; 207 } MwmHints;
237 208
238#ifdef GNOME 209 class WinSubject: public FbTk::Subject {
239 void setGnomeState(int state); 210 public:
240 inline int getGnomeHints() const { return gnome_hints; } 211 WinSubject(FluxboxWindow &w):m_win(w) { }
241#endif //GNOME 212 FluxboxWindow &win() { return m_win; }
242 213 const FluxboxWindow &win() const { return m_win; }
214 private:
215 FluxboxWindow &m_win;
216 };
217
243private: 218private:
244 219 // state and hint signals
220 WinSubject m_hintsig, m_statesig, m_workspacesig;
221
245 BImageControl *image_ctrl; //image control for rendering 222 BImageControl *image_ctrl; //image control for rendering
246 223
247 // got from WM_CLASS 224 // got from WM_CLASS
@@ -350,35 +327,6 @@ private:
350 void destroyHandle(); 327 void destroyHandle();
351 void checkTransient(); 328 void checkTransient();
352 329
353#ifdef GNOME
354
355 void updateGnomeAtoms() const;
356 void updateGnomeStateAtom() const;
357 void updateGnomeHintsAtom() const;
358 void updateGnomeLayerAtom() const;
359 void updateGnomeWorkspaceAtom() const;
360
361 void setGnomeLayer(int layer);
362
363 int getGnomeWindowState() const;
364 bool handleGnomePropertyNotify(Atom atom);
365 int getGnomeLayer() const;
366 void loadGnomeAtoms();
367 void loadGnomeStateAtom();
368 void loadGnomeHintsAtom();
369 void loadGnomeLayerAtom();
370
371 int gnome_hints;
372#endif //GNOME
373
374#ifdef NEWWMSPEC
375
376 void updateNETWMAtoms();
377 void handleNETWMProperyNotify(Atom atom);
378 int getNETWMWindowState();
379
380#endif //NEWWMSPEC
381
382 Window findTitleButton(int type); 330 Window findTitleButton(int type);
383private: 331private:
384 //event callbacks 332 //event callbacks