minor cleaning, removed window number
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.192 2003/06/24 13:56:01 fluxgen Exp $ +// $Id: Screen.cc,v 1.193 2003/06/24 14:55:55 fluxgen Exp $ #include "Screen.hh"@@ -786,8 +786,6 @@
void BScreen::addIcon(FluxboxWindow *w) { if (! w) return; - w->setWindowNumber(m_icon_list.size()); - m_icon_list.push_back(w); }@@ -803,12 +801,6 @@ bind2nd(equal_to<FluxboxWindow *>(), w));
if (erase_it != m_icon_list.end()) m_icon_list.erase(erase_it); - - Icons::iterator it = m_icon_list.begin(); - Icons::iterator it_end = m_icon_list.end(); - for (int i = 0; it != it_end; ++it, ++i) { - (*it)->setWindowNumber(i); - } } void BScreen::removeWindow(FluxboxWindow *win) {@@ -1109,7 +1101,7 @@ }
} -void BScreen::updateNetizenConfigNotify(XEvent *e) { +void BScreen::updateNetizenConfigNotify(XEvent &e) { Netizens::iterator it = m_netizen_list.begin(); Netizens::iterator it_end = m_netizen_list.end(); for (; it != it_end; ++it) {@@ -1121,12 +1113,14 @@ FluxboxWindow *BScreen::createWindow(Window client) {
WinClient *winclient = new WinClient(client, *this); #ifdef SLIT + if (winclient->initial_state == WithdrawnState) + slit()->addClient(client); + +#endif // SLIT if (winclient->initial_state == WithdrawnState) { delete winclient; - slit()->addClient(client); return 0; } -#endif // SLIT // check if it should be grouped with something else FluxboxWindow *win;@@ -1413,14 +1407,12 @@
void BScreen::nextFocus(int opts) { bool have_focused = false; - int focused_window_number = -1; FluxboxWindow *focused = Fluxbox::instance()->getFocusedWindow(); const int num_windows = currentWorkspace()->numberOfWindows(); if (focused != 0) { if (focused->screen().screenNumber() == screenNumber()) { have_focused = true; - focused_window_number = focused->windowNumber(); } }@@ -1502,14 +1494,12 @@
void BScreen::prevFocus(int opts) { bool have_focused = false; - int focused_window_number = -1; FluxboxWindow *focused; int num_windows = currentWorkspace()->numberOfWindows(); if ((focused = Fluxbox::instance()->getFocusedWindow())) { if (focused->screen().screenNumber() == screenNumber()) { have_focused = true; - focused_window_number = focused->windowNumber(); } }@@ -1594,13 +1584,11 @@
void BScreen::raiseFocus() { bool have_focused = false; - int focused_window_number = -1; Fluxbox * const fb = Fluxbox::instance(); if (fb->getFocusedWindow()) if (fb->getFocusedWindow()->screen().screenNumber() == screenNumber()) { have_focused = true; - focused_window_number = fb->getFocusedWindow()->windowNumber(); } if ((currentWorkspace()->numberOfWindows() > 1) && have_focused)
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.195 2003/06/23 14:16:05 rathnor Exp $ +// $Id: Window.cc,v 1.196 2003/06/24 14:57:05 fluxgen Exp $ #include "Window.hh"@@ -380,7 +380,7 @@
// display connection display = FbTk::App::instance()->display(); - m_blackbox_attrib.workspace = m_workspace_number = m_window_number = -1; + m_blackbox_attrib.workspace = m_workspace_number = 0; m_blackbox_attrib.flags = m_blackbox_attrib.attrib = m_blackbox_attrib.stack = 0; m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0;@@ -3245,7 +3245,7 @@ event.xconfigure.border_width = client.old_bw;
event.xconfigure.above = frame().window().window(); event.xconfigure.override_redirect = false; - screen().updateNetizenConfigNotify(&event); + screen().updateNetizenConfigNotify(event); } // end for }
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.hh,v 1.80 2003/06/23 14:16:05 rathnor Exp $ +// $Id: Window.hh,v 1.81 2003/06/24 14:57:06 fluxgen Exp $ #ifndef WINDOW_HH #define WINDOW_HH@@ -137,8 +137,6 @@ bool setCurrentClient(WinClient &client, bool setinput = true);
WinClient *findClient(Window win); void nextClient(); void prevClient(); - - void setWindowNumber(int n) { m_window_number = n; } bool validateClient(); bool setInputFocus();@@ -292,7 +290,7 @@ const std::string &iconTitle() const;
int x() const; int y() const; unsigned int workspaceNumber() const { return m_workspace_number; } - int windowNumber() const { return m_window_number; } + int layerNum() const { return m_layernum; } void setLayerNum(int layernum);@@ -405,7 +403,6 @@ int m_last_resize_x, m_last_resize_y; // handles last button press event for resize
int m_last_move_x, m_last_move_y; // handles last pos for non opaque moving unsigned int m_last_resize_h, m_last_resize_w; // handles height/width for resize "window" - int m_window_number; unsigned int m_workspace_number; unsigned long m_current_state;
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Workspace.cc,v 1.74 2003/06/16 14:54:18 fluxgen Exp $ +// $Id: Workspace.cc,v 1.75 2003/06/24 14:57:53 fluxgen Exp $ #include "Workspace.hh"@@ -146,14 +146,13 @@ else
m_lastfocus = 0; } -int Workspace::addWindow(FluxboxWindow &w, bool place) { +void Workspace::addWindow(FluxboxWindow &w, bool place) { // we don't need to add a window that already exist in our list if (find(m_windowlist.begin(), m_windowlist.end(), &w) != m_windowlist.end()) - return -1; + return; w.setWorkspace(m_id); - w.setWindowNumber(m_windowlist.size()); if (place) placeWindow(w);@@ -170,7 +169,6 @@ for (; client_it != client_it_end; ++client_it)
screen().updateNetizenWindowAdd((*client_it)->window(), m_id); } - return w.windowNumber(); }
@@ -62,7 +62,7 @@ void reconfigure();
void update(); void setCurrent(); void shutdown(); - int addWindow(FluxboxWindow &win, bool place = false); + void addWindow(FluxboxWindow &win, bool place = false); int removeWindow(FluxboxWindow *win); void removeWindow(WinClient &client); void updateClientmenu();