aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-06-24 14:57:54 (GMT)
committerfluxgen <fluxgen>2003-06-24 14:57:54 (GMT)
commit4d389149bce961f531a17079bd3fe42e8d938fd0 (patch)
tree23caff252e9a331dccbb038ed0cf718bed3d191f /src/Screen.cc
parent225dc75dd9c85f573c9be95e87f3eb4acadc4ddc (diff)
downloadfluxbox-4d389149bce961f531a17079bd3fe42e8d938fd0.zip
fluxbox-4d389149bce961f531a17079bd3fe42e8d938fd0.tar.bz2
minor cleaning, removed window number
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index c5dbe8e..dd5be04 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.192 2003/06/24 13:56:01 fluxgen Exp $ 25// $Id: Screen.cc,v 1.193 2003/06/24 14:55:55 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -786,8 +786,6 @@ void BScreen::updateWorkspaceNamesAtom() {
786void BScreen::addIcon(FluxboxWindow *w) { 786void BScreen::addIcon(FluxboxWindow *w) {
787 if (! w) return; 787 if (! w) return;
788 788
789 w->setWindowNumber(m_icon_list.size());
790
791 m_icon_list.push_back(w); 789 m_icon_list.push_back(w);
792} 790}
793 791
@@ -803,12 +801,6 @@ void BScreen::removeIcon(FluxboxWindow *w) {
803 if (erase_it != m_icon_list.end()) 801 if (erase_it != m_icon_list.end())
804 m_icon_list.erase(erase_it); 802 m_icon_list.erase(erase_it);
805 803
806
807 Icons::iterator it = m_icon_list.begin();
808 Icons::iterator it_end = m_icon_list.end();
809 for (int i = 0; it != it_end; ++it, ++i) {
810 (*it)->setWindowNumber(i);
811 }
812} 804}
813 805
814void BScreen::removeWindow(FluxboxWindow *win) { 806void BScreen::removeWindow(FluxboxWindow *win) {
@@ -1109,7 +1101,7 @@ void BScreen::updateNetizenWindowLower(Window w) {
1109} 1101}
1110 1102
1111 1103
1112void BScreen::updateNetizenConfigNotify(XEvent *e) { 1104void BScreen::updateNetizenConfigNotify(XEvent &e) {
1113 Netizens::iterator it = m_netizen_list.begin(); 1105 Netizens::iterator it = m_netizen_list.begin();
1114 Netizens::iterator it_end = m_netizen_list.end(); 1106 Netizens::iterator it_end = m_netizen_list.end();
1115 for (; it != it_end; ++it) { 1107 for (; it != it_end; ++it) {
@@ -1121,12 +1113,14 @@ FluxboxWindow *BScreen::createWindow(Window client) {
1121 WinClient *winclient = new WinClient(client, *this); 1113 WinClient *winclient = new WinClient(client, *this);
1122 1114
1123#ifdef SLIT 1115#ifdef SLIT
1116 if (winclient->initial_state == WithdrawnState)
1117 slit()->addClient(client);
1118
1119#endif // SLIT
1124 if (winclient->initial_state == WithdrawnState) { 1120 if (winclient->initial_state == WithdrawnState) {
1125 delete winclient; 1121 delete winclient;
1126 slit()->addClient(client);
1127 return 0; 1122 return 0;
1128 } 1123 }
1129#endif // SLIT
1130 1124
1131 // check if it should be grouped with something else 1125 // check if it should be grouped with something else
1132 FluxboxWindow *win; 1126 FluxboxWindow *win;
@@ -1413,14 +1407,12 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id,
1413 1407
1414void BScreen::nextFocus(int opts) { 1408void BScreen::nextFocus(int opts) {
1415 bool have_focused = false; 1409 bool have_focused = false;
1416 int focused_window_number = -1;
1417 FluxboxWindow *focused = Fluxbox::instance()->getFocusedWindow(); 1410 FluxboxWindow *focused = Fluxbox::instance()->getFocusedWindow();
1418 const int num_windows = currentWorkspace()->numberOfWindows(); 1411 const int num_windows = currentWorkspace()->numberOfWindows();
1419 1412
1420 if (focused != 0) { 1413 if (focused != 0) {
1421 if (focused->screen().screenNumber() == screenNumber()) { 1414 if (focused->screen().screenNumber() == screenNumber()) {
1422 have_focused = true; 1415 have_focused = true;
1423 focused_window_number = focused->windowNumber();
1424 } 1416 }
1425 } 1417 }
1426 1418
@@ -1502,14 +1494,12 @@ void BScreen::nextFocus(int opts) {
1502 1494
1503void BScreen::prevFocus(int opts) { 1495void BScreen::prevFocus(int opts) {
1504 bool have_focused = false; 1496 bool have_focused = false;
1505 int focused_window_number = -1;
1506 FluxboxWindow *focused; 1497 FluxboxWindow *focused;
1507 int num_windows = currentWorkspace()->numberOfWindows(); 1498 int num_windows = currentWorkspace()->numberOfWindows();
1508 1499
1509 if ((focused = Fluxbox::instance()->getFocusedWindow())) { 1500 if ((focused = Fluxbox::instance()->getFocusedWindow())) {
1510 if (focused->screen().screenNumber() == screenNumber()) { 1501 if (focused->screen().screenNumber() == screenNumber()) {
1511 have_focused = true; 1502 have_focused = true;
1512 focused_window_number = focused->windowNumber();
1513 } 1503 }
1514 } 1504 }
1515 1505
@@ -1594,13 +1584,11 @@ void BScreen::prevFocus(int opts) {
1594 1584
1595void BScreen::raiseFocus() { 1585void BScreen::raiseFocus() {
1596 bool have_focused = false; 1586 bool have_focused = false;
1597 int focused_window_number = -1;
1598 Fluxbox * const fb = Fluxbox::instance(); 1587 Fluxbox * const fb = Fluxbox::instance();
1599 1588
1600 if (fb->getFocusedWindow()) 1589 if (fb->getFocusedWindow())
1601 if (fb->getFocusedWindow()->screen().screenNumber() == screenNumber()) { 1590 if (fb->getFocusedWindow()->screen().screenNumber() == screenNumber()) {
1602 have_focused = true; 1591 have_focused = true;
1603 focused_window_number = fb->getFocusedWindow()->windowNumber();
1604 } 1592 }
1605 1593
1606 if ((currentWorkspace()->numberOfWindows() > 1) && have_focused) 1594 if ((currentWorkspace()->numberOfWindows() > 1) && have_focused)