From 8043a7f3031706392a5ed684ebefbef23822a9ef Mon Sep 17 00:00:00 2001 From: fluxgen Date: Thu, 7 Feb 2002 14:23:01 +0000 Subject: added _WIN_STATE to gnome atoms --- src/fluxbox.cc | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 59 insertions(+), 9 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 569af96..bdc207c 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.28 2002/02/06 17:12:09 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.29 2002/02/07 14:23:01 fluxgen Exp $ //Use some GNU extensions #ifndef _GNU_SOURCE @@ -579,8 +579,11 @@ void Fluxbox::process_event(XEvent *e) { case UnmapNotify: { - FluxboxWindow *win = (FluxboxWindow *) 0; - + FluxboxWindow *win = 0; + #ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): Unmapnotify 0x"<xunmap.window<getClientWindow() != e->xunmap.window || - win->isTransient()) + win->isTransient()) { win->unmapNotifyEvent(&e->xunmap); + } #ifdef SLIT } else if ((slit = searchSlit(e->xunmap.window))!=0) { slit->removeClient(e->xunmap.window); @@ -598,9 +602,7 @@ void Fluxbox::process_event(XEvent *e) { cerr<<__FILE__<<"("<<__LINE__<<"): Here"<= 0 && - ce.data.l[0] < screen->getCount()) { - + ce.data.l[0] < screen->getCount()) screen->changeWorkspaceID(ce.data.l[0]); + + } else if (ce.message_type == getGnomeStateAtom()) { + #ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): _WIN_STATE"<isStuck()) + win->stick(); + } else if (win->isStuck()) + win->stick(); + + if (ce.data.l[0] & BaseDisplay::WIN_STATE_MINIMIZED) { + cerr<<"Minimized"<isIconic()) + win->iconify(); + } else if (win->isIconic()) + win->deiconify(true, true); + + if (ce.data.l[0] & BaseDisplay::WIN_STATE_MAXIMIZED_VERT) + cerr<<"Maximize Vert"<isShaded()) win->shade(); + } + if (ce.data.l[0] & BaseDisplay::WIN_STATE_HID_WORKSPACE) + cerr<<"HID Workspace"<