From caa40d71dfd871d9b1d5dc2bac88e9f17050dec7 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 4 Feb 2002 06:57:26 +0000 Subject: fixed MapNotify event --- src/fluxbox.cc | 62 ++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index a45f4e4..2f2b7af 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.25 2002/02/02 19:51:15 pekdon Exp $ +// $Id: fluxbox.cc,v 1.26 2002/02/04 06:57:26 fluxgen Exp $ //Use some GNU extensions #ifndef _GNU_SOURCE @@ -237,7 +237,7 @@ std::string Resource:: getString() { return **this; } template<> -string Resource:: +std::string Resource:: getString() { string retval; int size=m_value.size(); @@ -701,6 +701,9 @@ void Fluxbox::process_event(XEvent *e) { case MapNotify: { + #ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): MapNotify:"<xmap.window<xmap.window); if (win) @@ -711,6 +714,9 @@ void Fluxbox::process_event(XEvent *e) { case UnmapNotify: { + #ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): UnmapNotify:"<xunmap.window<xunmap.window))) { - win->unmapNotifyEvent(&e->xunmap); - + // only process windows with StructureNotify selected + // (ignore SubstructureNotify) + // if (win->windowFor(e->xunmap.window)) + if (win->getClientWindow()!=e->xunmap.window) + win->unmapNotifyEvent(&e->xunmap); #ifdef SLIT } else if ((slit = searchSlit(e->xunmap.window))) { slit->removeClient(e->xunmap.window); @@ -729,7 +738,8 @@ void Fluxbox::process_event(XEvent *e) { break; } - + case CreateNotify: + break; case DestroyNotify: { FluxboxWindow *win = (FluxboxWindow *) 0; @@ -964,6 +974,7 @@ void Fluxbox::process_event(XEvent *e) { case Keys::RIGHTWORKSPACE: screen->rightWorkspace(); break; + case Keys::KILLWINDOW: //kill the current window XKillClient(screen->getBaseDisplay()->getXDisplay(), focused_window->getClientWindow()); @@ -1057,6 +1068,10 @@ void Fluxbox::process_event(XEvent *e) { case ClientMessage: { + #ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): ClientMessage. data.l[0]="<xclient.data.l[0]<xclient.format == 32) { if (e->xclient.message_type == getWMChangeStateAtom()) { FluxboxWindow *win = searchWindow(e->xclient.window); @@ -1101,20 +1116,42 @@ void Fluxbox::process_event(XEvent *e) { win->changeBlackboxHints(&net); } - } + } #ifdef GNOME else if (e->xclient.message_type == getGnomeWorkspaceAtom()) { #ifdef DEBUG - cerr<<__FILE__<<"("<<__LINE__<<"): Got workspace atom"<