aboutsummaryrefslogtreecommitdiff
path: root/src
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
parent225dc75dd9c85f573c9be95e87f3eb4acadc4ddc (diff)
downloadfluxbox_paul-4d389149bce961f531a17079bd3fe42e8d938fd0.zip
fluxbox_paul-4d389149bce961f531a17079bd3fe42e8d938fd0.tar.bz2
minor cleaning, removed window number
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc24
-rw-r--r--src/Window.cc6
-rw-r--r--src/Window.hh7
-rw-r--r--src/Workspace.cc8
-rw-r--r--src/Workspace.hh2
5 files changed, 15 insertions, 32 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)
diff --git a/src/Window.cc b/src/Window.cc
index be5d81f..c280dc8 100644
--- a/src/Window.cc
+++ b/src/Window.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: Window.cc,v 1.195 2003/06/23 14:16:05 rathnor Exp $ 25// $Id: Window.cc,v 1.196 2003/06/24 14:57:05 fluxgen Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -380,7 +380,7 @@ void FluxboxWindow::init() {
380 // display connection 380 // display connection
381 display = FbTk::App::instance()->display(); 381 display = FbTk::App::instance()->display();
382 382
383 m_blackbox_attrib.workspace = m_workspace_number = m_window_number = -1; 383 m_blackbox_attrib.workspace = m_workspace_number = 0;
384 384
385 m_blackbox_attrib.flags = m_blackbox_attrib.attrib = m_blackbox_attrib.stack = 0; 385 m_blackbox_attrib.flags = m_blackbox_attrib.attrib = m_blackbox_attrib.stack = 0;
386 m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0; 386 m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0;
@@ -3245,7 +3245,7 @@ void FluxboxWindow::sendConfigureNotify() {
3245 event.xconfigure.above = frame().window().window(); 3245 event.xconfigure.above = frame().window().window();
3246 event.xconfigure.override_redirect = false; 3246 event.xconfigure.override_redirect = false;
3247 3247
3248 screen().updateNetizenConfigNotify(&event); 3248 screen().updateNetizenConfigNotify(event);
3249 } // end for 3249 } // end for
3250} 3250}
3251 3251
diff --git a/src/Window.hh b/src/Window.hh
index 1ffdb82..d7a6769 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -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: Window.hh,v 1.80 2003/06/23 14:16:05 rathnor Exp $ 25// $Id: Window.hh,v 1.81 2003/06/24 14:57:06 fluxgen Exp $
26 26
27#ifndef WINDOW_HH 27#ifndef WINDOW_HH
28#define WINDOW_HH 28#define WINDOW_HH
@@ -138,8 +138,6 @@ public:
138 void nextClient(); 138 void nextClient();
139 void prevClient(); 139 void prevClient();
140 140
141 void setWindowNumber(int n) { m_window_number = n; }
142
143 bool validateClient(); 141 bool validateClient();
144 bool setInputFocus(); 142 bool setInputFocus();
145 void raiseAndFocus() { raise(); setInputFocus(); } 143 void raiseAndFocus() { raise(); setInputFocus(); }
@@ -292,7 +290,7 @@ public:
292 int x() const; 290 int x() const;
293 int y() const; 291 int y() const;
294 unsigned int workspaceNumber() const { return m_workspace_number; } 292 unsigned int workspaceNumber() const { return m_workspace_number; }
295 int windowNumber() const { return m_window_number; } 293
296 int layerNum() const { return m_layernum; } 294 int layerNum() const { return m_layernum; }
297 void setLayerNum(int layernum); 295 void setLayerNum(int layernum);
298 296
@@ -405,7 +403,6 @@ private:
405 int m_last_move_x, m_last_move_y; // handles last pos for non opaque moving 403 int m_last_move_x, m_last_move_y; // handles last pos for non opaque moving
406 unsigned int m_last_resize_h, m_last_resize_w; // handles height/width for resize "window" 404 unsigned int m_last_resize_h, m_last_resize_w; // handles height/width for resize "window"
407 405
408 int m_window_number;
409 unsigned int m_workspace_number; 406 unsigned int m_workspace_number;
410 unsigned long m_current_state; 407 unsigned long m_current_state;
411 408
diff --git a/src/Workspace.cc b/src/Workspace.cc
index ac28ac9..e583eaa 100644
--- a/src/Workspace.cc
+++ b/src/Workspace.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: Workspace.cc,v 1.74 2003/06/16 14:54:18 fluxgen Exp $ 25// $Id: Workspace.cc,v 1.75 2003/06/24 14:57:53 fluxgen Exp $
26 26
27#include "Workspace.hh" 27#include "Workspace.hh"
28 28
@@ -146,14 +146,13 @@ void Workspace::setLastFocusedWindow(FluxboxWindow *win) {
146 m_lastfocus = 0; 146 m_lastfocus = 0;
147} 147}
148 148
149int Workspace::addWindow(FluxboxWindow &w, bool place) { 149void Workspace::addWindow(FluxboxWindow &w, bool place) {
150 // we don't need to add a window that already exist in our list 150 // we don't need to add a window that already exist in our list
151 if (find(m_windowlist.begin(), m_windowlist.end(), &w) != 151 if (find(m_windowlist.begin(), m_windowlist.end(), &w) !=
152 m_windowlist.end()) 152 m_windowlist.end())
153 return -1; 153 return;
154 154
155 w.setWorkspace(m_id); 155 w.setWorkspace(m_id);
156 w.setWindowNumber(m_windowlist.size());
157 156
158 if (place) 157 if (place)
159 placeWindow(w); 158 placeWindow(w);
@@ -170,7 +169,6 @@ int Workspace::addWindow(FluxboxWindow &w, bool place) {
170 screen().updateNetizenWindowAdd((*client_it)->window(), m_id); 169 screen().updateNetizenWindowAdd((*client_it)->window(), m_id);
171 } 170 }
172 171
173 return w.windowNumber();
174} 172}
175 173
176 174
diff --git a/src/Workspace.hh b/src/Workspace.hh
index c0afe65..ad9a166 100644
--- a/src/Workspace.hh
+++ b/src/Workspace.hh
@@ -62,7 +62,7 @@ public:
62 void update(); 62 void update();
63 void setCurrent(); 63 void setCurrent();
64 void shutdown(); 64 void shutdown();
65 int addWindow(FluxboxWindow &win, bool place = false); 65 void addWindow(FluxboxWindow &win, bool place = false);
66 int removeWindow(FluxboxWindow *win); 66 int removeWindow(FluxboxWindow *win);
67 void removeWindow(WinClient &client); 67 void removeWindow(WinClient &client);
68 void updateClientmenu(); 68 void updateClientmenu();