aboutsummaryrefslogtreecommitdiff
path: root/src/WinClient.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/WinClient.hh')
-rw-r--r--src/WinClient.hh21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/WinClient.hh b/src/WinClient.hh
index 7626514..50f26ee 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.10 2003/07/21 15:26:56 rathnor Exp $ 22// $Id: WinClient.hh,v 1.11 2003/07/28 15:06:34 rathnor Exp $
23 23
24#ifndef WINCLIENT_HH 24#ifndef WINCLIENT_HH
25#define WINCLIENT_HH 25#define WINCLIENT_HH
@@ -32,6 +32,7 @@
32#include <string> 32#include <string>
33 33
34class BScreen; 34class BScreen;
35class Strut;
35 36
36/// Holds client window info 37/// Holds client window info
37class WinClient:public FbTk::FbWindow { 38class WinClient:public FbTk::FbWindow {
@@ -44,7 +45,8 @@ public:
44 void updateRect(int x, int y, unsigned int width, unsigned int height); 45 void updateRect(int x, int y, unsigned int width, unsigned int height);
45 bool sendFocus(); // returns whether we sent a message or not 46 bool sendFocus(); // returns whether we sent a message or not
46 // i.e. whether we assume the focus will get taken 47 // i.e. whether we assume the focus will get taken
47 void sendClose(); 48 void sendClose(bool forceful = false);
49 inline bool isClosable() const { return closable; }
48 void reparent(Window win, int x, int y); 50 void reparent(Window win, int x, int y);
49 bool getAttrib(XWindowAttributes &attr) const; 51 bool getAttrib(XWindowAttributes &attr) const;
50 bool getWMName(XTextProperty &textprop) const; 52 bool getWMName(XTextProperty &textprop) const;
@@ -55,8 +57,9 @@ public:
55 const std::string &getWMClassClass() const; 57 const std::string &getWMClassClass() const;
56 /// updates from wm class hints 58 /// updates from wm class hints
57 void updateWMClassHint(); 59 void updateWMClassHint();
60 void getWMProtocols();
58 61
59 inline const std::string getTitle() const { return m_title; } 62 inline const std::string &getTitle() const { return m_title; }
60 void updateTitle(); 63 void updateTitle();
61 void updateIconTitle(); 64 void updateIconTitle();
62 BScreen &screen() { return m_screen; } 65 BScreen &screen() { return m_screen; }
@@ -80,6 +83,11 @@ public:
80 return (m_win == &win); 83 return (m_win == &win);
81 } 84 }
82 85
86 void setStrut(Strut *strut);
87 void clearStrut();
88
89 bool focus(); // calls Window->setCurrentClient to give focus to this client
90
83 const std::string &title() const { return m_title; } 91 const std::string &title() const { return m_title; }
84 const std::string &iconTitle() const { return m_icon_title; } 92 const std::string &iconTitle() const { return m_icon_title; }
85 const FluxboxWindow *fbwindow() const { return m_win; } 93 const FluxboxWindow *fbwindow() const { return m_win; }
@@ -98,6 +106,9 @@ public:
98 void setGroupLeftWindow(Window win); 106 void setGroupLeftWindow(Window win);
99 bool hasGroupLeftWindow() const; 107 bool hasGroupLeftWindow() const;
100 108
109 // does this client have a pending unmap or destroy event?
110 bool validateClient() const;
111
101 /** 112 /**
102 !! TODO !! 113 !! TODO !!
103 remove or move these to private 114 remove or move these to private
@@ -114,7 +125,6 @@ public:
114 min_aspect_x, min_aspect_y, max_aspect_x, max_aspect_y, 125 min_aspect_x, min_aspect_y, max_aspect_x, max_aspect_y,
115 base_width, base_height, win_gravity; 126 base_width, base_height, win_gravity;
116 unsigned long initial_state, normal_hint_flags, wm_hint_flags; 127 unsigned long initial_state, normal_hint_flags, wm_hint_flags;
117 bool send_focus_message;
118 128
119 // this structure only contains 3 elements... the Motif 2.0 structure contains 129 // this structure only contains 3 elements... the Motif 2.0 structure contains
120 // 5... we only need the first 3... so that is all we will define 130 // 5... we only need the first 3... so that is all we will define
@@ -145,6 +155,7 @@ private:
145 // number of transients which we are modal for 155 // number of transients which we are modal for
146 // or indicates that we are modal if don't have any transients 156 // or indicates that we are modal if don't have any transients
147 int m_modal; 157 int m_modal;
158 bool send_focus_message, closable;
148 159
149 std::string m_title, m_icon_title; 160 std::string m_title, m_icon_title;
150 std::string m_class_name, m_instance_name; 161 std::string m_class_name, m_instance_name;
@@ -157,6 +168,8 @@ private:
157 WinClientSubj m_diesig; 168 WinClientSubj m_diesig;
158 BScreen &m_screen; 169 BScreen &m_screen;
159 170
171 Strut *m_strut;
172
160}; 173};
161 174
162#endif // WINCLIENT_HH 175#endif // WINCLIENT_HH