aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-08-24 18:12:54 (GMT)
committerfluxgen <fluxgen>2002-08-24 18:12:54 (GMT)
commit84cd0f3a891f82de691acced030f7de8058ddbbf (patch)
tree700b5bb079aac8470d758a24e67e183d2094365b /src
parent60379c34a9fe793e4cd4cd3c9c6b608f77f016ed (diff)
downloadfluxbox-84cd0f3a891f82de691acced030f7de8058ddbbf.zip
fluxbox-84cd0f3a891f82de691acced030f7de8058ddbbf.tar.bz2
fixed workspace creation bug and reassociation bug, thanks Simon Bowden
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 837024a..39b15b8 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.63 2002/08/16 11:01:09 fluxgen Exp $ 25// $Id: Screen.cc,v 1.64 2002/08/24 18:12:54 fluxgen Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -744,6 +744,7 @@ FluxboxWindow *BScreen::getIcon(unsigned int index) {
744int BScreen::addWorkspace() { 744int BScreen::addWorkspace() {
745 Workspace *wkspc = new Workspace(this, workspacesList.size()); 745 Workspace *wkspc = new Workspace(this, workspacesList.size());
746 workspacesList.push_back(wkspc); 746 workspacesList.push_back(wkspc);
747 addWorkspaceName(wkspc->name().c_str()); // update names
747 //add workspace to workspacemenu 748 //add workspace to workspacemenu
748 workspacemenu->insert(wkspc->name().c_str(), wkspc->menu(), 749 workspacemenu->insert(wkspc->name().c_str(), wkspc->menu(),
749 wkspc->workspaceID() + 2); //+2 so we add it after "remove last" 750 wkspc->workspaceID() + 2); //+2 so we add it after "remove last"
@@ -1094,7 +1095,7 @@ string BScreen::getNameOfWorkspace(unsigned int workspace) const {
1094void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) { 1095void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) {
1095 if (! w) return; 1096 if (! w) return;
1096 1097
1097 if (wkspc_id >= workspaceNames.size()) 1098 if (wkspc_id >= getCount())
1098 wkspc_id = current_workspace->workspaceID(); 1099 wkspc_id = current_workspace->workspaceID();
1099 1100
1100 if (w->getWorkspaceNumber() == wkspc_id) 1101 if (w->getWorkspaceNumber() == wkspc_id)