From f6749fb6cd6519eb8800c046db0dfdebeac84404 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 17 Feb 2002 18:43:30 +0000 Subject: handleUnmapnotify and gnome stuff --- src/fluxbox.cc | 183 +++++++++++++++++++++++++-------------------------------- 1 file changed, 80 insertions(+), 103 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 1b332b6..2ad0e6f 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.33 2002/02/16 02:28:11 pekdon Exp $ +// $Id: fluxbox.cc,v 1.34 2002/02/17 18:43:30 fluxgen Exp $ //Use some GNU extensions #ifndef _GNU_SOURCE @@ -574,33 +574,7 @@ void Fluxbox::process_event(XEvent *e) { case UnmapNotify: - { - - FluxboxWindow *win = 0; - #ifdef DEBUG - cerr<<__FILE__<<"("<<__LINE__<<"): Unmapnotify 0x"<xunmap.window<xunmap.window))!=0 ) { - // only process windows with StructureNotify selected - // (ignore SubstructureNotify) -// if (win->getClientWindow() != e->xunmap.window || -// win->isTransient()) { - win->unmapNotifyEvent(&e->xunmap); -// } - #ifdef SLIT - } else if ((slit = searchSlit(e->xunmap.window))!=0) { - slit->removeClient(e->xunmap.window); - #ifdef DEBUG - cerr<<__FILE__<<"("<<__LINE__<<"): Here"<xunmap); break; case CreateNotify: break; @@ -644,17 +618,18 @@ void Fluxbox::process_event(XEvent *e) { } break; case PropertyNotify: - { - last_time = e->xproperty.time; + { + + last_time = e->xproperty.time; - if (e->xproperty.state != PropertyDelete) { - FluxboxWindow *win = searchWindow(e->xproperty.window); + if (e->xproperty.state != PropertyDelete) { + FluxboxWindow *win = searchWindow(e->xproperty.window); - if (win) - win->propertyNotifyEvent(e->xproperty.atom); - } - + if (win) + win->propertyNotifyEvent(e->xproperty.atom); } + + } break; case EnterNotify: { @@ -956,6 +931,40 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) { } } +void Fluxbox::handleUnmapNotify(XUnmapEvent &ue) { + + + FluxboxWindow *win = 0; + #ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): Unmapnotify 0x"<unmapNotifyEvent(&ue)) + delete win; + + } + #ifdef SLIT + else if ((slit = searchSlit(ue.window))!=0) { + slit->removeClient(ue.window); + #ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): Here"<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); + #endif + + //get new states + int flag = ce.data.l[0] & ce.data.l[1]; + //set states + win->setGnomeState(flag); - 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"<getScreenNumber(); -#ifdef SLIT + #ifdef SLIT string slit_placement; switch (screen->getSlitPlacement()) { @@ -1781,7 +1768,8 @@ void Fluxbox::save_rc(void) { sprintf(rc_string, "session.screen%d.slit.autoHide: %s", screen_number, ((screen->getSlit()->doAutoHide()) ? "True" : "False")); XrmPutLineResource(&new_blackboxrc, rc_string); -#endif // SLIT + + #endif // SLIT sprintf(rc_string, "session.screen%d.rowPlacementDirection: %s", screen_number, ((screen->getRowPlacementDirection() == BScreen::LEFTRIGHT) ? @@ -1854,15 +1842,13 @@ void Fluxbox::save_rc(void) { // write out the users workspace names sprintf(rc_string, "session.screen%d.workspaceNames: ", screen_number); string workspaces_string(rc_string); - #ifdef DEBUG - cerr<<__FILE__<<"("<<__LINE__<<"): workspaces="<getCount()<getCount(); workspace++) { if (screen->getWorkspace(workspace)->getName()!=0) workspaces_string.append(screen->getWorkspace(workspace)->getName()); else workspaces_string.append("Null"); - workspaces_string.append(", "); + workspaces_string.append(","); } XrmPutLineResource(&new_blackboxrc, workspaces_string.c_str()); @@ -2338,15 +2324,6 @@ void Fluxbox::real_rereadMenu(void) { it.current()->rereadMenu(); } -/* -void Fluxbox::saveStyleFilename(const char *filename) { - if (resource.style_file) - delete [] resource.style_file; - - resource.style_file = StringUtil::strdup(filename); -} -*/ - void Fluxbox::saveMenuFilename(const char *filename) { Bool found = False; -- cgit v0.11.2