From c929da4054f9fa7458bce2f4b46787e5484af850 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 12 Jul 2006 00:08:57 +0000 Subject: replacing some instances of focusedWindow()->fbwindow() with focusedFbWindow() --- src/CommandDialog.cc | 5 ++--- src/CurrentWindowCmd.cc | 11 +++++------ src/Screen.cc | 15 ++++----------- 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() { FbTk::FbWindow::hide(); // return focus to fluxbox window - if (FocusControl::focusedWindow() && - FocusControl::focusedWindow()->fbwindow()) - FocusControl::focusedWindow()->fbwindow()->setInputFocus(); + if (FocusControl::focusedFbWindow()) + FocusControl::focusedFbWindow()->setInputFocus(); } 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 @@ CurrentWindowCmd::CurrentWindowCmd(Action act):m_action(act) { } void CurrentWindowCmd::execute() { - WinClient *client = FocusControl::focusedWindow(); - if (client && client->fbwindow()) - (client->fbwindow()->*m_action)(); + FluxboxWindow *win = FocusControl::focusedFbWindow(); + if (win) + (win->*m_action)(); } @@ -97,8 +97,7 @@ void GoToTabCmd::real_execute() { } void WindowHelperCmd::execute() { - WinClient *client = FocusControl::focusedWindow(); - if (client && client->fbwindow()) // guarantee that fbwindow() exists too + if (FocusControl::focusedFbWindow()) // guarantee that fbwindow() exists too real_execute(); } @@ -109,7 +108,7 @@ WinClient &WindowHelperCmd::winclient() { FluxboxWindow &WindowHelperCmd::fbwindow() { // will exist from execute above - return *FocusControl::focusedWindow()->fbwindow(); + return *FocusControl::focusedFbWindow(); } 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) { FbTk::App::instance()->sync(false); - WinClient *focused_client = FocusControl::focusedWindow(); - FluxboxWindow *focused = 0; - if (focused_client) - focused = focused_client->fbwindow(); - + FluxboxWindow *focused = FocusControl::focusedFbWindow(); + if (focused && focused->isMoving()) { if (doOpaqueMove()) reassociateWindow(focused, id, true); @@ -1113,12 +1110,8 @@ void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS if (! m_current_workspace || id >= m_workspaces_list.size()) return; - if (!win) { - WinClient *client = FocusControl::focusedWindow(); - if (client) - win = client->fbwindow(); - } - + if (!win) + win = FocusControl::focusedFbWindow(); FbTk::App::instance()->sync(false); 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() { if (screen == 0) return; - WinClient *client = FocusControl::focusedWindow(); - if (client == 0 || client->fbwindow() == 0) - return; - - screen->focusControl().dirFocus(*client->fbwindow(), m_dir); + FluxboxWindow *win = FocusControl::focusedFbWindow(); + if (win) + screen->focusControl().dirFocus(*win, m_dir); } void NextWorkspaceCmd::execute() { -- cgit v0.11.2