all repos — fluxbox @ 63475f77965c0dce84a4130b90573aeb9c0a3692

custom fork of the fluxbox windowmanager

cleaning, change getCount to numberOfWorkspaces
fluxgen fluxgen
commit

63475f77965c0dce84a4130b90573aeb9c0a3692

parent

3626faea73a7e033e14ec2d06bdcb2b180d06172

3 files changed, 22 insertions(+), 22 deletions(-)

jump to
M src/Ewmh.ccsrc/Ewmh.cc

@@ -288,8 +288,8 @@ }

} // and count icons - BScreen::Icons::const_iterator icon_it = screen.getIconList().begin(); - BScreen::Icons::const_iterator icon_it_end = screen.getIconList().end(); + BScreen::Icons::const_iterator icon_it = screen.iconList().begin(); + BScreen::Icons::const_iterator icon_it_end = screen.iconList().end(); for (; icon_it != icon_it_end; ++icon_it) { num += (*icon_it)->numClients(); }

@@ -327,7 +327,7 @@ }

} // plus iconified windows - icon_it = screen.getIconList().begin(); + icon_it = screen.iconList().begin(); for (; icon_it != icon_it_end; ++icon_it) { FluxboxWindow::ClientList::iterator client_it = (*icon_it)->clientList().begin(); FluxboxWindow::ClientList::iterator client_it_end = (*icon_it)->clientList().end();

@@ -437,7 +437,7 @@ * This property SHOULD be set and updated by the

* Window Manager to indicate the number of virtual * desktops. */ - unsigned long numworkspaces = screen.getCount(); + unsigned long numworkspaces = screen.numberOfWorkspaces(); screen.rootWindow().changeProperty(m_net_number_of_desktops, XA_CARDINAL, 32, PropModeReplace,

@@ -502,8 +502,8 @@ /* !!TODO

* Not sure how to handle xinerama stuff here. * So i'm just doing this on the first head. */ - unsigned long *coords = new unsigned long[4*screen.getCount()]; - for (unsigned int i=0; i<screen.getCount()*4; i+=4) { + unsigned long *coords = new unsigned long[4*screen.numberOfWorkspaces()]; + for (unsigned int i=0; i < screen.numberOfWorkspaces()*4; i+=4) { // x, y coords[i] = screen.maxLeft(0); coords[i + 1] = screen.maxTop(0);

@@ -516,7 +516,7 @@ screen.rootWindow().changeProperty(m_net_workarea,

XA_CARDINAL, 32, PropModeReplace, (unsigned char *)coords, - 4*screen.getCount()); + 4 * screen.numberOfWorkspaces()); delete[] coords; }

@@ -638,7 +638,7 @@ // the screen is the root window of the message,

// which doesn't apply here (so borrow the variable :) ) screen = &fbwin->screen(); // valid workspace number? - if (static_cast<unsigned int>(ce.data.l[0]) < screen->getCount()) + if (static_cast<unsigned int>(ce.data.l[0]) < screen->numberOfWorkspaces()) screen->sendToWorkspace(ce.data.l[0], fbwin, false); return true;

@@ -668,20 +668,20 @@ // ce.data.l[0] = number of workspaces

// no need to alter number of desktops if they are the same // or if requested number of workspace is less than zero - if (screen->getCount() == static_cast<unsigned int>(ce.data.l[0]) || + if (screen->numberOfWorkspaces() == static_cast<unsigned int>(ce.data.l[0]) || ce.data.l[0] < 0) return true; - if (screen->getCount() > static_cast<unsigned int>(ce.data.l[0])) { + if (screen->numberOfWorkspaces() > static_cast<unsigned int>(ce.data.l[0])) { // remove last workspace until we have // the same number of workspaces - while (screen->getCount() != static_cast<unsigned int>(ce.data.l[0])) { + while (screen->numberOfWorkspaces() != static_cast<unsigned int>(ce.data.l[0])) { screen->removeLastWorkspace(); - if (screen->getCount() == 1) // must have at least one workspace + if (screen->numberOfWorkspaces() == 1) // must have at least one workspace break; } } else { // add workspaces to screen until workspace count match the requested size - while (screen->getCount() != static_cast<unsigned int>(ce.data.l[0])) { + while (screen->numberOfWorkspaces() != static_cast<unsigned int>(ce.data.l[0])) { screen->addWorkspace(); } }

@@ -693,7 +693,7 @@ return true;

// ce.data.l[0] = workspace number // prevent out of range value - if (static_cast<unsigned int>(ce.data.l[0]) >= screen->getCount()) + if (static_cast<unsigned int>(ce.data.l[0]) >= screen->numberOfWorkspaces()) return true; screen->changeWorkspaceID(ce.data.l[0]); return true;
M src/FbCommands.ccsrc/FbCommands.cc

@@ -61,7 +61,7 @@

void showMenu(const BScreen &screen, FbTk::Menu &menu) { // special case for root menu - if (&menu == &screen.getRootmenu()) { + if (&menu == &screen.rootMenu()) { Fluxbox* fb = Fluxbox::instance(); if(fb->menuTimestampsChanged()) { // we dont show the menu here because fluxbox

@@ -221,7 +221,7 @@ BScreen *screen = Fluxbox::instance()->mouseScreen();

if (screen == 0) return; - ::showMenu(*screen, screen->getRootmenu()); + ::showMenu(*screen, screen->rootMenu()); } void ShowWorkspaceMenuCmd::execute() {

@@ -229,7 +229,7 @@ BScreen *screen = Fluxbox::instance()->mouseScreen();

if (screen == 0) return; - ::showMenu(*screen, screen->getWorkspacemenu()); + ::showMenu(*screen, screen->workspaceMenu()); }

@@ -324,8 +324,8 @@ BScreen *screen = Fluxbox::instance()->mouseScreen();

if (screen == 0) return; - BScreen::Icons::reverse_iterator it= screen->getIconList().rbegin(); - BScreen::Icons::reverse_iterator itend= screen->getIconList().rend(); + BScreen::Icons::reverse_iterator it= screen->iconList().rbegin(); + BScreen::Icons::reverse_iterator itend= screen->iconList().rend(); unsigned int workspace_num= screen->currentWorkspaceID(); unsigned int old_workspace_num;
M src/Gnome.ccsrc/Gnome.cc

@@ -234,7 +234,7 @@ updateClientList(screen); // make sure the client list is updated too

} void Gnome::updateWorkspaceCount(BScreen &screen) { - long numworkspaces = screen.getCount(); + long numworkspaces = screen.numberOfWorkspaces(); screen.rootWindow().changeProperty(m_gnome_wm_win_workspace_count, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&numworkspaces, 1); }

@@ -302,12 +302,12 @@ cerr<<__FILE__<<"("<<__LINE__<<"): Got workspace atom="<<ce.data.l[0]<<endl;

#endif//!DEBUG if ( winclient !=0 && // the message sent to client window? ce.data.l[0] >= 0 && - ce.data.l[0] < (signed)winclient->screen().getCount()) { + ce.data.l[0] < (signed)winclient->screen().numberOfWorkspaces()) { winclient->screen().changeWorkspaceID(ce.data.l[0]); } else if (screen!=0 && //the message sent to root window? ce.data.l[0] >= 0 && - ce.data.l[0] < (signed)screen->getCount()) + ce.data.l[0] < (signed)screen->numberOfWorkspaces()) screen->changeWorkspaceID(ce.data.l[0]); return true; } else if (winclient == 0)