aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc33
1 files changed, 30 insertions, 3 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 8e5e830..8712fa3 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.138 2003/04/26 18:27:01 fluxgen Exp $ 25// $Id: Screen.cc,v 1.139 2003/04/27 14:36:03 rathnor Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -500,6 +500,7 @@ BScreen::BScreen(ResourceManager &rm,
500 m_currentworkspace_sig(*this), // current workspace signal 500 m_currentworkspace_sig(*this), // current workspace signal
501 m_layermanager(num_layers), 501 m_layermanager(num_layers),
502 cycling_focus(false), 502 cycling_focus(false),
503 cycling_last(0),
503 m_windowtheme(new FbWinFrameTheme(scrn)), 504 m_windowtheme(new FbWinFrameTheme(scrn)),
504 m_menutheme(new FbTk::MenuTheme(scrn)), 505 m_menutheme(new FbTk::MenuTheme(scrn)),
505 resource(rm, screenname, altscreenname), 506 resource(rm, screenname, altscreenname),
@@ -1474,6 +1475,7 @@ void BScreen::nextFocus(int opts) {
1474 if (!cycling_focus) { 1475 if (!cycling_focus) {
1475 cycling_focus = True; 1476 cycling_focus = True;
1476 cycling_window = focused_list.begin(); 1477 cycling_window = focused_list.begin();
1478 cycling_last = 0;
1477 } else { 1479 } else {
1478 // already cycling, so restack to put windows back in their proper order 1480 // already cycling, so restack to put windows back in their proper order
1479 m_layermanager.restack(); 1481 m_layermanager.restack();
@@ -1498,7 +1500,18 @@ void BScreen::nextFocus(int opts) {
1498 (fbwin->isStuck() 1500 (fbwin->isStuck()
1499 || fbwin->getWorkspaceNumber() == getCurrentWorkspaceID())) { 1501 || fbwin->getWorkspaceNumber() == getCurrentWorkspaceID())) {
1500 // either on this workspace, or stuck 1502 // either on this workspace, or stuck
1501 if (! (doSkipWindow(fbwin, opts) || !fbwin->setInputFocus()) ) { 1503
1504 // keep track of the originally selected window in a set
1505 WinClient &last_client = fbwin->winClient();
1506
1507 if (! (doSkipWindow(fbwin, opts) || !fbwin->setCurrentClient(**it)) ) {
1508 // moved onto a new fbwin
1509 if (!cycling_last || cycling_last->fbwindow() != fbwin) {
1510 if (cycling_last)
1511 // set back to orig current Client in that fbwin
1512 cycling_last->fbwindow()->setCurrentClient(*cycling_last, false);
1513 cycling_last = &last_client;
1514 }
1502 fbwin->tempRaise(); 1515 fbwin->tempRaise();
1503 break; 1516 break;
1504 } 1517 }
@@ -1552,6 +1565,7 @@ void BScreen::prevFocus(int opts) {
1552 if (!cycling_focus) { 1565 if (!cycling_focus) {
1553 cycling_focus = True; 1566 cycling_focus = True;
1554 cycling_window = focused_list.end(); 1567 cycling_window = focused_list.end();
1568 cycling_last = 0;
1555 } else { 1569 } else {
1556 // already cycling, so restack to put windows back in their proper order 1570 // already cycling, so restack to put windows back in their proper order
1557 m_layermanager.restack(); 1571 m_layermanager.restack();
@@ -1577,7 +1591,19 @@ void BScreen::prevFocus(int opts) {
1577 (fbwin->isStuck() 1591 (fbwin->isStuck()
1578 || fbwin->getWorkspaceNumber() == getCurrentWorkspaceID())) { 1592 || fbwin->getWorkspaceNumber() == getCurrentWorkspaceID())) {
1579 // either on this workspace, or stuck 1593 // either on this workspace, or stuck
1580 if (! (doSkipWindow(fbwin, opts) || !fbwin->setInputFocus()) ) { 1594
1595 // keep track of the originally selected window in a set
1596 WinClient &last_client = fbwin->winClient();
1597
1598
1599 if (! (doSkipWindow(fbwin, opts) || !fbwin->setCurrentClient(**it)) ) {
1600 // moved onto a new fbwin
1601 if (!cycling_last || cycling_last->fbwindow() != fbwin) {
1602 if (cycling_last)
1603 // set back to orig current Client in that fbwin
1604 cycling_last->fbwindow()->setCurrentClient(*cycling_last, false);
1605 cycling_last = &last_client;
1606 }
1581 fbwin->tempRaise(); 1607 fbwin->tempRaise();
1582 break; 1608 break;
1583 } 1609 }
@@ -2389,6 +2415,7 @@ bool BScreen::doSkipWindow(const FluxboxWindow *w, int opts) {
2389void BScreen::notifyReleasedKeys(XKeyEvent &ke) { 2415void BScreen::notifyReleasedKeys(XKeyEvent &ke) {
2390 if (cycling_focus) { 2416 if (cycling_focus) {
2391 cycling_focus = false; 2417 cycling_focus = false;
2418 cycling_last = 0;
2392 // put currently focused window to top 2419 // put currently focused window to top
2393 WinClient *client = *cycling_window; 2420 WinClient *client = *cycling_window;
2394 focused_list.erase(cycling_window); 2421 focused_list.erase(cycling_window);