aboutsummaryrefslogtreecommitdiff
path: root/src/WindowState.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-27 22:29:33 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-27 22:29:33 (GMT)
commit82047e6a391a12be9583168f28ac72c1154108d6 (patch)
tree68cc4865da7bdf95052907c6d8ce9cf0fb19c90b /src/WindowState.hh
parenta2ec0c9bdd9ebcc713426a79209b9ca90b4db301 (diff)
downloadfluxbox-82047e6a391a12be9583168f28ac72c1154108d6.zip
fluxbox-82047e6a391a12be9583168f28ac72c1154108d6.tar.bz2
move some things from FluxboxWindow to WindowState
Diffstat (limited to 'src/WindowState.hh')
-rw-r--r--src/WindowState.hh26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/WindowState.hh b/src/WindowState.hh
index ea9b635..883443a 100644
--- a/src/WindowState.hh
+++ b/src/WindowState.hh
@@ -22,6 +22,8 @@
22#ifndef WINDOWSTATE_HH 22#ifndef WINDOWSTATE_HH
23#define WINDOWSTATE_HH 23#define WINDOWSTATE_HH
24 24
25#include "Layer.hh"
26
25#include <X11/Xutil.h> 27#include <X11/Xutil.h>
26 28
27#include <string> 29#include <string>
@@ -93,11 +95,24 @@ public:
93 DECOR_TAB = DECORM_BORDER|DECORM_MENU|DECORM_TAB 95 DECOR_TAB = DECORM_BORDER|DECORM_MENU|DECORM_TAB
94 }; 96 };
95 97
98 enum WindowType {
99 TYPE_NORMAL,
100 TYPE_DOCK,
101 TYPE_DESKTOP,
102 TYPE_SPLASH,
103 TYPE_DIALOG,
104 TYPE_MENU,
105 TYPE_TOOLBAR
106 };
107
96 WindowState(): 108 WindowState():
97 size_hints(), 109 size_hints(),
98 deco_mask(DECOR_NORMAL), 110 deco_mask(DECOR_NORMAL),
111 type(TYPE_NORMAL),
99 focused(false), 112 focused(false),
100 shaded(false), fullscreen(false), maximized(0), 113 shaded(false), fullscreen(false), stuck(false), iconic(false),
114 focus_hidden(false), icon_hidden(false),
115 maximized(0), layernum(Layer::NORMAL),
101 x(0), y(0), width(1), height(1) { } 116 x(0), y(0), width(1), height(1) { }
102 117
103 void saveGeometry(int x, int y, unsigned int width, unsigned int height, 118 void saveGeometry(int x, int y, unsigned int width, unsigned int height,
@@ -112,15 +127,16 @@ public:
112 bool useTitlebar() const; 127 bool useTitlebar() const;
113 128
114 bool isMaximized() const { return maximized == MAX_FULL; } 129 bool isMaximized() const { return maximized == MAX_FULL; }
115 bool isMaximizedHorz() const { return (bool)(maximized & MAX_HORZ); } 130 bool isMaximizedHorz() const { return maximized & MAX_HORZ; }
116 bool isMaximizedVert() const { return (bool)(maximized & MAX_VERT); } 131 bool isMaximizedVert() const { return maximized & MAX_VERT; }
117 132
118 static int getDecoMaskFromString(const std::string &str); 133 static int getDecoMaskFromString(const std::string &str);
119 134
120 SizeHints size_hints; 135 SizeHints size_hints;
121 unsigned int deco_mask; 136 unsigned int deco_mask;
122 bool focused, shaded, fullscreen; 137 WindowType type;
123 int maximized; 138 bool focused, shaded, fullscreen, stuck, iconic, focus_hidden, icon_hidden;
139 int maximized, layernum;
124 int x, y; 140 int x, y;
125 unsigned int width, height; 141 unsigned int width, height;
126}; 142};