From b3921bc4e6807ba759fe1b55b9da1f4885f88a1c Mon Sep 17 00:00:00 2001 From: rathnor Date: Wed, 16 Apr 2003 14:43:06 +0000 Subject: fix workspace warping and netizen updates for warping (Simon) --- src/Netizen.cc | 4 ++-- src/Netizen.hh | 2 +- src/Screen.cc | 11 +++-------- src/Screen.hh | 3 +-- src/Window.cc | 4 ++-- src/Workspace.cc | 22 ++++++++++++++++++---- src/fluxbox.cc | 6 +++--- 7 files changed, 30 insertions(+), 22 deletions(-) diff --git a/src/Netizen.cc b/src/Netizen.cc index 28019d0..95460b8 100644 --- a/src/Netizen.cc +++ b/src/Netizen.cc @@ -69,10 +69,10 @@ void Netizen::sendWindowFocus(Window w) { } -void Netizen::sendWindowAdd(Window w, unsigned long p) { +void Netizen::sendWindowAdd(Window w, unsigned long wkspc) { event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowAddAtom(); event.xclient.data.l[1] = w; - event.xclient.data.l[2] = p; + event.xclient.data.l[2] = wkspc; XSendEvent(m_display, window, False, NoEventMask, &event); diff --git a/src/Netizen.hh b/src/Netizen.hh index 914cd08..d872ebe 100644 --- a/src/Netizen.hh +++ b/src/Netizen.hh @@ -38,7 +38,7 @@ public: void sendCurrentWorkspace(); void sendWindowFocus(Window w); - void sendWindowAdd(Window w, unsigned long p); + void sendWindowAdd(Window w, unsigned long wkspc); void sendWindowDel(Window w); void sendWindowRaise(Window w); void sendWindowLower(Window w); diff --git a/src/Screen.cc b/src/Screen.cc index 7f3efd3..c25de83 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -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.124 2003/04/16 00:37:19 fluxgen Exp $ +// $Id: Screen.cc,v 1.125 2003/04/16 14:43:01 rathnor Exp $ #include "Screen.hh" @@ -934,7 +934,7 @@ void BScreen::changeWorkspaceID(unsigned int id) { if (focused && focused->isMoving()) { if (doOpaqueMove()) - reassociateGroup(focused, id, true); + reassociateWindow(focused, id, true); // don't reassociate if not opaque moving focused->pauseMoving(); } @@ -945,7 +945,7 @@ void BScreen::changeWorkspaceID(unsigned int id) { Workspace::Windows::iterator it = wins.begin(); for (; it != wins.end(); ++it) { if ((*it)->isStuck()) { - reassociateGroup(*it, id, true); + reassociateWindow(*it, id, true); } } @@ -1323,11 +1323,6 @@ string BScreen::getNameOfWorkspace(unsigned int workspace) const { } } -void BScreen::reassociateGroup(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) { - //!! TODO - cerr<<__FILE__<<"("<<__FUNCTION__<<") TODO!"<ungrab(); diff --git a/src/Workspace.cc b/src/Workspace.cc index 2bc0d78..9ddce15 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Workspace.cc,v 1.52 2003/04/15 12:20:27 fluxgen Exp $ +// $Id: Workspace.cc,v 1.53 2003/04/16 14:43:06 rathnor Exp $ #include "Workspace.hh" @@ -194,9 +194,14 @@ int Workspace::addWindow(FluxboxWindow &w, bool place) { m_windowlist.push_back(&w); updateClientmenu(); - - if (!w.isStuck()) - screen.updateNetizenWindowAdd(w.getClientWindow(), m_id); + if (!w.isStuck()) { + FluxboxWindow::ClientList::iterator client_it = + w.clientList().begin(); + FluxboxWindow::ClientList::iterator client_it_end = + w.clientList().end(); + for (; client_it != client_it_end; ++client_it) + screen.updateNetizenWindowAdd((*client_it)->window(), m_id); + } return w.getWindowNumber(); } @@ -274,6 +279,15 @@ int Workspace::removeWindow(FluxboxWindow *w) { if (lastfocus == w || m_windowlist.empty()) lastfocus = 0; + if (!w->isStuck()) { + FluxboxWindow::ClientList::iterator client_it = + w->clientList().begin(); + FluxboxWindow::ClientList::iterator client_it_end = + w->clientList().end(); + for (; client_it != client_it_end; ++client_it) + screen.updateNetizenWindowDel((*client_it)->window()); + } + return m_windowlist.size(); } diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 7e9c1da..b01e420 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.112 2003/04/16 10:49:59 rathnor Exp $ +// $Id: fluxbox.cc,v 1.113 2003/04/16 14:43:06 rathnor Exp $ #include "fluxbox.hh" @@ -685,9 +685,9 @@ void Fluxbox::handleEvent(XEvent * const e) { cerr<<"Fluxbox Warning! Could not find screen to map window on!"<mapRequestEvent(e->xmaprequest); - } break; case MapNotify: { -- cgit v0.11.2