aboutsummaryrefslogtreecommitdiff
path: root/src/Ewmh.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2005-07-04 18:19:53 (GMT)
committerfluxgen <fluxgen>2005-07-04 18:19:53 (GMT)
commit63475f77965c0dce84a4130b90573aeb9c0a3692 (patch)
tree8ccb9460afb78bcbc68759d88471e091447eddba /src/Ewmh.cc
parent3626faea73a7e033e14ec2d06bdcb2b180d06172 (diff)
downloadfluxbox-63475f77965c0dce84a4130b90573aeb9c0a3692.zip
fluxbox-63475f77965c0dce84a4130b90573aeb9c0a3692.tar.bz2
cleaning, change getCount to numberOfWorkspaces
Diffstat (limited to 'src/Ewmh.cc')
-rw-r--r--src/Ewmh.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index 7996828..052629d 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -288,8 +288,8 @@ void Ewmh::updateClientList(BScreen &screen) {
288 288
289 } 289 }
290 // and count icons 290 // and count icons
291 BScreen::Icons::const_iterator icon_it = screen.getIconList().begin(); 291 BScreen::Icons::const_iterator icon_it = screen.iconList().begin();
292 BScreen::Icons::const_iterator icon_it_end = screen.getIconList().end(); 292 BScreen::Icons::const_iterator icon_it_end = screen.iconList().end();
293 for (; icon_it != icon_it_end; ++icon_it) { 293 for (; icon_it != icon_it_end; ++icon_it) {
294 num += (*icon_it)->numClients(); 294 num += (*icon_it)->numClients();
295 } 295 }
@@ -327,7 +327,7 @@ void Ewmh::updateClientList(BScreen &screen) {
327 } 327 }
328 328
329 // plus iconified windows 329 // plus iconified windows
330 icon_it = screen.getIconList().begin(); 330 icon_it = screen.iconList().begin();
331 for (; icon_it != icon_it_end; ++icon_it) { 331 for (; icon_it != icon_it_end; ++icon_it) {
332 FluxboxWindow::ClientList::iterator client_it = (*icon_it)->clientList().begin(); 332 FluxboxWindow::ClientList::iterator client_it = (*icon_it)->clientList().begin();
333 FluxboxWindow::ClientList::iterator client_it_end = (*icon_it)->clientList().end(); 333 FluxboxWindow::ClientList::iterator client_it_end = (*icon_it)->clientList().end();
@@ -437,7 +437,7 @@ void Ewmh::updateWorkspaceCount(BScreen &screen) {
437 * Window Manager to indicate the number of virtual 437 * Window Manager to indicate the number of virtual
438 * desktops. 438 * desktops.
439 */ 439 */
440 unsigned long numworkspaces = screen.getCount(); 440 unsigned long numworkspaces = screen.numberOfWorkspaces();
441 screen.rootWindow().changeProperty(m_net_number_of_desktops, 441 screen.rootWindow().changeProperty(m_net_number_of_desktops,
442 XA_CARDINAL, 32, 442 XA_CARDINAL, 32,
443 PropModeReplace, 443 PropModeReplace,
@@ -502,8 +502,8 @@ void Ewmh::updateWorkarea(BScreen &screen) {
502 * Not sure how to handle xinerama stuff here. 502 * Not sure how to handle xinerama stuff here.
503 * So i'm just doing this on the first head. 503 * So i'm just doing this on the first head.
504 */ 504 */
505 unsigned long *coords = new unsigned long[4*screen.getCount()]; 505 unsigned long *coords = new unsigned long[4*screen.numberOfWorkspaces()];
506 for (unsigned int i=0; i<screen.getCount()*4; i+=4) { 506 for (unsigned int i=0; i < screen.numberOfWorkspaces()*4; i+=4) {
507 // x, y 507 // x, y
508 coords[i] = screen.maxLeft(0); 508 coords[i] = screen.maxLeft(0);
509 coords[i + 1] = screen.maxTop(0); 509 coords[i + 1] = screen.maxTop(0);
@@ -516,7 +516,7 @@ void Ewmh::updateWorkarea(BScreen &screen) {
516 XA_CARDINAL, 32, 516 XA_CARDINAL, 32,
517 PropModeReplace, 517 PropModeReplace,
518 (unsigned char *)coords, 518 (unsigned char *)coords,
519 4*screen.getCount()); 519 4 * screen.numberOfWorkspaces());
520 520
521 delete[] coords; 521 delete[] coords;
522} 522}
@@ -638,7 +638,7 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce,
638 // which doesn't apply here (so borrow the variable :) ) 638 // which doesn't apply here (so borrow the variable :) )
639 screen = &fbwin->screen(); 639 screen = &fbwin->screen();
640 // valid workspace number? 640 // valid workspace number?
641 if (static_cast<unsigned int>(ce.data.l[0]) < screen->getCount()) 641 if (static_cast<unsigned int>(ce.data.l[0]) < screen->numberOfWorkspaces())
642 screen->sendToWorkspace(ce.data.l[0], fbwin, false); 642 screen->sendToWorkspace(ce.data.l[0], fbwin, false);
643 643
644 return true; 644 return true;
@@ -668,20 +668,20 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce,
668 668
669 // no need to alter number of desktops if they are the same 669 // no need to alter number of desktops if they are the same
670 // or if requested number of workspace is less than zero 670 // or if requested number of workspace is less than zero
671 if (screen->getCount() == static_cast<unsigned int>(ce.data.l[0]) || 671 if (screen->numberOfWorkspaces() == static_cast<unsigned int>(ce.data.l[0]) ||
672 ce.data.l[0] < 0) 672 ce.data.l[0] < 0)
673 return true; 673 return true;
674 674
675 if (screen->getCount() > static_cast<unsigned int>(ce.data.l[0])) { 675 if (screen->numberOfWorkspaces() > static_cast<unsigned int>(ce.data.l[0])) {
676 // remove last workspace until we have 676 // remove last workspace until we have
677 // the same number of workspaces 677 // the same number of workspaces
678 while (screen->getCount() != static_cast<unsigned int>(ce.data.l[0])) { 678 while (screen->numberOfWorkspaces() != static_cast<unsigned int>(ce.data.l[0])) {
679 screen->removeLastWorkspace(); 679 screen->removeLastWorkspace();
680 if (screen->getCount() == 1) // must have at least one workspace 680 if (screen->numberOfWorkspaces() == 1) // must have at least one workspace
681 break; 681 break;
682 } 682 }
683 } else { // add workspaces to screen until workspace count match the requested size 683 } else { // add workspaces to screen until workspace count match the requested size
684 while (screen->getCount() != static_cast<unsigned int>(ce.data.l[0])) { 684 while (screen->numberOfWorkspaces() != static_cast<unsigned int>(ce.data.l[0])) {
685 screen->addWorkspace(); 685 screen->addWorkspace();
686 } 686 }
687 } 687 }
@@ -693,7 +693,7 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce,
693 // ce.data.l[0] = workspace number 693 // ce.data.l[0] = workspace number
694 694
695 // prevent out of range value 695 // prevent out of range value
696 if (static_cast<unsigned int>(ce.data.l[0]) >= screen->getCount()) 696 if (static_cast<unsigned int>(ce.data.l[0]) >= screen->numberOfWorkspaces())
697 return true; 697 return true;
698 screen->changeWorkspaceID(ce.data.l[0]); 698 screen->changeWorkspaceID(ce.data.l[0]);
699 return true; 699 return true;