summaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index c67daf5..a5f9d9b 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.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: fluxbox.cc,v 1.148 2003/05/15 11:17:27 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.149 2003/05/15 12:00:46 fluxgen Exp $
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28 28
@@ -523,7 +523,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
523#endif // HAVE_RANDR 523#endif // HAVE_RANDR
524 524
525 m_screen_list.push_back(screen); 525 m_screen_list.push_back(screen);
526 m_atomhandler.push_back(&screen->getToolbarHandler()); 526 m_atomhandler.push_back(&screen->toolbarHandler());
527 527
528 // attach screen signals to this 528 // attach screen signals to this
529 screen->currentWorkspaceSig().attach(this); 529 screen->currentWorkspaceSig().attach(this);
@@ -919,15 +919,15 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) {
919 if (my < 0) my = 0; 919 if (my < 0) my = 0;
920 920
921 if (mx + screen->getWorkspacemenu()->width() > 921 if (mx + screen->getWorkspacemenu()->width() >
922 screen->getWidth()) { 922 screen->width()) {
923 mx = screen->getWidth() - 923 mx = screen->width() -
924 screen->getWorkspacemenu()->width() - 924 screen->getWorkspacemenu()->width() -
925 screen->getWorkspacemenu()->fbwindow().borderWidth(); 925 screen->getWorkspacemenu()->fbwindow().borderWidth();
926 } 926 }
927 927
928 if (my + screen->getWorkspacemenu()->height() > 928 if (my + screen->getWorkspacemenu()->height() >
929 screen->getHeight()) { 929 screen->height()) {
930 my = screen->getHeight() - 930 my = screen->height() -
931 screen->getWorkspacemenu()->height() - 931 screen->getWorkspacemenu()->height() -
932 screen->getWorkspacemenu()->fbwindow().borderWidth(); 932 screen->getWorkspacemenu()->fbwindow().borderWidth();
933 } 933 }
@@ -948,15 +948,15 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) {
948 if (mx < 0) mx = 0; 948 if (mx < 0) mx = 0;
949 if (my < 0) my = 0; 949 if (my < 0) my = 0;
950 950
951 if (mx + screen->getRootmenu()->width() > screen->getWidth()) { 951 if (mx + screen->getRootmenu()->width() > screen->width()) {
952 mx = screen->getWidth() - 952 mx = screen->width() -
953 screen->getRootmenu()->width() - 953 screen->getRootmenu()->width() -
954 screen->getRootmenu()->fbwindow().borderWidth(); 954 screen->getRootmenu()->fbwindow().borderWidth();
955 } 955 }
956 956
957 if (my + screen->getRootmenu()->height() > 957 if (my + screen->getRootmenu()->height() >
958 screen->getHeight()) { 958 screen->height()) {
959 my = screen->getHeight() - 959 my = screen->height() -
960 screen->getRootmenu()->height() - 960 screen->getRootmenu()->height() -
961 screen->getRootmenu()->fbwindow().borderWidth(); 961 screen->getRootmenu()->fbwindow().borderWidth();
962 } 962 }
@@ -1274,7 +1274,7 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) {
1274 case Keys::ATTACHLAST: 1274 case Keys::ATTACHLAST:
1275 //!! just attach last window to focused window 1275 //!! just attach last window to focused window
1276 if (m_focused_window) { 1276 if (m_focused_window) {
1277 Workspace *space = keyscreen->getCurrentWorkspace(); 1277 Workspace *space = keyscreen->currentWorkspace();
1278 Workspace::Windows &wins = space->windowList(); 1278 Workspace::Windows &wins = space->windowList();
1279 if (wins.size() == 1) 1279 if (wins.size() == 1)
1280 break; 1280 break;
@@ -1283,7 +1283,7 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) {
1283 for (; it != fwins.end(); ++it) { 1283 for (; it != fwins.end(); ++it) {
1284 if ((*it)->fbwindow() != m_focused_window && 1284 if ((*it)->fbwindow() != m_focused_window &&
1285 (*it)->fbwindow()->workspaceNumber() == 1285 (*it)->fbwindow()->workspaceNumber() ==
1286 keyscreen->getCurrentWorkspaceID()) { 1286 keyscreen->currentWorkspaceID()) {
1287 m_focused_window->attachClient(**it); 1287 m_focused_window->attachClient(**it);
1288 break; 1288 break;
1289 } 1289 }
@@ -1296,7 +1296,7 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) {
1296 } 1296 }
1297 break; 1297 break;
1298 case Keys::EXECUTE: { //execute command on keypress 1298 case Keys::EXECUTE: { //execute command on keypress
1299 FbCommands::ExecuteCmd cmd(m_key->getExecCommand(), mousescreen->getScreenNumber()); 1299 FbCommands::ExecuteCmd cmd(m_key->getExecCommand(), mousescreen->screenNumber());
1300 cmd.execute(); 1300 cmd.execute();
1301 } break; 1301 } break;
1302 case Keys::QUIT: 1302 case Keys::QUIT:
@@ -1314,15 +1314,15 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) {
1314 if (mx < 0) mx = 0; 1314 if (mx < 0) mx = 0;
1315 if (my < 0) my = 0; 1315 if (my < 0) my = 0;
1316 1316
1317 if (mx + mousescreen->getRootmenu()->width() > mousescreen->getWidth()) { 1317 if (mx + mousescreen->getRootmenu()->width() > mousescreen->width()) {
1318 mx = mousescreen->getWidth() - 1318 mx = mousescreen->width() -
1319 mousescreen->getRootmenu()->width() - 1319 mousescreen->getRootmenu()->width() -
1320 mousescreen->getRootmenu()->fbwindow().borderWidth(); 1320 mousescreen->getRootmenu()->fbwindow().borderWidth();
1321 } 1321 }
1322 1322
1323 if (my + mousescreen->getRootmenu()->height() > 1323 if (my + mousescreen->getRootmenu()->height() >
1324 mousescreen->getHeight()) { 1324 mousescreen->height()) {
1325 my = mousescreen->getHeight() - 1325 my = mousescreen->height() -
1326 mousescreen->getRootmenu()->height() - 1326 mousescreen->getRootmenu()->height() -
1327 mousescreen->getRootmenu()->fbwindow().borderWidth(); 1327 mousescreen->getRootmenu()->fbwindow().borderWidth();
1328 } 1328 }
@@ -1571,9 +1571,9 @@ void Fluxbox::update(FbTk::Subject *changedsub) {
1571 // if we're sticky then reassociate window 1571 // if we're sticky then reassociate window
1572 // to all workspaces 1572 // to all workspaces
1573 BScreen &scr = win.screen(); 1573 BScreen &scr = win.screen();
1574 if (scr.getCurrentWorkspaceID() != win.workspaceNumber()) { 1574 if (scr.currentWorkspaceID() != win.workspaceNumber()) {
1575 scr.reassociateWindow(&win, 1575 scr.reassociateWindow(&win,
1576 scr.getCurrentWorkspaceID(), 1576 scr.currentWorkspaceID(),
1577 true); 1577 true);
1578 } 1578 }
1579 } 1579 }
@@ -1785,7 +1785,7 @@ void Fluxbox::save_rc() {
1785 1785
1786 for (; it != it_end; ++it) { 1786 for (; it != it_end; ++it) {
1787 BScreen *screen = *it; 1787 BScreen *screen = *it;
1788 int screen_number = screen->getScreenNumber(); 1788 int screen_number = screen->screenNumber();
1789 1789
1790 /* 1790 /*
1791#ifdef SLIT 1791#ifdef SLIT
@@ -2003,7 +2003,7 @@ void Fluxbox::load_rc(BScreen &screen) {
2003 2003
2004 XrmValue value; 2004 XrmValue value;
2005 char *value_type, name_lookup[1024], class_lookup[1024]; 2005 char *value_type, name_lookup[1024], class_lookup[1024];
2006 int screen_number = screen.getScreenNumber(); 2006 int screen_number = screen.screenNumber();
2007 2007
2008 sprintf(name_lookup, "session.screen%d.rowPlacementDirection", screen_number); 2008 sprintf(name_lookup, "session.screen%d.rowPlacementDirection", screen_number);
2009 sprintf(class_lookup, "Session.Screen%d.RowPlacementDirection", screen_number); 2009 sprintf(class_lookup, "Session.Screen%d.RowPlacementDirection", screen_number);
@@ -2185,8 +2185,8 @@ void Fluxbox::loadRootCommand(BScreen &screen) {
2185 2185
2186 XrmValue value; 2186 XrmValue value;
2187 char *value_type, name_lookup[1024], class_lookup[1024]; 2187 char *value_type, name_lookup[1024], class_lookup[1024];
2188 sprintf(name_lookup, "session.screen%d.rootCommand", screen.getScreenNumber()); 2188 sprintf(name_lookup, "session.screen%d.rootCommand", screen.screenNumber());
2189 sprintf(class_lookup, "Session.Screen%d.RootCommand", screen.getScreenNumber()); 2189 sprintf(class_lookup, "Session.Screen%d.RootCommand", screen.screenNumber());
2190 if (XrmGetResource(*database, name_lookup, class_lookup, &value_type, 2190 if (XrmGetResource(*database, name_lookup, class_lookup, &value_type,
2191 &value)) { 2191 &value)) {
2192 screen.saveRootCommand(value.addr==0 ? "": value.addr); 2192 screen.saveRootCommand(value.addr==0 ? "": value.addr);
@@ -2368,7 +2368,7 @@ void Fluxbox::setFocusedWindow(FluxboxWindow *win) {
2368 old_win = m_focused_window; 2368 old_win = m_focused_window;
2369 old_screen = &old_win->screen(); 2369 old_screen = &old_win->screen();
2370 2370
2371 old_tbar = old_screen->getToolbar(); 2371 old_tbar = old_screen->toolbar();
2372 old_wkspc = old_screen->getWorkspace(old_win->workspaceNumber()); 2372 old_wkspc = old_screen->getWorkspace(old_win->workspaceNumber());
2373 2373
2374 old_win->setFocusFlag(false); 2374 old_win->setFocusFlag(false);
@@ -2385,7 +2385,7 @@ void Fluxbox::setFocusedWindow(FluxboxWindow *win) {
2385 m_focused_window = 0; // the window pointer wasn't valid, mark no window focused 2385 m_focused_window = 0; // the window pointer wasn't valid, mark no window focused
2386 } else { 2386 } else {
2387 screen = *winscreen; 2387 screen = *winscreen;
2388 tbar = screen->getToolbar(); 2388 tbar = screen->toolbar();
2389 wkspc = screen->getWorkspace(win->workspaceNumber()); 2389 wkspc = screen->getWorkspace(win->workspaceNumber());
2390 m_focused_window = win; // update focused window 2390 m_focused_window = win; // update focused window
2391 win->setFocusFlag(true); // set focus flag 2391 win->setFocusFlag(true); // set focus flag
@@ -2419,7 +2419,7 @@ void Fluxbox::revertFocus(BScreen &screen) {
2419 // Relevant resources: 2419 // Relevant resources:
2420 // resource.focus_last = whether we focus last focused when changing workspace 2420 // resource.focus_last = whether we focus last focused when changing workspace
2421 // Fluxbox::FocusModel = sloppy, click, whatever 2421 // Fluxbox::FocusModel = sloppy, click, whatever
2422 WinClient *next_focus = screen.getLastFocusedWindow(screen.getCurrentWorkspaceID()); 2422 WinClient *next_focus = screen.getLastFocusedWindow(screen.currentWorkspaceID());
2423 2423
2424 // if setting focus fails, or isn't possible, fallback correctly 2424 // if setting focus fails, or isn't possible, fallback correctly
2425 if (!(next_focus && next_focus->fbwindow() && 2425 if (!(next_focus && next_focus->fbwindow() &&