minor cleaning, removed window number
This commit is contained in:
parent
225dc75dd9
commit
4d389149bc
5 changed files with 15 additions and 32 deletions
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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"
|
#include "Screen.hh"
|
||||||
|
@ -786,8 +786,6 @@ void BScreen::updateWorkspaceNamesAtom() {
|
||||||
void BScreen::addIcon(FluxboxWindow *w) {
|
void BScreen::addIcon(FluxboxWindow *w) {
|
||||||
if (! w) return;
|
if (! w) return;
|
||||||
|
|
||||||
w->setWindowNumber(m_icon_list.size());
|
|
||||||
|
|
||||||
m_icon_list.push_back(w);
|
m_icon_list.push_back(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -803,12 +801,6 @@ void BScreen::removeIcon(FluxboxWindow *w) {
|
||||||
if (erase_it != m_icon_list.end())
|
if (erase_it != m_icon_list.end())
|
||||||
m_icon_list.erase(erase_it);
|
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) {
|
void BScreen::removeWindow(FluxboxWindow *win) {
|
||||||
|
@ -1109,7 +1101,7 @@ void BScreen::updateNetizenWindowLower(Window w) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BScreen::updateNetizenConfigNotify(XEvent *e) {
|
void BScreen::updateNetizenConfigNotify(XEvent &e) {
|
||||||
Netizens::iterator it = m_netizen_list.begin();
|
Netizens::iterator it = m_netizen_list.begin();
|
||||||
Netizens::iterator it_end = m_netizen_list.end();
|
Netizens::iterator it_end = m_netizen_list.end();
|
||||||
for (; it != it_end; ++it) {
|
for (; it != it_end; ++it) {
|
||||||
|
@ -1121,12 +1113,14 @@ FluxboxWindow *BScreen::createWindow(Window client) {
|
||||||
WinClient *winclient = new WinClient(client, *this);
|
WinClient *winclient = new WinClient(client, *this);
|
||||||
|
|
||||||
#ifdef SLIT
|
#ifdef SLIT
|
||||||
|
if (winclient->initial_state == WithdrawnState)
|
||||||
|
slit()->addClient(client);
|
||||||
|
|
||||||
|
#endif // SLIT
|
||||||
if (winclient->initial_state == WithdrawnState) {
|
if (winclient->initial_state == WithdrawnState) {
|
||||||
delete winclient;
|
delete winclient;
|
||||||
slit()->addClient(client);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif // SLIT
|
|
||||||
|
|
||||||
// check if it should be grouped with something else
|
// check if it should be grouped with something else
|
||||||
FluxboxWindow *win;
|
FluxboxWindow *win;
|
||||||
|
@ -1413,14 +1407,12 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id,
|
||||||
|
|
||||||
void BScreen::nextFocus(int opts) {
|
void BScreen::nextFocus(int opts) {
|
||||||
bool have_focused = false;
|
bool have_focused = false;
|
||||||
int focused_window_number = -1;
|
|
||||||
FluxboxWindow *focused = Fluxbox::instance()->getFocusedWindow();
|
FluxboxWindow *focused = Fluxbox::instance()->getFocusedWindow();
|
||||||
const int num_windows = currentWorkspace()->numberOfWindows();
|
const int num_windows = currentWorkspace()->numberOfWindows();
|
||||||
|
|
||||||
if (focused != 0) {
|
if (focused != 0) {
|
||||||
if (focused->screen().screenNumber() == screenNumber()) {
|
if (focused->screen().screenNumber() == screenNumber()) {
|
||||||
have_focused = true;
|
have_focused = true;
|
||||||
focused_window_number = focused->windowNumber();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1502,14 +1494,12 @@ void BScreen::nextFocus(int opts) {
|
||||||
|
|
||||||
void BScreen::prevFocus(int opts) {
|
void BScreen::prevFocus(int opts) {
|
||||||
bool have_focused = false;
|
bool have_focused = false;
|
||||||
int focused_window_number = -1;
|
|
||||||
FluxboxWindow *focused;
|
FluxboxWindow *focused;
|
||||||
int num_windows = currentWorkspace()->numberOfWindows();
|
int num_windows = currentWorkspace()->numberOfWindows();
|
||||||
|
|
||||||
if ((focused = Fluxbox::instance()->getFocusedWindow())) {
|
if ((focused = Fluxbox::instance()->getFocusedWindow())) {
|
||||||
if (focused->screen().screenNumber() == screenNumber()) {
|
if (focused->screen().screenNumber() == screenNumber()) {
|
||||||
have_focused = true;
|
have_focused = true;
|
||||||
focused_window_number = focused->windowNumber();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1594,13 +1584,11 @@ void BScreen::prevFocus(int opts) {
|
||||||
|
|
||||||
void BScreen::raiseFocus() {
|
void BScreen::raiseFocus() {
|
||||||
bool have_focused = false;
|
bool have_focused = false;
|
||||||
int focused_window_number = -1;
|
|
||||||
Fluxbox * const fb = Fluxbox::instance();
|
Fluxbox * const fb = Fluxbox::instance();
|
||||||
|
|
||||||
if (fb->getFocusedWindow())
|
if (fb->getFocusedWindow())
|
||||||
if (fb->getFocusedWindow()->screen().screenNumber() == screenNumber()) {
|
if (fb->getFocusedWindow()->screen().screenNumber() == screenNumber()) {
|
||||||
have_focused = true;
|
have_focused = true;
|
||||||
focused_window_number = fb->getFocusedWindow()->windowNumber();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((currentWorkspace()->numberOfWindows() > 1) && have_focused)
|
if ((currentWorkspace()->numberOfWindows() > 1) && have_focused)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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"
|
#include "Window.hh"
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@ void FluxboxWindow::init() {
|
||||||
// display connection
|
// display connection
|
||||||
display = FbTk::App::instance()->display();
|
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.flags = m_blackbox_attrib.attrib = m_blackbox_attrib.stack = 0;
|
||||||
m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0;
|
m_blackbox_attrib.premax_x = m_blackbox_attrib.premax_y = 0;
|
||||||
|
@ -3245,7 +3245,7 @@ void FluxboxWindow::sendConfigureNotify() {
|
||||||
event.xconfigure.above = frame().window().window();
|
event.xconfigure.above = frame().window().window();
|
||||||
event.xconfigure.override_redirect = false;
|
event.xconfigure.override_redirect = false;
|
||||||
|
|
||||||
screen().updateNetizenConfigNotify(&event);
|
screen().updateNetizenConfigNotify(event);
|
||||||
} // end for
|
} // end for
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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
|
#ifndef WINDOW_HH
|
||||||
#define WINDOW_HH
|
#define WINDOW_HH
|
||||||
|
@ -138,8 +138,6 @@ public:
|
||||||
void nextClient();
|
void nextClient();
|
||||||
void prevClient();
|
void prevClient();
|
||||||
|
|
||||||
void setWindowNumber(int n) { m_window_number = n; }
|
|
||||||
|
|
||||||
bool validateClient();
|
bool validateClient();
|
||||||
bool setInputFocus();
|
bool setInputFocus();
|
||||||
void raiseAndFocus() { raise(); setInputFocus(); }
|
void raiseAndFocus() { raise(); setInputFocus(); }
|
||||||
|
@ -292,7 +290,7 @@ public:
|
||||||
int x() const;
|
int x() const;
|
||||||
int y() const;
|
int y() const;
|
||||||
unsigned int workspaceNumber() const { return m_workspace_number; }
|
unsigned int workspaceNumber() const { return m_workspace_number; }
|
||||||
int windowNumber() const { return m_window_number; }
|
|
||||||
int layerNum() const { return m_layernum; }
|
int layerNum() const { return m_layernum; }
|
||||||
void setLayerNum(int layernum);
|
void setLayerNum(int layernum);
|
||||||
|
|
||||||
|
@ -405,7 +403,6 @@ private:
|
||||||
int m_last_move_x, m_last_move_y; // handles last pos for non opaque moving
|
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"
|
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 int m_workspace_number;
|
||||||
unsigned long m_current_state;
|
unsigned long m_current_state;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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"
|
#include "Workspace.hh"
|
||||||
|
|
||||||
|
@ -146,14 +146,13 @@ void Workspace::setLastFocusedWindow(FluxboxWindow *win) {
|
||||||
m_lastfocus = 0;
|
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
|
// we don't need to add a window that already exist in our list
|
||||||
if (find(m_windowlist.begin(), m_windowlist.end(), &w) !=
|
if (find(m_windowlist.begin(), m_windowlist.end(), &w) !=
|
||||||
m_windowlist.end())
|
m_windowlist.end())
|
||||||
return -1;
|
return;
|
||||||
|
|
||||||
w.setWorkspace(m_id);
|
w.setWorkspace(m_id);
|
||||||
w.setWindowNumber(m_windowlist.size());
|
|
||||||
|
|
||||||
if (place)
|
if (place)
|
||||||
placeWindow(w);
|
placeWindow(w);
|
||||||
|
@ -170,7 +169,6 @@ int Workspace::addWindow(FluxboxWindow &w, bool place) {
|
||||||
screen().updateNetizenWindowAdd((*client_it)->window(), m_id);
|
screen().updateNetizenWindowAdd((*client_it)->window(), m_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return w.windowNumber();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ public:
|
||||||
void update();
|
void update();
|
||||||
void setCurrent();
|
void setCurrent();
|
||||||
void shutdown();
|
void shutdown();
|
||||||
int addWindow(FluxboxWindow &win, bool place = false);
|
void addWindow(FluxboxWindow &win, bool place = false);
|
||||||
int removeWindow(FluxboxWindow *win);
|
int removeWindow(FluxboxWindow *win);
|
||||||
void removeWindow(WinClient &client);
|
void removeWindow(WinClient &client);
|
||||||
void updateClientmenu();
|
void updateClientmenu();
|
||||||
|
|
Loading…
Reference in a new issue