From e55252b46417d90be6bd730f2fcb16fc0e82eae9 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sat, 17 May 2003 11:00:50 +0000 Subject: fixed slit client die issue --- src/Slit.cc | 12 ++++++------ src/Slit.hh | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Slit.cc b/src/Slit.cc index 4664e62..6f1a7c4 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Slit.cc,v 1.54 2003/05/15 23:30:06 fluxgen Exp $ +// $Id: Slit.cc,v 1.55 2003/05/17 11:00:50 fluxgen Exp $ #include "Slit.hh" @@ -334,7 +334,9 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename) reconfigure(); } - +unsigned int Slit::s_eventmask = StructureNotifyMask | SubstructureNotifyMask | + SubstructureRedirectMask | ButtonPressMask | + EnterWindowMask | LeaveWindowMask | ExposureMask; Slit::~Slit() { if (frame.pixmap != 0) screen().imageControl().removeImage(frame.pixmap); @@ -462,8 +464,7 @@ void Slit::addClient(Window w) { XChangeSaveSet(disp, client->window, SetModeInsert); // reactivate events for frame.window - frame.window.setEventMask(SubstructureRedirectMask | - ButtonPressMask | EnterWindowMask | LeaveWindowMask | ExposureMask); + frame.window.setEventMask(s_eventmask); // setup event for slit client window client->enableEvents(); @@ -528,8 +529,7 @@ void Slit::removeClient(SlitClient *client, bool remap, bool destroy) { client->x, client->y); XChangeSaveSet(disp, client->window, SetModeDelete); // reactivate events to frame.window - frame.window.setEventMask(SubstructureRedirectMask | ButtonPressMask | - EnterWindowMask | LeaveWindowMask | ExposureMask); + frame.window.setEventMask(s_eventmask); XFlush(disp); } diff --git a/src/Slit.hh b/src/Slit.hh index b94b5e7..10b141a 100644 --- a/src/Slit.hh +++ b/src/Slit.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -/// $Id: Slit.hh,v 1.29 2003/05/15 11:17:27 fluxgen Exp $ +/// $Id: Slit.hh,v 1.30 2003/05/17 11:00:50 fluxgen Exp $ #ifndef SLIT_HH #define SLIT_HH @@ -146,6 +146,7 @@ private: std::auto_ptr m_layeritem; std::auto_ptr m_slit_theme; std::auto_ptr m_transp; + static unsigned int s_eventmask; }; -- cgit v0.11.2