diff options
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 4fb6576..8c01402 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.269 2004/03/18 14:45:56 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.270 2004/03/21 09:00:24 rathnor Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -937,7 +937,7 @@ void BScreen::removeWindow(FluxboxWindow *win) { | |||
937 | if (win->isIconic()) | 937 | if (win->isIconic()) |
938 | removeIcon(win); | 938 | removeIcon(win); |
939 | else | 939 | else |
940 | getWorkspace(win->workspaceNumber())->removeWindow(win); | 940 | getWorkspace(win->workspaceNumber())->removeWindow(win, false); |
941 | } | 941 | } |
942 | 942 | ||
943 | 943 | ||
@@ -951,13 +951,6 @@ void BScreen::removeClient(WinClient &client) { | |||
951 | focused_list.remove(&client); | 951 | focused_list.remove(&client); |
952 | if (cyc == &client) { | 952 | if (cyc == &client) { |
953 | cycling_window = focused_list.end(); | 953 | cycling_window = focused_list.end(); |
954 | } else if (focused == &client) { | ||
955 | // if we are focused, then give our focus to our transient parent | ||
956 | // or revert normally | ||
957 | if (client.transientFor() && client.transientFor()->fbwindow()) | ||
958 | client.transientFor()->fbwindow()->setInputFocus(); | ||
959 | else | ||
960 | Fluxbox::instance()->revertFocus(focused->screen()); | ||
961 | } | 954 | } |
962 | 955 | ||
963 | if (cycling_last == &client) | 956 | if (cycling_last == &client) |
@@ -1471,7 +1464,7 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, | |||
1471 | // gets updated | 1464 | // gets updated |
1472 | m_clientlist_sig.notify(); | 1465 | m_clientlist_sig.notify(); |
1473 | } else if (ignore_sticky || ! w->isStuck()) { | 1466 | } else if (ignore_sticky || ! w->isStuck()) { |
1474 | getWorkspace(w->workspaceNumber())->removeWindow(w); | 1467 | getWorkspace(w->workspaceNumber())->removeWindow(w, true); |
1475 | getWorkspace(wkspc_id)->addWindow(*w); | 1468 | getWorkspace(wkspc_id)->addWindow(*w); |
1476 | // see comment above | 1469 | // see comment above |
1477 | m_clientlist_sig.notify(); | 1470 | m_clientlist_sig.notify(); |
@@ -2544,8 +2537,25 @@ WinClient *BScreen::getLastFocusedWindow(int workspace) { | |||
2544 | return 0; | 2537 | return 0; |
2545 | } | 2538 | } |
2546 | 2539 | ||
2540 | /** | ||
2541 | * Used to find out which window was last active in the given group | ||
2542 | * If ignore_client is given, it excludes that client. | ||
2543 | * Stuck, iconic etc don't matter within a group | ||
2544 | */ | ||
2545 | WinClient *BScreen::getLastFocusedWindow(FluxboxWindow &group, WinClient *ignore_client) { | ||
2546 | if (focused_list.empty()) return 0; | ||
2547 | |||
2548 | FocusedWindows::iterator it = focused_list.begin(); | ||
2549 | FocusedWindows::iterator it_end = focused_list.end(); | ||
2550 | for (; it != it_end; ++it) { | ||
2551 | if (((*it)->fbwindow() == &group) && | ||
2552 | (*it) != ignore_client) | ||
2553 | return *it; | ||
2554 | } | ||
2555 | return 0; | ||
2556 | } | ||
2557 | |||
2547 | void BScreen::updateSize() { | 2558 | void BScreen::updateSize() { |
2548 | cerr<<"update Size"<<endl; | ||
2549 | // force update geometry | 2559 | // force update geometry |
2550 | rootWindow().updateGeometry(); | 2560 | rootWindow().updateGeometry(); |
2551 | 2561 | ||