aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/WinClient.cc13
-rw-r--r--src/WinClient.hh8
2 files changed, 13 insertions, 8 deletions
diff --git a/src/WinClient.cc b/src/WinClient.cc
index 77cc31f..95e027b 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -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.cc,v 1.8 2003/05/10 22:59:32 fluxgen Exp $ 22// $Id: WinClient.cc,v 1.9 2003/05/14 12:07:06 fluxgen Exp $
23 23
24#include "WinClient.hh" 24#include "WinClient.hh"
25 25
@@ -56,13 +56,18 @@ WinClient::WinClient(Window win, FluxboxWindow &fbwin):FbTk::FbWindow(win),
56 m_win(&fbwin), 56 m_win(&fbwin),
57 modal(false), 57 modal(false),
58 m_title(""), m_icon_title(""), 58 m_title(""), m_icon_title(""),
59 m_diesig(*this) { } 59 m_diesig(*this), m_screen(fbwin.screen()) { }
60 60
61WinClient::~WinClient() { 61WinClient::~WinClient() {
62#ifdef DEBUG 62#ifdef DEBUG
63 cerr<<__FILE__<<"(~"<<__FUNCTION__<<")[this="<<this<<"]"<<endl; 63 cerr<<__FILE__<<"(~"<<__FUNCTION__<<")[this="<<this<<"]"<<endl;
64#endif // DEBUG 64#endif // DEBUG
65 65
66 FbTk::EventManager::instance()->remove(window());
67
68 if (m_win != 0)
69 m_win->removeClient(*this);
70
66 // this takes care of any focus issues 71 // this takes care of any focus issues
67 m_diesig.notify(); 72 m_diesig.notify();
68 73
@@ -93,11 +98,7 @@ WinClient::~WinClient() {
93 if (window()) 98 if (window())
94 fluxbox->removeWindowSearch(window()); 99 fluxbox->removeWindowSearch(window());
95 100
96 if (m_win != 0)
97 m_win->removeClient(*this);
98 FbTk::EventManager::instance()->remove(window());
99 m_win = 0; 101 m_win = 0;
100
101} 102}
102 103
103void WinClient::updateRect(int x, int y, 104void WinClient::updateRect(int x, int y,
diff --git a/src/WinClient.hh b/src/WinClient.hh
index 46b4523..4d69ee6 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.4 2003/05/10 14:16:38 fluxgen Exp $ 22// $Id: WinClient.hh,v 1.5 2003/05/14 12:07:05 fluxgen Exp $
23 23
24#ifndef WINCLIENT_HH 24#ifndef WINCLIENT_HH
25#define WINCLIENT_HH 25#define WINCLIENT_HH
@@ -31,6 +31,8 @@
31#include <X11/Xutil.h> 31#include <X11/Xutil.h>
32#include <string> 32#include <string>
33 33
34class BScreen;
35
34/// Holds client window info 36/// Holds client window info
35class WinClient:public FbTk::FbWindow { 37class WinClient:public FbTk::FbWindow {
36public: 38public:
@@ -48,7 +50,8 @@ public:
48 bool getWMIconName(XTextProperty &textprop) const; 50 bool getWMIconName(XTextProperty &textprop) const;
49 void updateTitle(); 51 void updateTitle();
50 void updateIconTitle(); 52 void updateIconTitle();
51 53 BScreen &screen() { return m_screen; }
54 const BScreen &screen() const { return m_screen; }
52 /// notifies when this client dies 55 /// notifies when this client dies
53 FbTk::Subject &dieSig() { return m_diesig; } 56 FbTk::Subject &dieSig() { return m_diesig; }
54 57
@@ -109,6 +112,7 @@ private:
109 bool modal; 112 bool modal;
110 std::string m_title, m_icon_title; 113 std::string m_title, m_icon_title;
111 WinClientSubj m_diesig; 114 WinClientSubj m_diesig;
115 BScreen &m_screen;
112}; 116};
113 117
114#endif // WINCLIENT_HH 118#endif // WINCLIENT_HH