fix workspace warping and netizen updates for warping (Simon)
This commit is contained in:
parent
0750c1966b
commit
b3921bc4e6
7 changed files with 30 additions and 22 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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!"<<endl;
|
||||
}
|
||||
|
||||
void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) {
|
||||
if (w == 0)
|
||||
return;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Screen.hh,v 1.78 2003/04/16 13:43:42 rathnor Exp $
|
||||
// $Id: Screen.hh,v 1.79 2003/04/16 14:43:02 rathnor Exp $
|
||||
|
||||
#ifndef SCREEN_HH
|
||||
#define SCREEN_HH
|
||||
|
@ -269,7 +269,6 @@ public:
|
|||
std::string getNameOfWorkspace(unsigned int workspace) const;
|
||||
void changeWorkspaceID(unsigned int);
|
||||
void sendToWorkspace(unsigned int workspace, FluxboxWindow *win=0, bool changeworkspace=true);
|
||||
void reassociateGroup(FluxboxWindow *window, unsigned int workspace_id, bool ignore_sticky);
|
||||
void reassociateWindow(FluxboxWindow *window, unsigned int workspace_id, bool ignore_sticky);
|
||||
void prevFocus() { prevFocus(0); }
|
||||
void nextFocus() { nextFocus(0); }
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Window.cc,v 1.141 2003/04/16 13:43:50 rathnor Exp $
|
||||
// $Id: Window.cc,v 1.142 2003/04/16 14:43:04 rathnor Exp $
|
||||
|
||||
#include "Window.hh"
|
||||
|
||||
|
@ -2598,7 +2598,7 @@ void FluxboxWindow::stopMoving() {
|
|||
frame().height() + 2*frame().window().borderWidth());
|
||||
moveResize(last_move_x, last_move_y, m_frame.width(), m_frame.height());
|
||||
if (workspace_number != getScreen().getCurrentWorkspaceID()) {
|
||||
screen.reassociateGroup(this, getScreen().getCurrentWorkspaceID(), true);
|
||||
screen.reassociateWindow(this, getScreen().getCurrentWorkspaceID(), true);
|
||||
m_frame.show();
|
||||
}
|
||||
fluxbox->ungrab();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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!"<<endl;
|
||||
}
|
||||
// handled in FluxboxWindow::handleEvent
|
||||
|
||||
if (win)
|
||||
win->mapRequestEvent(e->xmaprequest);
|
||||
|
||||
}
|
||||
break;
|
||||
case MapNotify: {
|
||||
|
|
Loading…
Reference in a new issue