added shutdown variable to indicate that we are shutting down and dont need to listen to some signals

This commit is contained in:
fluxgen 2003-08-12 12:21:42 +00:00
parent cb0621a6b6
commit 1f4944abb4
2 changed files with 7 additions and 4 deletions

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Screen.cc,v 1.217 2003/08/12 01:03:25 fluxgen Exp $
// $Id: Screen.cc,v 1.218 2003/08/12 12:21:42 fluxgen Exp $
#include "Screen.hh"
@ -302,7 +302,8 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
m_altname(altscreenname),
m_resource_manager(rm),
m_available_workspace_area(new Strut(0, 0, 0, 0)),
m_xinerama_headinfo(0) {
m_xinerama_headinfo(0),
m_shutdown(false) {
Display *disp = FbTk::App::instance()->display();
@ -2099,7 +2100,7 @@ void BScreen::shutdown() {
Display *disp = FbTk::App::instance()->display();
rootWindow().setEventMask(NoEventMask);
XSync(disp, False);
m_shutdown = true;
for_each(m_workspaces_list.begin(),
m_workspaces_list.end(),
mem_fun(&Workspace::shutdown));

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Screen.hh,v 1.120 2003/08/12 00:27:13 fluxgen Exp $
// $Id: Screen.hh,v 1.121 2003/08/12 12:20:48 fluxgen Exp $
#ifndef SCREEN_HH
#define SCREEN_HH
@ -318,6 +318,7 @@ public:
void addConfigMenu(const char *label, FbTk::Menu &menu);
void removeConfigMenu(FbTk::Menu &menu);
bool isShuttingdown() const { return m_shutdown; }
enum { ROWSMARTPLACEMENT = 1, COLSMARTPLACEMENT, CASCADEPLACEMENT,
UNDERMOUSEPLACEMENT, LEFTRIGHT, RIGHTLEFT, TOPBOTTOM, BOTTOMTOP };
@ -445,6 +446,7 @@ private:
} *m_xinerama_headinfo;
std::list<Strut *> m_strutlist;
bool m_shutdown;
};