diff options
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 8676dd7..7bcd938 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -1129,9 +1129,6 @@ void BScreen::removeClient(WinClient &client) { | |||
1129 | 1129 | ||
1130 | focusControl().removeClient(client); | 1130 | focusControl().removeClient(client); |
1131 | 1131 | ||
1132 | for_each(getWorkspacesList().begin(), getWorkspacesList().end(), | ||
1133 | mem_fun(&Workspace::updateClientmenu)); | ||
1134 | |||
1135 | if (client.fbwindow() && client.fbwindow()->isIconic()) | 1132 | if (client.fbwindow() && client.fbwindow()->isIconic()) |
1136 | iconListSig().notify(); | 1133 | iconListSig().notify(); |
1137 | 1134 | ||
@@ -1276,30 +1273,21 @@ void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS | |||
1276 | 1273 | ||
1277 | FbTk::App::instance()->sync(false); | 1274 | FbTk::App::instance()->sync(false); |
1278 | 1275 | ||
1279 | if (win && &win->screen() == this && | 1276 | if (win && &win->screen() == this) { |
1280 | (! win->isStuck())) { | ||
1281 | |||
1282 | // if iconified, deiconify it before we send it somewhere | ||
1283 | if (win->isIconic()) | ||
1284 | win->deiconify(); | ||
1285 | |||
1286 | // if the window isn't on current workspace, hide it | ||
1287 | if (id != currentWorkspace()->workspaceID()) | ||
1288 | win->withdraw(true); | ||
1289 | 1277 | ||
1290 | windowMenu().hide(); | 1278 | windowMenu().hide(); |
1291 | 1279 | ||
1292 | reassociateWindow(win, id, true); | 1280 | reassociateWindow(win, id, true); |
1293 | 1281 | ||
1294 | // if the window is on current workspace, show it. | ||
1295 | if (id == currentWorkspace()->workspaceID()) | ||
1296 | win->deiconify(false, false); | ||
1297 | |||
1298 | // change workspace ? | 1282 | // change workspace ? |
1299 | if (changeWS && id != currentWorkspace()->workspaceID()) { | 1283 | if (changeWS) |
1300 | changeWorkspaceID(id); | 1284 | changeWorkspaceID(id); |
1301 | win->focus(); | 1285 | |
1302 | } | 1286 | // if the window is on current workspace, show it; else hide it. |
1287 | if (id == currentWorkspace()->workspaceID()) | ||
1288 | win->deiconify(false, false); | ||
1289 | else | ||
1290 | win->withdraw(true); | ||
1303 | 1291 | ||
1304 | } | 1292 | } |
1305 | 1293 | ||
@@ -1793,6 +1781,15 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { | |||
1793 | MouseTabFocus, "MouseTabFocus", "Hover over tab to focus windows"), | 1781 | MouseTabFocus, "MouseTabFocus", "Hover over tab to focus windows"), |
1794 | focusControl(), FocusControl::MOUSETABFOCUS, save_and_reconfigure)); | 1782 | focusControl(), FocusControl::MOUSETABFOCUS, save_and_reconfigure)); |
1795 | 1783 | ||
1784 | try { | ||
1785 | focus_menu->insert(new BoolMenuItem(_FB_XTEXT(Configmenu, FocusNew, | ||
1786 | "Focus New Windows", "Focus newly created windows"), | ||
1787 | *m_resource_manager.getResource<bool>(name() + ".focusNewWindows"), | ||
1788 | saverc_cmd)); | ||
1789 | } catch (FbTk::ResourceException e) { | ||
1790 | cerr<<e.what()<<endl; | ||
1791 | } | ||
1792 | |||
1796 | focus_menu->insert(new BoolMenuItem(_FB_XTEXT(Configmenu, | 1793 | focus_menu->insert(new BoolMenuItem(_FB_XTEXT(Configmenu, |
1797 | AutoRaise, | 1794 | AutoRaise, |
1798 | "Auto Raise", | 1795 | "Auto Raise", |
@@ -1897,15 +1894,6 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { | |||
1897 | "Opaque Window Moving", | 1894 | "Opaque Window Moving", |
1898 | "Window Moving with whole window visible (as opposed to outline moving)", | 1895 | "Window Moving with whole window visible (as opposed to outline moving)", |
1899 | *resource.opaque_move, saverc_cmd); | 1896 | *resource.opaque_move, saverc_cmd); |
1900 | try { | ||
1901 | _BOOLITEM(menu, Configmenu, FocusNew, | ||
1902 | "Focus New Windows", "Focus newly created windows", | ||
1903 | *m_resource_manager.getResource<bool>(name() + ".focusNewWindows"), | ||
1904 | saverc_cmd); | ||
1905 | } catch (FbTk::ResourceException e) { | ||
1906 | cerr<<e.what()<<endl; | ||
1907 | } | ||
1908 | |||
1909 | _BOOLITEM(menu, Configmenu, WorkspaceWarping, | 1897 | _BOOLITEM(menu, Configmenu, WorkspaceWarping, |
1910 | "Workspace Warping", | 1898 | "Workspace Warping", |
1911 | "Workspace Warping - dragging windows to the edge and onto the next workspace", | 1899 | "Workspace Warping - dragging windows to the edge and onto the next workspace", |