aboutsummaryrefslogtreecommitdiff
path: root/src/WorkspaceCmd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/WorkspaceCmd.cc')
-rw-r--r--src/WorkspaceCmd.cc31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc
index f92418f..93ea830 100644
--- a/src/WorkspaceCmd.cc
+++ b/src/WorkspaceCmd.cc
@@ -54,19 +54,40 @@ void PrevWindowCmd::execute() {
54} 54}
55 55
56void TypeAheadFocusCmd::execute() { 56void TypeAheadFocusCmd::execute() {
57 Fluxbox *fb = Fluxbox::instance(); 57 BScreen *screen = Fluxbox::instance()->keyScreen();
58 BScreen *screen = fb->keyScreen();
59 if (screen != 0) { 58 if (screen != 0) {
60 int options = m_option; 59 FocusControl::Focusables *win_list = 0;
61 FocusControl::FocusedWindows *win_list = 60 if (m_option & FocusControl::CYCLEGROUPS) {
62 (options & FocusControl::CYCLELINEAR) ? 61 win_list = (m_option & FocusControl::CYCLELINEAR) ?
62 &screen->focusControl().creationOrderWinList() :
63 &screen->focusControl().focusedOrderWinList();
64 } else {
65 win_list = (m_option & FocusControl::CYCLELINEAR) ?
63 &screen->focusControl().creationOrderList() : 66 &screen->focusControl().creationOrderList() :
64 &screen->focusControl().focusedOrderList(); 67 &screen->focusControl().focusedOrderList();
68 }
65 69
66 screen->startTypeAheadFocus(*win_list, m_option); 70 screen->startTypeAheadFocus(*win_list, m_option);
67 } 71 }
68} 72}
69 73
74void GoToWindowCmd::execute() {
75 BScreen *screen = Fluxbox::instance()->keyScreen();
76 if (screen != 0) {
77 FocusControl::Focusables *win_list = 0;
78 if (m_option & FocusControl::CYCLEGROUPS) {
79 win_list = (m_option & FocusControl::CYCLELINEAR) ?
80 &screen->focusControl().creationOrderWinList() :
81 &screen->focusControl().focusedOrderWinList();
82 } else {
83 win_list = (m_option & FocusControl::CYCLELINEAR) ?
84 &screen->focusControl().creationOrderList() :
85 &screen->focusControl().focusedOrderList();
86 }
87 screen->focusControl().goToWindowNumber(win_list, m_num, m_option);
88 }
89}
90
70void DirFocusCmd::execute() { 91void DirFocusCmd::execute() {
71 BScreen *screen = Fluxbox::instance()->keyScreen(); 92 BScreen *screen = Fluxbox::instance()->keyScreen();
72 if (screen == 0) 93 if (screen == 0)