diff options
author | rathnor <rathnor> | 2003-06-23 14:16:05 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-06-23 14:16:05 (GMT) |
commit | 09a5c23c5b099af531842ae7868e98bc8d717dac (patch) | |
tree | cf5ea34c09ee3d16ddc2e9abfc1bd2880a94067d /src/WinClient.hh | |
parent | 2e6baffb9bf988901f9fa02f651efc9b2528d7b5 (diff) | |
download | fluxbox-09a5c23c5b099af531842ae7868e98bc8d717dac.zip fluxbox-09a5c23c5b099af531842ae7868e98bc8d717dac.tar.bz2 |
fix grouping to persist over restart, plus various related bugs.
Also move a large proportion of window initialisation from FluxboxWindow to
WinClient
Diffstat (limited to 'src/WinClient.hh')
-rw-r--r-- | src/WinClient.hh | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/src/WinClient.hh b/src/WinClient.hh index 30d6ff5..c72208f 100644 --- a/src/WinClient.hh +++ b/src/WinClient.hh | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: WinClient.hh,v 1.7 2003/06/15 18:36:40 fluxgen Exp $ | 22 | // $Id: WinClient.hh,v 1.8 2003/06/23 14:16:05 rathnor Exp $ |
23 | 23 | ||
24 | #ifndef WINCLIENT_HH | 24 | #ifndef WINCLIENT_HH |
25 | #define WINCLIENT_HH | 25 | #define WINCLIENT_HH |
@@ -38,7 +38,7 @@ class WinClient:public FbTk::FbWindow { | |||
38 | public: | 38 | public: |
39 | typedef std::list<WinClient *> TransientList; | 39 | typedef std::list<WinClient *> TransientList; |
40 | 40 | ||
41 | WinClient(Window win, FluxboxWindow &fbwin); | 41 | WinClient(Window win, BScreen &screen, FluxboxWindow *fbwin = 0); |
42 | 42 | ||
43 | ~WinClient(); | 43 | ~WinClient(); |
44 | void updateRect(int x, int y, unsigned int width, unsigned int height); | 44 | void updateRect(int x, int y, unsigned int width, unsigned int height); |
@@ -80,6 +80,20 @@ public: | |||
80 | const std::string &iconTitle() const { return m_icon_title; } | 80 | const std::string &iconTitle() const { return m_icon_title; } |
81 | const FluxboxWindow *fbwindow() const { return m_win; } | 81 | const FluxboxWindow *fbwindow() const { return m_win; } |
82 | FluxboxWindow *fbwindow() { return m_win; } | 82 | FluxboxWindow *fbwindow() { return m_win; } |
83 | |||
84 | static const int PropBlackboxHintsElements = 5; | ||
85 | static const int PropMwmHintsElements = 3; | ||
86 | |||
87 | void updateBlackboxHints(); | ||
88 | void updateMWMHints(); | ||
89 | void updateWMHints(); | ||
90 | void updateWMNormalHints(); | ||
91 | |||
92 | // grouping is tracked by remembering the window to the left in the group | ||
93 | Window getGroupLeftWindow() const; | ||
94 | void setGroupLeftWindow(Window win); | ||
95 | bool hasGroupLeftWindow() const; | ||
96 | |||
83 | /** | 97 | /** |
84 | !! TODO !! | 98 | !! TODO !! |
85 | remove or move these to private | 99 | remove or move these to private |
@@ -96,6 +110,7 @@ public: | |||
96 | min_aspect_x, min_aspect_y, max_aspect_x, max_aspect_y, | 110 | min_aspect_x, min_aspect_y, max_aspect_x, max_aspect_y, |
97 | base_width, base_height, win_gravity; | 111 | base_width, base_height, win_gravity; |
98 | unsigned long initial_state, normal_hint_flags, wm_hint_flags; | 112 | unsigned long initial_state, normal_hint_flags, wm_hint_flags; |
113 | bool send_focus_message; | ||
99 | 114 | ||
100 | // this structure only contains 3 elements... the Motif 2.0 structure contains | 115 | // this structure only contains 3 elements... the Motif 2.0 structure contains |
101 | // 5... we only need the first 3... so that is all we will define | 116 | // 5... we only need the first 3... so that is all we will define |
@@ -105,8 +120,6 @@ public: | |||
105 | unsigned long decorations; // Motif wm decorations | 120 | unsigned long decorations; // Motif wm decorations |
106 | } MwmHints; | 121 | } MwmHints; |
107 | 122 | ||
108 | MwmHints *mwm_hint; | ||
109 | FluxboxWindow::BlackboxHints *blackbox_hint; | ||
110 | FluxboxWindow *m_win; | 123 | FluxboxWindow *m_win; |
111 | class WinClientSubj: public FbTk::Subject { | 124 | class WinClientSubj: public FbTk::Subject { |
112 | public: | 125 | public: |
@@ -116,12 +129,28 @@ public: | |||
116 | WinClient &m_winclient; | 129 | WinClient &m_winclient; |
117 | }; | 130 | }; |
118 | 131 | ||
132 | inline int getFocusMode() const { return m_focus_mode; } | ||
133 | inline const FluxboxWindow::BlackboxHints *getBlackboxHint() const { | ||
134 | return m_blackbox_hint; } | ||
135 | void saveBlackboxAttribs(FluxboxWindow::BlackboxAttributes &blackbox_attribs); | ||
136 | inline const MwmHints *getMwmHint() const { return m_mwm_hint; } | ||
137 | |||
138 | enum { F_NOINPUT = 0, F_PASSIVE, F_LOCALLYACTIVE, F_GLOBALLYACTIVE }; | ||
139 | |||
119 | private: | 140 | private: |
120 | bool modal; | 141 | bool modal; |
142 | |||
121 | std::string m_title, m_icon_title; | 143 | std::string m_title, m_icon_title; |
144 | std::string m_class_name, m_instance_name; | ||
145 | |||
146 | FluxboxWindow::BlackboxHints *m_blackbox_hint; | ||
147 | MwmHints *m_mwm_hint; | ||
148 | |||
149 | int m_focus_mode; | ||
150 | |||
122 | WinClientSubj m_diesig; | 151 | WinClientSubj m_diesig; |
123 | BScreen &m_screen; | 152 | BScreen &m_screen; |
124 | std::string m_class_name, m_instance_name; | 153 | |
125 | }; | 154 | }; |
126 | 155 | ||
127 | #endif // WINCLIENT_HH | 156 | #endif // WINCLIENT_HH |