From 9d5eb092fab89c34c8b672d64bab0bffd27f3091 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 14 May 2003 12:07:06 +0000 Subject: added screen accessor and removed client from window before we send signal --- src/WinClient.cc | 13 +++++++------ src/WinClient.hh | 8 ++++++-- 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: WinClient.cc,v 1.8 2003/05/10 22:59:32 fluxgen Exp $ +// $Id: WinClient.cc,v 1.9 2003/05/14 12:07:06 fluxgen Exp $ #include "WinClient.hh" @@ -56,13 +56,18 @@ WinClient::WinClient(Window win, FluxboxWindow &fbwin):FbTk::FbWindow(win), m_win(&fbwin), modal(false), m_title(""), m_icon_title(""), - m_diesig(*this) { } + m_diesig(*this), m_screen(fbwin.screen()) { } WinClient::~WinClient() { #ifdef DEBUG cerr<<__FILE__<<"(~"<<__FUNCTION__<<")[this="<remove(window()); + + if (m_win != 0) + m_win->removeClient(*this); + // this takes care of any focus issues m_diesig.notify(); @@ -93,11 +98,7 @@ WinClient::~WinClient() { if (window()) fluxbox->removeWindowSearch(window()); - if (m_win != 0) - m_win->removeClient(*this); - FbTk::EventManager::instance()->remove(window()); m_win = 0; - } void 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: WinClient.hh,v 1.4 2003/05/10 14:16:38 fluxgen Exp $ +// $Id: WinClient.hh,v 1.5 2003/05/14 12:07:05 fluxgen Exp $ #ifndef WINCLIENT_HH #define WINCLIENT_HH @@ -31,6 +31,8 @@ #include #include +class BScreen; + /// Holds client window info class WinClient:public FbTk::FbWindow { public: @@ -48,7 +50,8 @@ public: bool getWMIconName(XTextProperty &textprop) const; void updateTitle(); void updateIconTitle(); - + BScreen &screen() { return m_screen; } + const BScreen &screen() const { return m_screen; } /// notifies when this client dies FbTk::Subject &dieSig() { return m_diesig; } @@ -109,6 +112,7 @@ private: bool modal; std::string m_title, m_icon_title; WinClientSubj m_diesig; + BScreen &m_screen; }; #endif // WINCLIENT_HH -- cgit v0.11.2