diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CommandDialog.cc | 5 | ||||
-rw-r--r-- | src/CurrentWindowCmd.cc | 11 | ||||
-rw-r--r-- | src/Screen.cc | 15 | ||||
-rw-r--r-- | src/WorkspaceCmd.cc | 8 |
4 files changed, 14 insertions, 25 deletions
diff --git a/src/CommandDialog.cc b/src/CommandDialog.cc index aeb9900..f28d789 100644 --- a/src/CommandDialog.cc +++ b/src/CommandDialog.cc | |||
@@ -90,9 +90,8 @@ void CommandDialog::hide() { | |||
90 | FbTk::FbWindow::hide(); | 90 | FbTk::FbWindow::hide(); |
91 | 91 | ||
92 | // return focus to fluxbox window | 92 | // return focus to fluxbox window |
93 | if (FocusControl::focusedWindow() && | 93 | if (FocusControl::focusedFbWindow()) |
94 | FocusControl::focusedWindow()->fbwindow()) | 94 | FocusControl::focusedFbWindow()->setInputFocus(); |
95 | FocusControl::focusedWindow()->fbwindow()->setInputFocus(); | ||
96 | 95 | ||
97 | } | 96 | } |
98 | 97 | ||
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc index de50c60..dc27056 100644 --- a/src/CurrentWindowCmd.cc +++ b/src/CurrentWindowCmd.cc | |||
@@ -34,9 +34,9 @@ | |||
34 | CurrentWindowCmd::CurrentWindowCmd(Action act):m_action(act) { } | 34 | CurrentWindowCmd::CurrentWindowCmd(Action act):m_action(act) { } |
35 | 35 | ||
36 | void CurrentWindowCmd::execute() { | 36 | void CurrentWindowCmd::execute() { |
37 | WinClient *client = FocusControl::focusedWindow(); | 37 | FluxboxWindow *win = FocusControl::focusedFbWindow(); |
38 | if (client && client->fbwindow()) | 38 | if (win) |
39 | (client->fbwindow()->*m_action)(); | 39 | (win->*m_action)(); |
40 | } | 40 | } |
41 | 41 | ||
42 | 42 | ||
@@ -97,8 +97,7 @@ void GoToTabCmd::real_execute() { | |||
97 | } | 97 | } |
98 | 98 | ||
99 | void WindowHelperCmd::execute() { | 99 | void WindowHelperCmd::execute() { |
100 | WinClient *client = FocusControl::focusedWindow(); | 100 | if (FocusControl::focusedFbWindow()) // guarantee that fbwindow() exists too |
101 | if (client && client->fbwindow()) // guarantee that fbwindow() exists too | ||
102 | real_execute(); | 101 | real_execute(); |
103 | } | 102 | } |
104 | 103 | ||
@@ -109,7 +108,7 @@ WinClient &WindowHelperCmd::winclient() { | |||
109 | 108 | ||
110 | FluxboxWindow &WindowHelperCmd::fbwindow() { | 109 | FluxboxWindow &WindowHelperCmd::fbwindow() { |
111 | // will exist from execute above | 110 | // will exist from execute above |
112 | return *FocusControl::focusedWindow()->fbwindow(); | 111 | return *FocusControl::focusedFbWindow(); |
113 | } | 112 | } |
114 | 113 | ||
115 | MoveCmd::MoveCmd(const int step_size_x, const int step_size_y) : | 114 | MoveCmd::MoveCmd(const int step_size_x, const int step_size_y) : |
diff --git a/src/Screen.cc b/src/Screen.cc index a827f92..c54338d 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -1057,11 +1057,8 @@ void BScreen::changeWorkspaceID(unsigned int id) { | |||
1057 | 1057 | ||
1058 | FbTk::App::instance()->sync(false); | 1058 | FbTk::App::instance()->sync(false); |
1059 | 1059 | ||
1060 | WinClient *focused_client = FocusControl::focusedWindow(); | 1060 | FluxboxWindow *focused = FocusControl::focusedFbWindow(); |
1061 | FluxboxWindow *focused = 0; | 1061 | |
1062 | if (focused_client) | ||
1063 | focused = focused_client->fbwindow(); | ||
1064 | |||
1065 | if (focused && focused->isMoving()) { | 1062 | if (focused && focused->isMoving()) { |
1066 | if (doOpaqueMove()) | 1063 | if (doOpaqueMove()) |
1067 | reassociateWindow(focused, id, true); | 1064 | reassociateWindow(focused, id, true); |
@@ -1113,12 +1110,8 @@ void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS | |||
1113 | if (! m_current_workspace || id >= m_workspaces_list.size()) | 1110 | if (! m_current_workspace || id >= m_workspaces_list.size()) |
1114 | return; | 1111 | return; |
1115 | 1112 | ||
1116 | if (!win) { | 1113 | if (!win) |
1117 | WinClient *client = FocusControl::focusedWindow(); | 1114 | win = FocusControl::focusedFbWindow(); |
1118 | if (client) | ||
1119 | win = client->fbwindow(); | ||
1120 | } | ||
1121 | |||
1122 | 1115 | ||
1123 | FbTk::App::instance()->sync(false); | 1116 | FbTk::App::instance()->sync(false); |
1124 | 1117 | ||
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc index c3dd402..5b5b607 100644 --- a/src/WorkspaceCmd.cc +++ b/src/WorkspaceCmd.cc | |||
@@ -91,11 +91,9 @@ void DirFocusCmd::execute() { | |||
91 | if (screen == 0) | 91 | if (screen == 0) |
92 | return; | 92 | return; |
93 | 93 | ||
94 | WinClient *client = FocusControl::focusedWindow(); | 94 | FluxboxWindow *win = FocusControl::focusedFbWindow(); |
95 | if (client == 0 || client->fbwindow() == 0) | 95 | if (win) |
96 | return; | 96 | screen->focusControl().dirFocus(*win, m_dir); |
97 | |||
98 | screen->focusControl().dirFocus(*client->fbwindow(), m_dir); | ||
99 | } | 97 | } |
100 | 98 | ||
101 | void NextWorkspaceCmd::execute() { | 99 | void NextWorkspaceCmd::execute() { |