diff options
author | rathnor <rathnor> | 2003-04-16 14:43:06 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-04-16 14:43:06 (GMT) |
commit | b3921bc4e6807ba759fe1b55b9da1f4885f88a1c (patch) | |
tree | 4c8b60de334dc67f80d0e71f13f675bed42f265e | |
parent | 0750c1966badd4c1aaade6127a3d78e0375cf410 (diff) | |
download | fluxbox-b3921bc4e6807ba759fe1b55b9da1f4885f88a1c.zip fluxbox-b3921bc4e6807ba759fe1b55b9da1f4885f88a1c.tar.bz2 |
fix workspace warping and netizen updates for warping (Simon)
-rw-r--r-- | src/Netizen.cc | 4 | ||||
-rw-r--r-- | src/Netizen.hh | 2 | ||||
-rw-r--r-- | src/Screen.cc | 11 | ||||
-rw-r--r-- | src/Screen.hh | 3 | ||||
-rw-r--r-- | src/Window.cc | 4 | ||||
-rw-r--r-- | src/Workspace.cc | 22 | ||||
-rw-r--r-- | 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) { | |||
69 | } | 69 | } |
70 | 70 | ||
71 | 71 | ||
72 | void Netizen::sendWindowAdd(Window w, unsigned long p) { | 72 | void Netizen::sendWindowAdd(Window w, unsigned long wkspc) { |
73 | event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowAddAtom(); | 73 | event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWindowAddAtom(); |
74 | event.xclient.data.l[1] = w; | 74 | event.xclient.data.l[1] = w; |
75 | event.xclient.data.l[2] = p; | 75 | event.xclient.data.l[2] = wkspc; |
76 | 76 | ||
77 | XSendEvent(m_display, window, False, NoEventMask, &event); | 77 | XSendEvent(m_display, window, False, NoEventMask, &event); |
78 | 78 | ||
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: | |||
38 | void sendCurrentWorkspace(); | 38 | void sendCurrentWorkspace(); |
39 | 39 | ||
40 | void sendWindowFocus(Window w); | 40 | void sendWindowFocus(Window w); |
41 | void sendWindowAdd(Window w, unsigned long p); | 41 | void sendWindowAdd(Window w, unsigned long wkspc); |
42 | void sendWindowDel(Window w); | 42 | void sendWindowDel(Window w); |
43 | void sendWindowRaise(Window w); | 43 | void sendWindowRaise(Window w); |
44 | void sendWindowLower(Window w); | 44 | 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 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.124 2003/04/16 00:37:19 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.125 2003/04/16 14:43:01 rathnor Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -934,7 +934,7 @@ void BScreen::changeWorkspaceID(unsigned int id) { | |||
934 | 934 | ||
935 | if (focused && focused->isMoving()) { | 935 | if (focused && focused->isMoving()) { |
936 | if (doOpaqueMove()) | 936 | if (doOpaqueMove()) |
937 | reassociateGroup(focused, id, true); | 937 | reassociateWindow(focused, id, true); |
938 | // don't reassociate if not opaque moving | 938 | // don't reassociate if not opaque moving |
939 | focused->pauseMoving(); | 939 | focused->pauseMoving(); |
940 | } | 940 | } |
@@ -945,7 +945,7 @@ void BScreen::changeWorkspaceID(unsigned int id) { | |||
945 | Workspace::Windows::iterator it = wins.begin(); | 945 | Workspace::Windows::iterator it = wins.begin(); |
946 | for (; it != wins.end(); ++it) { | 946 | for (; it != wins.end(); ++it) { |
947 | if ((*it)->isStuck()) { | 947 | if ((*it)->isStuck()) { |
948 | reassociateGroup(*it, id, true); | 948 | reassociateWindow(*it, id, true); |
949 | } | 949 | } |
950 | } | 950 | } |
951 | 951 | ||
@@ -1323,11 +1323,6 @@ string BScreen::getNameOfWorkspace(unsigned int workspace) const { | |||
1323 | } | 1323 | } |
1324 | } | 1324 | } |
1325 | 1325 | ||
1326 | void BScreen::reassociateGroup(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) { | ||
1327 | //!! TODO | ||
1328 | cerr<<__FILE__<<"("<<__FUNCTION__<<") TODO!"<<endl; | ||
1329 | } | ||
1330 | |||
1331 | void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) { | 1326 | void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) { |
1332 | if (w == 0) | 1327 | if (w == 0) |
1333 | return; | 1328 | return; |
diff --git a/src/Screen.hh b/src/Screen.hh index 33fa03c..21d31f3 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.hh,v 1.78 2003/04/16 13:43:42 rathnor Exp $ | 25 | // $Id: Screen.hh,v 1.79 2003/04/16 14:43:02 rathnor Exp $ |
26 | 26 | ||
27 | #ifndef SCREEN_HH | 27 | #ifndef SCREEN_HH |
28 | #define SCREEN_HH | 28 | #define SCREEN_HH |
@@ -269,7 +269,6 @@ public: | |||
269 | std::string getNameOfWorkspace(unsigned int workspace) const; | 269 | std::string getNameOfWorkspace(unsigned int workspace) const; |
270 | void changeWorkspaceID(unsigned int); | 270 | void changeWorkspaceID(unsigned int); |
271 | void sendToWorkspace(unsigned int workspace, FluxboxWindow *win=0, bool changeworkspace=true); | 271 | void sendToWorkspace(unsigned int workspace, FluxboxWindow *win=0, bool changeworkspace=true); |
272 | void reassociateGroup(FluxboxWindow *window, unsigned int workspace_id, bool ignore_sticky); | ||
273 | void reassociateWindow(FluxboxWindow *window, unsigned int workspace_id, bool ignore_sticky); | 272 | void reassociateWindow(FluxboxWindow *window, unsigned int workspace_id, bool ignore_sticky); |
274 | void prevFocus() { prevFocus(0); } | 273 | void prevFocus() { prevFocus(0); } |
275 | void nextFocus() { nextFocus(0); } | 274 | void nextFocus() { nextFocus(0); } |
diff --git a/src/Window.cc b/src/Window.cc index fd070f9..6b55372 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Window.cc,v 1.141 2003/04/16 13:43:50 rathnor Exp $ | 25 | // $Id: Window.cc,v 1.142 2003/04/16 14:43:04 rathnor Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -2598,7 +2598,7 @@ void FluxboxWindow::stopMoving() { | |||
2598 | frame().height() + 2*frame().window().borderWidth()); | 2598 | frame().height() + 2*frame().window().borderWidth()); |
2599 | moveResize(last_move_x, last_move_y, m_frame.width(), m_frame.height()); | 2599 | moveResize(last_move_x, last_move_y, m_frame.width(), m_frame.height()); |
2600 | if (workspace_number != getScreen().getCurrentWorkspaceID()) { | 2600 | if (workspace_number != getScreen().getCurrentWorkspaceID()) { |
2601 | screen.reassociateGroup(this, getScreen().getCurrentWorkspaceID(), true); | 2601 | screen.reassociateWindow(this, getScreen().getCurrentWorkspaceID(), true); |
2602 | m_frame.show(); | 2602 | m_frame.show(); |
2603 | } | 2603 | } |
2604 | fluxbox->ungrab(); | 2604 | fluxbox->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 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Workspace.cc,v 1.52 2003/04/15 12:20:27 fluxgen Exp $ | 25 | // $Id: Workspace.cc,v 1.53 2003/04/16 14:43:06 rathnor Exp $ |
26 | 26 | ||
27 | #include "Workspace.hh" | 27 | #include "Workspace.hh" |
28 | 28 | ||
@@ -194,9 +194,14 @@ int Workspace::addWindow(FluxboxWindow &w, bool place) { | |||
194 | m_windowlist.push_back(&w); | 194 | m_windowlist.push_back(&w); |
195 | updateClientmenu(); | 195 | updateClientmenu(); |
196 | 196 | ||
197 | 197 | if (!w.isStuck()) { | |
198 | if (!w.isStuck()) | 198 | FluxboxWindow::ClientList::iterator client_it = |
199 | screen.updateNetizenWindowAdd(w.getClientWindow(), m_id); | 199 | w.clientList().begin(); |
200 | FluxboxWindow::ClientList::iterator client_it_end = | ||
201 | w.clientList().end(); | ||
202 | for (; client_it != client_it_end; ++client_it) | ||
203 | screen.updateNetizenWindowAdd((*client_it)->window(), m_id); | ||
204 | } | ||
200 | 205 | ||
201 | return w.getWindowNumber(); | 206 | return w.getWindowNumber(); |
202 | } | 207 | } |
@@ -274,6 +279,15 @@ int Workspace::removeWindow(FluxboxWindow *w) { | |||
274 | if (lastfocus == w || m_windowlist.empty()) | 279 | if (lastfocus == w || m_windowlist.empty()) |
275 | lastfocus = 0; | 280 | lastfocus = 0; |
276 | 281 | ||
282 | if (!w->isStuck()) { | ||
283 | FluxboxWindow::ClientList::iterator client_it = | ||
284 | w->clientList().begin(); | ||
285 | FluxboxWindow::ClientList::iterator client_it_end = | ||
286 | w->clientList().end(); | ||
287 | for (; client_it != client_it_end; ++client_it) | ||
288 | screen.updateNetizenWindowDel((*client_it)->window()); | ||
289 | } | ||
290 | |||
277 | return m_windowlist.size(); | 291 | return m_windowlist.size(); |
278 | } | 292 | } |
279 | 293 | ||
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 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: fluxbox.cc,v 1.112 2003/04/16 10:49:59 rathnor Exp $ | 25 | // $Id: fluxbox.cc,v 1.113 2003/04/16 14:43:06 rathnor Exp $ |
26 | 26 | ||
27 | #include "fluxbox.hh" | 27 | #include "fluxbox.hh" |
28 | 28 | ||
@@ -685,9 +685,9 @@ void Fluxbox::handleEvent(XEvent * const e) { | |||
685 | cerr<<"Fluxbox Warning! Could not find screen to map window on!"<<endl; | 685 | cerr<<"Fluxbox Warning! Could not find screen to map window on!"<<endl; |
686 | } | 686 | } |
687 | // handled in FluxboxWindow::handleEvent | 687 | // handled in FluxboxWindow::handleEvent |
688 | if (win) | 688 | |
689 | if (win) | ||
689 | win->mapRequestEvent(e->xmaprequest); | 690 | win->mapRequestEvent(e->xmaprequest); |
690 | |||
691 | } | 691 | } |
692 | break; | 692 | break; |
693 | case MapNotify: { | 693 | case MapNotify: { |