minor cleaning
@@ -19,7 +19,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: Ewmh.cc,v 1.21 2003/05/10 22:56:48 fluxgen Exp $ +// $Id: Ewmh.cc,v 1.22 2003/05/11 13:36:10 fluxgen Exp $ #include "Ewmh.hh"@@ -120,7 +120,7 @@ unsigned int desktop = static_cast<unsigned int>(*data);
if (desktop == 0xFFFFFFFF && !win.isStuck()) win.stick(); else - win.getScreen().sendToWorkspace(desktop, &win, false); + win.screen().sendToWorkspace(desktop, &win, false); XFree(data); }
@@ -19,7 +19,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: Gnome.cc,v 1.20 2003/05/10 22:57:37 fluxgen Exp $ +// $Id: Gnome.cc,v 1.21 2003/05/11 13:36:10 fluxgen Exp $ #include "Gnome.hh"@@ -118,7 +118,7 @@ &ret_type, &fmt, &nitems, &bytes_after,
(unsigned char **) &data) == Success && data) { unsigned int workspace_num = *data; if (win.getWorkspaceNumber() != workspace_num) - win.getScreen().reassociateWindow(&win, workspace_num, false); + win.screen().reassociateWindow(&win, workspace_num, false); XFree (data); }@@ -269,8 +269,8 @@ cerr<<__FILE__<<"("<<__LINE__<<"): Got workspace atom="<<ce.data.l[0]<<endl;
#endif//!DEBUG if ( win !=0 && // the message sent to client window? ce.data.l[0] >= 0 && - ce.data.l[0] < (signed)win->getScreen().getCount()) { - win->getScreen().changeWorkspaceID(ce.data.l[0]); + ce.data.l[0] < (signed)win->screen().getCount()) { + win->screen().changeWorkspaceID(ce.data.l[0]); } else if (screen!=0 && //the message sent to root window? ce.data.l[0] >= 0 &&
@@ -21,7 +21,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: Remember.cc,v 1.12 2003/05/10 22:47:55 fluxgen Exp $ +// $Id: Remember.cc,v 1.13 2003/05/11 13:36:10 fluxgen Exp $ #include "Remember.hh" #include "StringUtil.hh"@@ -97,7 +97,7 @@
FbTk::Menu *createRememberMenu(Remember &remember, FluxboxWindow &win) { // each fluxboxwindow has its own windowmenu // so we also create a remember menu just for it... - BScreen &screen = win.getScreen(); + BScreen &screen = win.screen(); FbTk::Menu *menu = new FbMenu(*screen.menuTheme(), screen.getScreenNumber(), *screen.getImageControl(),@@ -465,7 +465,7 @@ case REM_WORKSPACE:
app->rememberWorkspace(win->getWorkspaceNumber()); break; case REM_DIMENSIONS: - app->rememberDimensions(win->getWidth(), win->getHeight()); + app->rememberDimensions(win->width(), win->height()); break; case REM_POSITION: app->rememberPosition(win->getXFrame(), win->getYFrame());@@ -573,7 +573,7 @@ Application *app = find(winclient);
if (app == 0) return; // nothing to do - BScreen &screen = win.getScreen(); + BScreen &screen = win.screen(); if (app->workspace_remember) { // TODO: fix placement to initialise properly@@ -631,7 +631,7 @@ /*
if (app->workspace_remember) app->rememberWorkspace(win.getWorkspaceNumber()); if (app->dimensions_remember) - app->rememberDimensions(win.getWidth(), win.getHeight()); + app->rememberDimensions(win.width(), win.height()); if (app->position_remember) app->rememberPosition(win.getXFrame(), win.getYFrame()); if (app->shadedstate_remember)
@@ -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.153 2003/05/11 11:47:19 rathnor Exp $ +// $Id: Screen.cc,v 1.154 2003/05/11 13:36:10 fluxgen Exp $ #include "Screen.hh"@@ -981,7 +981,7 @@ // or revert normally
if (client.transientFor() && client.transientFor()->fbwindow()) client.transientFor()->fbwindow()->setInputFocus(); else - Fluxbox::instance()->revertFocus(&focused->getScreen()); + Fluxbox::instance()->revertFocus(&focused->screen()); } }@@ -1112,7 +1112,7 @@
if (id != current_workspace->workspaceID()) { XSync(FbTk::App::instance()->display(), True); - if (win && &win->getScreen() == this && + if (win && &win->screen() == this && (! win->isStuck())) { if (win->isIconic()) {@@ -1478,7 +1478,7 @@ FluxboxWindow *focused = Fluxbox::instance()->getFocusedWindow();
const int num_windows = getCurrentWorkspace()->getCount(); if (focused != 0) { - if (focused->getScreen().getScreenNumber() == + if (focused->screen().getScreenNumber() == getScreenNumber()) { have_focused = true; focused_window_number = focused->getWindowNumber();@@ -1568,7 +1568,7 @@ FluxboxWindow *focused;
int num_windows = getCurrentWorkspace()->getCount(); if ((focused = Fluxbox::instance()->getFocusedWindow())) { - if (focused->getScreen().getScreenNumber() == + if (focused->screen().getScreenNumber() == getScreenNumber()) { have_focused = true; focused_window_number = focused->getWindowNumber();@@ -1660,7 +1660,7 @@ int focused_window_number = -1;
Fluxbox * const fb = Fluxbox::instance(); if (fb->getFocusedWindow()) - if (fb->getFocusedWindow()->getScreen().getScreenNumber() == + if (fb->getFocusedWindow()->screen().getScreenNumber() == getScreenNumber()) { have_focused = true; focused_window_number = fb->getFocusedWindow()->getWindowNumber();@@ -1689,9 +1689,9 @@ FluxboxWindow *foundwin = 0;
int weight = 999999, exposure = 0; // extreme values int borderW = m_root_theme->borderWidth(), top = win.getYFrame(), - bottom = win.getYFrame() + win.getHeight() + 2*borderW, + bottom = win.getYFrame() + win.height() + 2*borderW, left = win.getXFrame(), - right = win.getXFrame() + win.getWidth() + 2*borderW; + right = win.getXFrame() + win.width() + 2*borderW; Workspace::Windows &wins = getCurrentWorkspace()->getWindowList(); Workspace::Windows::iterator it = wins.begin();@@ -1702,9 +1702,9 @@ // we check things against an edge, and within the bounds (draw a picture)
int edge=0, upper=0, lower=0, oedge=0, oupper=0, olower=0; int otop = (*it)->getYFrame(), - obottom = (*it)->getYFrame() + (*it)->getHeight() + 2*borderW, + obottom = (*it)->getYFrame() + (*it)->height() + 2*borderW, oleft = (*it)->getXFrame(), - oright = (*it)->getXFrame() + (*it)->getWidth() + 2*borderW; + oright = (*it)->getXFrame() + (*it)->width() + 2*borderW; // check if they intersect switch (dir) { case FOCUSUP:
@@ -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: Toolbar.cc,v 1.78 2003/05/10 13:57:07 fluxgen Exp $ +// $Id: Toolbar.cc,v 1.79 2003/05/11 13:36:11 fluxgen Exp $ #include "Toolbar.hh"@@ -787,7 +787,7 @@ frame.window_label.clear();
FluxboxWindow *foc = Fluxbox::instance()->getFocusedWindow(); // don't draw focused window if it's not on the same screen - if (&foc->getScreen() != &screen() || foc->getTitle().size() == 0) + if (&foc->screen() != &screen() || foc->getTitle().size() == 0) return; unsigned int newlen = foc->getTitle().size();
@@ -20,7 +20,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: ToolbarHandler.cc,v 1.8 2003/04/16 23:33:59 rathnor Exp $ +// $Id: ToolbarHandler.cc,v 1.9 2003/05/11 13:36:11 fluxgen Exp $ /** * The ToolbarHandler class acts as a rough interface to the toolbar.@@ -205,7 +205,7 @@ }
} void ToolbarHandler::setupWindow(FluxboxWindow &win) { - if (&win.getScreen() != &m_screen) + if (&win.screen() != &m_screen) return; switch (m_mode) {@@ -233,7 +233,7 @@ }
} void ToolbarHandler::updateWindowClose(FluxboxWindow &win) { - if (&win.getScreen() != &m_screen) + if (&win.screen() != &m_screen) return; // check status of window (in current workspace, etc) and remove if necessary@@ -262,7 +262,7 @@ }
} void ToolbarHandler::updateState(FluxboxWindow &win) { - if (&win.getScreen() != &m_screen) + if (&win.screen() != &m_screen) return; // this function only relevant for icons@@ -292,7 +292,7 @@ }
void ToolbarHandler::updateWorkspace(FluxboxWindow &win) { - if (&win.getScreen() != &m_screen) + if (&win.screen() != &m_screen) return; // don't care about current workspace except if in workspace mode
@@ -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.168 2003/05/10 23:04:37 fluxgen Exp $ +// $Id: Window.cc,v 1.169 2003/05/11 13:36:11 fluxgen Exp $ #include "Window.hh"@@ -2836,8 +2836,8 @@ int borderW = m_frame.window().borderWidth();
int top = orig_top; // orig include the borders int left = orig_left; - int right = orig_left + getWidth() + 2*borderW; - int bottom = orig_top + getHeight() + 2*borderW; + int right = orig_left + width() + 2*borderW; + int bottom = orig_top + height() + 2*borderW; ///////////////////////////////////// // begin by checking the screen edges@@ -2858,9 +2858,9 @@ if ((*it) == this) continue; // skip myself
snapToWindow(dx, dy, left, right, top, bottom, (*it)->getXFrame(), - (*it)->getXFrame() + (*it)->getWidth() + 2*borderW, + (*it)->getXFrame() + (*it)->width() + 2*borderW, (*it)->getYFrame(), - (*it)->getYFrame() + (*it)->getHeight() + 2*borderW); + (*it)->getYFrame() + (*it)->height() + 2*borderW); } /////////////////////////////////////
@@ -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.70 2003/05/10 23:03:49 fluxgen Exp $ +// $Id: Window.hh,v 1.71 2003/05/11 13:36:11 fluxgen Exp $ #ifndef WINDOW_HH #define WINDOW_HH@@ -282,9 +282,6 @@ inline ClientList &clientList() { return m_clientlist; }
inline const ClientList &clientList() const { return m_clientlist; } inline WinClient &winClient() { return *m_client; } inline const WinClient &winClient() const { return *m_client; } - // obsolete - inline const BScreen &getScreen() const { return m_screen; } - inline BScreen &getScreen() { return m_screen; } inline const BScreen &screen() const { return m_screen; } inline BScreen &screen() { return m_screen; }@@ -316,8 +313,9 @@ unsigned int getWorkspaceNumber() const { return m_workspace_number; }
int getWindowNumber() const { return m_window_number; } int getLayerNum() const { return m_layernum; } void setLayerNum(int layernum); - unsigned int getWidth() const { return m_frame.width(); } - unsigned int getHeight() const { return m_frame.height(); } + + unsigned int width() const { return m_frame.width(); } + unsigned int height() const { return m_frame.height(); } unsigned int getClientHeight() const; unsigned int getClientWidth() const; unsigned int getTitleHeight() const { return m_frame.titleHeight(); }
@@ -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.60 2003/05/10 23:07:04 fluxgen Exp $ +// $Id: Workspace.cc,v 1.61 2003/05/11 13:36:12 fluxgen Exp $ #include "Workspace.hh"@@ -81,7 +81,7 @@ void click(int button, int time) {
if (m_client.fbwindow() == 0) return; FluxboxWindow &win = *m_client.fbwindow(); - BScreen &scr = win.getScreen(); + BScreen &scr = win.screen(); // determine workspace change for (size_t i=0; i<scr.getCount(); i++) { if (scr.getWorkspace(i) == &m_space) {@@ -499,8 +499,8 @@ change_y = -1;
if (screen.getRowPlacementDirection() == BScreen::RIGHTLEFT) change_x = -1; - int win_w = win.getWidth() + win.getFbWindow().borderWidth()*2, - win_h = win.getHeight() + win.getFbWindow().borderWidth()*2; + int win_w = win.width() + win.getFbWindow().borderWidth()*2, + win_h = win.height() + win.getFbWindow().borderWidth()*2; int test_x, test_y, curr_x, curr_y, curr_w, curr_h;@@ -579,9 +579,9 @@ FluxboxWindow &window = **win_it;
curr_x = window.getXFrame(); curr_y = window.getYFrame(); - curr_w = window.getWidth() + window.getFbWindow().borderWidth()*2; + curr_w = window.width() + window.getFbWindow().borderWidth()*2; curr_h = window.isShaded() ? window.getTitleHeight() : - window.getHeight() + window.getFbWindow().borderWidth()*2; + window.height() + window.getFbWindow().borderWidth()*2; if (curr_x < test_x + win_w && curr_x + curr_w > test_x &&@@ -634,11 +634,11 @@ Windows::iterator it_end = m_windowlist.end();
for (; it != it_end && placed; ++it) { curr_x = (*it)->getXFrame(); curr_y = (*it)->getYFrame(); - curr_w = (*it)->getWidth() + (*it)->getFbWindow().borderWidth()*2; + curr_w = (*it)->width() + (*it)->getFbWindow().borderWidth()*2; curr_h = (((*it)->isShaded()) ? (*it)->getTitleHeight() - : (*it)->getHeight()) + + : (*it)->height()) + (*it)->getFbWindow().borderWidth()*2;@@ -687,5 +687,5 @@ if (place_y + win_h > (signed) screen.getHeight())
place_y = (((signed) screen.getHeight()) - win_h) / 2; - win.moveResize(place_x, place_y, win.getWidth(), win.getHeight()); + win.moveResize(place_x, place_y, win.width(), win.height()); }
@@ -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: fluxbox.cc,v 1.134 2003/05/10 23:07:42 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.135 2003/05/11 13:36:12 fluxgen Exp $ #include "fluxbox.hh"@@ -964,7 +964,7 @@ win->unmapNotifyEvent(ue);
client = 0; // it's invalid now when win destroyed the client if (win == m_focused_window) - revertFocus(&win->getScreen()); + revertFocus(&win->screen()); // finaly destroy window if empty if (win->numClients() == 0) {@@ -1383,64 +1383,64 @@ break;
case Keys::NUDGERIGHT: m_focused_window->moveResize( m_focused_window->getXFrame()+param, m_focused_window->getYFrame(), - m_focused_window->getWidth(), m_focused_window->getHeight()); + m_focused_window->width(), m_focused_window->height()); break; case Keys::NUDGELEFT: m_focused_window->moveResize( m_focused_window->getXFrame()-param, m_focused_window->getYFrame(), - m_focused_window->getWidth(), m_focused_window->getHeight()); + m_focused_window->width(), m_focused_window->height()); break; case Keys::NUDGEUP: m_focused_window->moveResize( m_focused_window->getXFrame(), m_focused_window->getYFrame()-param, - m_focused_window->getWidth(), m_focused_window->getHeight()); + m_focused_window->width(), m_focused_window->height()); break; case Keys::NUDGEDOWN: m_focused_window->moveResize( m_focused_window->getXFrame(), m_focused_window->getYFrame()+param, - m_focused_window->getWidth(), m_focused_window->getHeight()); + m_focused_window->width(), m_focused_window->height()); break; // NOTE !!! BIGNUDGExxxx is not needed, just use 10 as a parameter case Keys::BIGNUDGERIGHT: m_focused_window->moveResize( m_focused_window->getXFrame()+10, m_focused_window->getYFrame(), - m_focused_window->getWidth(), m_focused_window->getHeight()); + m_focused_window->width(), m_focused_window->height()); break; case Keys::BIGNUDGELEFT: m_focused_window->moveResize( m_focused_window->getXFrame()-10, m_focused_window->getYFrame(), - m_focused_window->getWidth(), m_focused_window->getHeight()); + m_focused_window->width(), m_focused_window->height()); break; case Keys::BIGNUDGEUP: m_focused_window->moveResize( m_focused_window->getXFrame(), m_focused_window->getYFrame()-10, - m_focused_window->getWidth(), m_focused_window->getHeight()); + m_focused_window->width(), m_focused_window->height()); break; case Keys::BIGNUDGEDOWN: m_focused_window->moveResize( m_focused_window->getXFrame(), m_focused_window->getYFrame()+10, - m_focused_window->getWidth(), m_focused_window->getHeight()); + m_focused_window->width(), m_focused_window->height()); break; case Keys::HORIZINC: m_focused_window->moveResize( m_focused_window->getXFrame(), m_focused_window->getYFrame(), - m_focused_window->getWidth()+10, m_focused_window->getHeight()); + m_focused_window->width() + 10, m_focused_window->height()); break; case Keys::VERTINC: m_focused_window->moveResize( m_focused_window->getXFrame(), m_focused_window->getYFrame(), - m_focused_window->getWidth(), m_focused_window->getHeight()+10); + m_focused_window->width(), m_focused_window->height()+10); break; case Keys::HORIZDEC: m_focused_window->moveResize( m_focused_window->getXFrame(), m_focused_window->getYFrame(), - m_focused_window->getWidth()-10, m_focused_window->getHeight()); + m_focused_window->width() - 10, m_focused_window->height()); break; case Keys::VERTDEC: m_focused_window->moveResize( m_focused_window->getXFrame(), m_focused_window->getYFrame(), - m_focused_window->getWidth(), m_focused_window->getHeight()-10); + m_focused_window->width(), m_focused_window->height()-10); break; case Keys::TOGGLEDECOR:@@ -1526,16 +1526,16 @@ }
// if window changed to iconic state // add to icon list if (win.isIconic()) { - Workspace *space = win.getScreen().getWorkspace(win.getWorkspaceNumber()); + Workspace *space = win.screen().getWorkspace(win.getWorkspaceNumber()); if (space != 0) space->removeWindow(&win); - win.getScreen().addIcon(&win); + win.screen().addIcon(&win); } if (win.isStuck()) { // if we're sticky then reassociate window // to all workspaces - BScreen &scr = win.getScreen(); + BScreen &scr = win.screen(); if (scr.getCurrentWorkspaceID() != win.getWorkspaceNumber()) { scr.reassociateWindow(&win, scr.getCurrentWorkspaceID(),@@ -1554,7 +1554,7 @@ if (m_atomhandler[i]->update())
m_atomhandler[i]->updateWindowClose(win); } // make sure each workspace get this - BScreen &scr = win.getScreen(); + BScreen &scr = win.screen(); scr.removeWindow(&win); if (m_focused_window == &win) revertFocus(&scr);@@ -1599,7 +1599,7 @@ WinClient::WinClientSubj *subj = dynamic_cast<WinClient::WinClientSubj *>(changedsub);
WinClient &client = subj->winClient(); if (client.fbwindow()) { - BScreen &screen = client.fbwindow()->getScreen(); + BScreen &screen = client.fbwindow()->screen(); screen.updateNetizenWindowDel(client.window()); screen.removeClient(client); }@@ -2315,7 +2315,7 @@ if (!found) {
m_focused_window = 0; } else { old_win = m_focused_window; - old_screen = &old_win->getScreen(); + old_screen = &old_win->screen(); old_tbar = old_screen->getToolbar(); old_wkspc = old_screen->getWorkspace(old_win->getWorkspaceNumber());@@ -2329,7 +2329,7 @@ if (win && ! win->isIconic()) {
// make sure we have a valid win pointer with a valid screen ScreenList::iterator winscreen = std::find(m_screen_list.begin(), m_screen_list.end(), - &win->getScreen()); + &win->screen()); if (winscreen == m_screen_list.end()) { m_focused_window = 0; // the window pointer wasn't valid, mark no window focused } else {