aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-04-09 23:20:40 (GMT)
committerfluxgen <fluxgen>2002-04-09 23:20:40 (GMT)
commit46e9b6e5462af0a05808c4d636526c04067a3623 (patch)
treebfd9ac1028247c732af84291e56a20391d8641ac /src/Screen.cc
parentbd7951bcdad7e1c4dd6b5ff267cb85fc8cbf6d7e (diff)
downloadfluxbox_pavel-46e9b6e5462af0a05808c4d636526c04067a3623.zip
fluxbox_pavel-46e9b6e5462af0a05808c4d636526c04067a3623.tar.bz2
update from Workspace changes
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 79d627e..8cade50 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.44 2002/04/08 22:26:25 fluxgen Exp $ 25// $Id: Screen.cc,v 1.45 2002/04/09 23:15:21 fluxgen Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -371,12 +371,12 @@ resource(rm, screenname, altscreenname)
371 for (int i = 0; i < *resource.workspaces; ++i) { 371 for (int i = 0; i < *resource.workspaces; ++i) {
372 wkspc = new Workspace(this, workspacesList.size()); 372 wkspc = new Workspace(this, workspacesList.size());
373 workspacesList.push_back(wkspc); 373 workspacesList.push_back(wkspc);
374 workspacemenu->insert(wkspc->getName(), wkspc->getMenu()); 374 workspacemenu->insert(wkspc->name().c_str(), wkspc->menu());
375 } 375 }
376 } else { 376 } else {
377 wkspc = new Workspace(this, workspacesList.size()); 377 wkspc = new Workspace(this, workspacesList.size());
378 workspacesList.push_back(wkspc); 378 workspacesList.push_back(wkspc);
379 workspacemenu->insert(wkspc->getName(), wkspc->getMenu()); 379 workspacemenu->insert(wkspc->name().c_str(), wkspc->menu());
380 } 380 }
381 381
382 workspacemenu->insert(i18n-> 382 workspacemenu->insert(i18n->
@@ -720,8 +720,8 @@ int BScreen::addWorkspace(void) {
720 Workspace *wkspc = new Workspace(this, workspacesList.size()); 720 Workspace *wkspc = new Workspace(this, workspacesList.size());
721 workspacesList.push_back(wkspc); 721 workspacesList.push_back(wkspc);
722 //add workspace to workspacemenu 722 //add workspace to workspacemenu
723 workspacemenu->insert(wkspc->getName(), wkspc->getMenu(), 723 workspacemenu->insert(wkspc->name().c_str(), wkspc->menu(),
724 wkspc->getWorkspaceID() + 2); //+2 so we add it after "remove last" 724 wkspc->workspaceID() + 2); //+2 so we add it after "remove last"
725 725
726 workspacemenu->update(); 726 workspacemenu->update();
727 saveWorkspaces(workspacesList.size()); 727 saveWorkspaces(workspacesList.size());
@@ -739,12 +739,12 @@ int BScreen::removeLastWorkspace(void) {
739 if (workspacesList.size() > 1) { 739 if (workspacesList.size() > 1) {
740 Workspace *wkspc = workspacesList.back(); 740 Workspace *wkspc = workspacesList.back();
741 741
742 if (current_workspace->getWorkspaceID() == wkspc->getWorkspaceID()) 742 if (current_workspace->workspaceID() == wkspc->workspaceID())
743 changeWorkspaceID(current_workspace->getWorkspaceID() - 1); 743 changeWorkspaceID(current_workspace->workspaceID() - 1);
744 744
745 wkspc->removeAll(); 745 wkspc->removeAll();
746 746
747 workspacemenu->remove(wkspc->getWorkspaceID()+2); // + 2 is where workspaces starts 747 workspacemenu->remove(wkspc->workspaceID()+2); // + 2 is where workspaces starts
748 workspacemenu->update(); 748 workspacemenu->update();
749 749
750 //remove last workspace 750 //remove last workspace
@@ -766,12 +766,12 @@ void BScreen::changeWorkspaceID(unsigned int id) {
766 if (! current_workspace || id >= workspacesList.size()) 766 if (! current_workspace || id >= workspacesList.size())
767 return; 767 return;
768 768
769 if (id != current_workspace->getWorkspaceID()) { 769 if (id != current_workspace->workspaceID()) {
770 XSync(fluxbox->getXDisplay(), true); 770 XSync(fluxbox->getXDisplay(), true);
771 771
772 current_workspace->hideAll(); 772 current_workspace->hideAll();
773 773
774 workspacemenu->setItemSelected(current_workspace->getWorkspaceID() + 2, false); 774 workspacemenu->setItemSelected(current_workspace->workspaceID() + 2, false);
775 775
776 if (fluxbox->getFocusedWindow() && 776 if (fluxbox->getFocusedWindow() &&
777 fluxbox->getFocusedWindow()->getScreen() == this && 777 fluxbox->getFocusedWindow()->getScreen() == this &&
@@ -784,7 +784,7 @@ void BScreen::changeWorkspaceID(unsigned int id) {
784 784
785 current_workspace = getWorkspace(id); 785 current_workspace = getWorkspace(id);
786 786
787 workspacemenu->setItemSelected(current_workspace->getWorkspaceID() + 2, true); 787 workspacemenu->setItemSelected(current_workspace->workspaceID() + 2, true);
788 toolbar->redrawWorkspaceLabel(true); 788 toolbar->redrawWorkspaceLabel(true);
789 789
790 current_workspace->showAll(); 790 current_workspace->showAll();
@@ -803,7 +803,7 @@ void BScreen::sendToWorkspace(unsigned int id, bool changeWS) {
803 if (! current_workspace || id >= workspacesList.size()) 803 if (! current_workspace || id >= workspacesList.size())
804 return; 804 return;
805 805
806 if (id != current_workspace->getWorkspaceID()) { 806 if (id != current_workspace->workspaceID()) {
807 XSync(fluxbox->getXDisplay(), True); 807 XSync(fluxbox->getXDisplay(), True);
808 808
809 win = fluxbox->getFocusedWindow(); 809 win = fluxbox->getFocusedWindow();
@@ -840,12 +840,12 @@ void BScreen::addNetizen(Netizen *n) {
840 for (; it != it_end; ++it) { 840 for (; it != it_end; ++it) {
841 for (int i = 0; i < (*it)->getCount(); ++i) { 841 for (int i = 0; i < (*it)->getCount(); ++i) {
842 n->sendWindowAdd((*it)->getWindow(i)->getClientWindow(), 842 n->sendWindowAdd((*it)->getWindow(i)->getClientWindow(),
843 (*it)->getWorkspaceID()); 843 (*it)->workspaceID());
844 } 844 }
845 } 845 }
846 846
847 Window f = ((fluxbox->getFocusedWindow()) ? 847 Window f = ((fluxbox->getFocusedWindow()) ?
848 fluxbox->getFocusedWindow()->getClientWindow() : None); 848 fluxbox->getFocusedWindow()->getClientWindow() : None);
849 n->sendWindowFocus(f); 849 n->sendWindowFocus(f);
850} 850}
851 851
@@ -990,7 +990,7 @@ void BScreen::raiseWindows(Window *workspace_stack, int num) {
990 Workspaces::iterator wit = workspacesList.begin(); 990 Workspaces::iterator wit = workspacesList.begin();
991 Workspaces::iterator wit_end = workspacesList.end(); 991 Workspaces::iterator wit_end = workspacesList.end();
992 for (; wit != wit_end; ++wit) { 992 for (; wit != wit_end; ++wit) {
993 session_stack[i++] = (*wit)->getMenu()->windowID(); 993 session_stack[i++] = (*wit)->menu()->windowID();
994 } 994 }
995 995
996 session_stack[i++] = workspacemenu->windowID(); 996 session_stack[i++] = workspacemenu->windowID();
@@ -1074,7 +1074,7 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ig
1074 if (! w) return; 1074 if (! w) return;
1075 1075
1076 if (wkspc_id >= workspaceNames.size()) 1076 if (wkspc_id >= workspaceNames.size())
1077 wkspc_id = current_workspace->getWorkspaceID(); 1077 wkspc_id = current_workspace->workspaceID();
1078 1078
1079 if (w->getWorkspaceNumber() == wkspc_id) 1079 if (w->getWorkspaceNumber() == wkspc_id)
1080 return; 1080 return;