added screen accessor and removed client from window before we send signal
This commit is contained in:
parent
860b70e5b6
commit
9d5eb092fa
2 changed files with 13 additions and 8 deletions
|
@ -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="<<this<<"]"<<endl;
|
||||
#endif // DEBUG
|
||||
|
||||
FbTk::EventManager::instance()->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,
|
||||
|
|
|
@ -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 <X11/Xutil.h>
|
||||
#include <string>
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue