cleaning, change getCount to numberOfWorkspace
This commit is contained in:
parent
9049dd33d3
commit
1727656e0a
8 changed files with 46 additions and 65 deletions
|
@ -47,38 +47,38 @@ void SetHeadCmd::real_execute() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendToWorkspaceCmd::real_execute() {
|
void SendToWorkspaceCmd::real_execute() {
|
||||||
if (m_workspace_num >= 0 && m_workspace_num < fbwindow().screen().getNumberOfWorkspaces())
|
fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow(), false);
|
||||||
fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow(), false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendToNextWorkspaceCmd::real_execute() {
|
void SendToNextWorkspaceCmd::real_execute() {
|
||||||
const int ws_nr =
|
const int ws_nr =
|
||||||
( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) %
|
( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) %
|
||||||
fbwindow().screen().getNumberOfWorkspaces();
|
fbwindow().screen().numberOfWorkspaces();
|
||||||
fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false);
|
fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendToPrevWorkspaceCmd::real_execute() {
|
void SendToPrevWorkspaceCmd::real_execute() {
|
||||||
int ws_nr = fbwindow().screen().currentWorkspaceID() - m_workspace_num;
|
int ws_nr = fbwindow().screen().currentWorkspaceID() - m_workspace_num;
|
||||||
if ( ws_nr < 0 ) ws_nr += fbwindow().screen().getNumberOfWorkspaces();
|
if ( ws_nr < 0 )
|
||||||
|
ws_nr += fbwindow().screen().numberOfWorkspaces();
|
||||||
fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false);
|
fbwindow().screen().sendToWorkspace(ws_nr, &fbwindow(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TakeToWorkspaceCmd::real_execute() {
|
void TakeToWorkspaceCmd::real_execute() {
|
||||||
if (m_workspace_num >= 0 && m_workspace_num < fbwindow().screen().getNumberOfWorkspaces())
|
fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow());
|
||||||
fbwindow().screen().sendToWorkspace(m_workspace_num, &fbwindow());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TakeToNextWorkspaceCmd::real_execute() {
|
void TakeToNextWorkspaceCmd::real_execute() {
|
||||||
unsigned int workspace_num=
|
unsigned int workspace_num=
|
||||||
( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) %
|
( fbwindow().screen().currentWorkspaceID() + m_workspace_num ) %
|
||||||
fbwindow().screen().getNumberOfWorkspaces();
|
fbwindow().screen().numberOfWorkspaces();
|
||||||
fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow());
|
fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TakeToPrevWorkspaceCmd::real_execute() {
|
void TakeToPrevWorkspaceCmd::real_execute() {
|
||||||
int workspace_num= fbwindow().screen().currentWorkspaceID() - m_workspace_num;
|
int workspace_num= fbwindow().screen().currentWorkspaceID() - m_workspace_num;
|
||||||
if ( workspace_num < 0 ) workspace_num+= fbwindow().screen().getNumberOfWorkspaces();
|
if ( workspace_num < 0 )
|
||||||
|
workspace_num += fbwindow().screen().numberOfWorkspaces();
|
||||||
fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow());
|
fbwindow().screen().sendToWorkspace(workspace_num, &fbwindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -877,8 +877,8 @@ void IconbarTool::addWindow(FluxboxWindow &win) {
|
||||||
void IconbarTool::updateIcons() {
|
void IconbarTool::updateIcons() {
|
||||||
std::list<FluxboxWindow *> itemlist;
|
std::list<FluxboxWindow *> itemlist;
|
||||||
// add icons to the itemlist
|
// add icons to the itemlist
|
||||||
BScreen::Icons::iterator icon_it = m_screen.getIconList().begin();
|
BScreen::Icons::iterator icon_it = m_screen.iconList().begin();
|
||||||
BScreen::Icons::iterator icon_it_end = m_screen.getIconList().end();
|
BScreen::Icons::iterator icon_it_end = m_screen.iconList().end();
|
||||||
for (; icon_it != icon_it_end; ++icon_it) {
|
for (; icon_it != icon_it_end; ++icon_it) {
|
||||||
if (mode() == ICONS)
|
if (mode() == ICONS)
|
||||||
itemlist.push_back(*icon_it);
|
itemlist.push_back(*icon_it);
|
||||||
|
@ -904,8 +904,8 @@ void IconbarTool::updateWorkspace() {
|
||||||
|
|
||||||
// add icons from current workspace
|
// add icons from current workspace
|
||||||
if (mode() != WORKSPACENOICONS) {
|
if (mode() != WORKSPACENOICONS) {
|
||||||
BScreen::Icons::iterator icon_it = m_screen.getIconList().begin();
|
BScreen::Icons::iterator icon_it = m_screen.iconList().begin();
|
||||||
BScreen::Icons::iterator icon_it_end = m_screen.getIconList().end();
|
BScreen::Icons::iterator icon_it_end = m_screen.iconList().end();
|
||||||
for (; icon_it != icon_it_end; ++icon_it) {
|
for (; icon_it != icon_it_end; ++icon_it) {
|
||||||
if ((*icon_it)->workspaceNumber() == m_screen.currentWorkspaceID())
|
if ((*icon_it)->workspaceNumber() == m_screen.currentWorkspaceID())
|
||||||
itemlist.push_back(*icon_it);
|
itemlist.push_back(*icon_it);
|
||||||
|
@ -930,8 +930,8 @@ void IconbarTool::updateAllWindows() {
|
||||||
// add icons
|
// add icons
|
||||||
if(mode() != NOICONS && mode() != WORKSPACENOICONS) {
|
if(mode() != NOICONS && mode() != WORKSPACENOICONS) {
|
||||||
full_list.insert(full_list.end(),
|
full_list.insert(full_list.end(),
|
||||||
m_screen.getIconList().begin(),
|
m_screen.iconList().begin(),
|
||||||
m_screen.getIconList().end());
|
m_screen.iconList().end());
|
||||||
}
|
}
|
||||||
|
|
||||||
removeDuplicate(m_icon_list, full_list);
|
removeDuplicate(m_icon_list, full_list);
|
||||||
|
|
|
@ -50,7 +50,7 @@ Netizen::Netizen(const BScreen &scr, Window win):
|
||||||
void Netizen::sendWorkspaceCount() {
|
void Netizen::sendWorkspaceCount() {
|
||||||
|
|
||||||
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWorkspaceCountAtom();
|
event.xclient.data.l[0] = FbAtoms::instance()->getFluxboxNotifyWorkspaceCountAtom();
|
||||||
event.xclient.data.l[1] = m_screen.getCount();
|
event.xclient.data.l[1] = m_screen.numberOfWorkspaces();
|
||||||
|
|
||||||
XSendEvent(m_display, window(), False, NoEventMask, &event);
|
XSendEvent(m_display, window(), False, NoEventMask, &event);
|
||||||
}
|
}
|
||||||
|
|
|
@ -650,9 +650,9 @@ void BScreen::hideMenus() {
|
||||||
#endif // SLIT
|
#endif // SLIT
|
||||||
|
|
||||||
// hide icon menus
|
// hide icon menus
|
||||||
if (getIconList().size()) {
|
if (iconList().size()) {
|
||||||
Icons::iterator it = getIconList().begin();
|
Icons::iterator it = iconList().begin();
|
||||||
const Icons::iterator it_end = getIconList().end();
|
const Icons::iterator it_end = iconList().end();
|
||||||
for (; it != it_end; ++it)
|
for (; it != it_end; ++it)
|
||||||
(*it)->menu().hide();
|
(*it)->menu().hide();
|
||||||
}
|
}
|
||||||
|
@ -804,7 +804,7 @@ void BScreen::addIcon(FluxboxWindow *w) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// make sure we have a unique list
|
// make sure we have a unique list
|
||||||
if (find(getIconList().begin(), getIconList().end(), w) != getIconList().end())
|
if (find(iconList().begin(), iconList().end(), w) != iconList().end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_icon_list.push_back(w);
|
m_icon_list.push_back(w);
|
||||||
|
@ -818,13 +818,13 @@ void BScreen::removeIcon(FluxboxWindow *w) {
|
||||||
if (w == 0)
|
if (w == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Icons::iterator erase_it = remove_if(getIconList().begin(),
|
Icons::iterator erase_it = remove_if(iconList().begin(),
|
||||||
getIconList().end(),
|
iconList().end(),
|
||||||
bind2nd(equal_to<FluxboxWindow *>(), w));
|
bind2nd(equal_to<FluxboxWindow *>(), w));
|
||||||
// no need to send iconlist signal if we didn't
|
// no need to send iconlist signal if we didn't
|
||||||
// change the iconlist
|
// change the iconlist
|
||||||
if (erase_it != m_icon_list.end()) {
|
if (erase_it != m_icon_list.end()) {
|
||||||
getIconList().erase(erase_it);
|
iconList().erase(erase_it);
|
||||||
m_iconlist_sig.notify();
|
m_iconlist_sig.notify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1354,7 +1354,7 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id,
|
||||||
if (w == 0)
|
if (w == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (wkspc_id >= getCount())
|
if (wkspc_id >= numberOfWorkspaces())
|
||||||
wkspc_id = currentWorkspace()->workspaceID();
|
wkspc_id = currentWorkspace()->workspaceID();
|
||||||
|
|
||||||
if (!w->isIconic() && w->workspaceNumber() == wkspc_id)
|
if (!w->isIconic() && w->workspaceNumber() == wkspc_id)
|
||||||
|
@ -1992,21 +1992,21 @@ void BScreen::setLayer(FbTk::XLayerItem &item, int layernum) {
|
||||||
Goes to the workspace "right" of the current
|
Goes to the workspace "right" of the current
|
||||||
*/
|
*/
|
||||||
void BScreen::nextWorkspace(const int delta) {
|
void BScreen::nextWorkspace(const int delta) {
|
||||||
changeWorkspaceID( (currentWorkspaceID() + delta) % getCount());
|
changeWorkspaceID( (currentWorkspaceID() + delta) % numberOfWorkspaces());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Goes to the workspace "left" of the current
|
Goes to the workspace "left" of the current
|
||||||
*/
|
*/
|
||||||
void BScreen::prevWorkspace(const int delta) {
|
void BScreen::prevWorkspace(const int delta) {
|
||||||
changeWorkspaceID( (currentWorkspaceID() - delta + getCount()) % getCount());
|
changeWorkspaceID( (currentWorkspaceID() - delta + numberOfWorkspaces()) % numberOfWorkspaces());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Goes to the workspace "right" of the current
|
Goes to the workspace "right" of the current
|
||||||
*/
|
*/
|
||||||
void BScreen::rightWorkspace(const int delta) {
|
void BScreen::rightWorkspace(const int delta) {
|
||||||
if (currentWorkspaceID()+delta < getCount())
|
if (currentWorkspaceID()+delta < numberOfWorkspaces())
|
||||||
changeWorkspaceID(currentWorkspaceID()+delta);
|
changeWorkspaceID(currentWorkspaceID()+delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2152,7 +2152,7 @@ void BScreen::notifyReleasedKeys(XKeyEvent &ke) {
|
||||||
*/
|
*/
|
||||||
WinClient *BScreen::getLastFocusedWindow(int workspace) {
|
WinClient *BScreen::getLastFocusedWindow(int workspace) {
|
||||||
if (focused_list.empty()) return 0;
|
if (focused_list.empty()) return 0;
|
||||||
if (workspace < 0 || workspace >= (int) getCount())
|
if (workspace < 0 || workspace >= (int) numberOfWorkspaces())
|
||||||
return focused_list.front();
|
return focused_list.front();
|
||||||
|
|
||||||
FocusedWindows::iterator it = focused_list.begin();
|
FocusedWindows::iterator it = focused_list.begin();
|
||||||
|
|
|
@ -125,17 +125,15 @@ public:
|
||||||
inline const std::string &windowMenuFilename() const { return *resource.windowmenufile; }
|
inline const std::string &windowMenuFilename() const { return *resource.windowmenufile; }
|
||||||
inline FbTk::ImageControl &imageControl() { return *m_image_control.get(); }
|
inline FbTk::ImageControl &imageControl() { return *m_image_control.get(); }
|
||||||
// menus
|
// menus
|
||||||
const FbTk::Menu &getRootmenu() const { return *m_rootmenu.get(); }
|
const FbTk::Menu &rootMenu() const { return *m_rootmenu.get(); }
|
||||||
FbTk::Menu &getRootmenu() { return *m_rootmenu.get(); }
|
FbTk::Menu &rootMenu() { return *m_rootmenu.get(); }
|
||||||
const FbTk::Menu &configMenu() const { return *m_configmenu.get(); }
|
const FbTk::Menu &configMenu() const { return *m_configmenu.get(); }
|
||||||
FbTk::Menu &configMenu() { return *m_configmenu.get(); }
|
FbTk::Menu &configMenu() { return *m_configmenu.get(); }
|
||||||
const FbTk::Menu &windowMenu() const { return *m_windowmenu.get(); }
|
const FbTk::Menu &windowMenu() const { return *m_windowmenu.get(); }
|
||||||
FbTk::Menu &windowMenu() { return *m_windowmenu.get(); }
|
FbTk::Menu &windowMenu() { return *m_windowmenu.get(); }
|
||||||
|
|
||||||
ExtraMenus &extraWindowMenus() { return m_extramenus; }
|
ExtraMenus &extraWindowMenus() { return m_extramenus; }
|
||||||
const ExtraMenus &extraWindowMenus() const { return m_extramenus; }
|
const ExtraMenus &extraWindowMenus() const { return m_extramenus; }
|
||||||
|
|
||||||
inline const std::string &getRootCommand() const { return *resource.rootcommand; }
|
|
||||||
inline ResizeModel getResizeModel() const { return *resource.resize_model; }
|
inline ResizeModel getResizeModel() const { return *resource.resize_model; }
|
||||||
inline FocusModel getFocusModel() const { return *resource.focus_model; }
|
inline FocusModel getFocusModel() const { return *resource.focus_model; }
|
||||||
inline FollowModel getFollowModel() const { return *resource.follow_model; }
|
inline FollowModel getFollowModel() const { return *resource.follow_model; }
|
||||||
|
@ -147,8 +145,8 @@ public:
|
||||||
inline Workspace *currentWorkspace() { return m_current_workspace; }
|
inline Workspace *currentWorkspace() { return m_current_workspace; }
|
||||||
inline const Workspace *currentWorkspace() const { return m_current_workspace; }
|
inline const Workspace *currentWorkspace() const { return m_current_workspace; }
|
||||||
|
|
||||||
const FbTk::Menu &getWorkspacemenu() const { return *m_workspacemenu.get(); }
|
const FbTk::Menu &workspaceMenu() const { return *m_workspacemenu.get(); }
|
||||||
FbTk::Menu &getWorkspacemenu() { return *m_workspacemenu.get(); }
|
FbTk::Menu &workspaceMenu() { return *m_workspacemenu.get(); }
|
||||||
|
|
||||||
|
|
||||||
unsigned int currentWorkspaceID() const;
|
unsigned int currentWorkspaceID() const;
|
||||||
|
@ -169,11 +167,10 @@ public:
|
||||||
inline int screenNumber() const { return rootWindow().screenNumber(); }
|
inline int screenNumber() const { return rootWindow().screenNumber(); }
|
||||||
|
|
||||||
/// @return number of workspaces
|
/// @return number of workspaces
|
||||||
inline unsigned int getCount() const { return m_workspaces_list.size(); }
|
unsigned int numberOfWorkspaces() const { return m_workspaces_list.size(); }
|
||||||
/// @return number of icons
|
|
||||||
inline unsigned int getIconCount() const { return m_icon_list.size(); }
|
inline const Icons &iconList() const { return m_icon_list; }
|
||||||
inline const Icons &getIconList() const { return m_icon_list; }
|
inline Icons &iconList() { return m_icon_list; }
|
||||||
inline Icons &getIconList() { return m_icon_list; }
|
|
||||||
inline const FocusedWindows &getFocusedList() const { return focused_list; }
|
inline const FocusedWindows &getFocusedList() const { return focused_list; }
|
||||||
inline FocusedWindows &getFocusedList() { return focused_list; }
|
inline FocusedWindows &getFocusedList() { return focused_list; }
|
||||||
WinClient *getLastFocusedWindow(int workspace = -1);
|
WinClient *getLastFocusedWindow(int workspace = -1);
|
||||||
|
@ -215,9 +212,6 @@ public:
|
||||||
/// hide all windowmenus except the given one (if given)
|
/// hide all windowmenus except the given one (if given)
|
||||||
void hideWindowMenus(const FluxboxWindow* except= 0);
|
void hideWindowMenus(const FluxboxWindow* except= 0);
|
||||||
|
|
||||||
/// @return the resource value of number of workspace
|
|
||||||
inline int getNumberOfWorkspaces() const { return *resource.workspaces; }
|
|
||||||
|
|
||||||
inline PlacementPolicy getPlacementPolicy() const { return *resource.placement_policy; }
|
inline PlacementPolicy getPlacementPolicy() const { return *resource.placement_policy; }
|
||||||
inline int getEdgeSnapThreshold() const { return *resource.edge_snap_threshold; }
|
inline int getEdgeSnapThreshold() const { return *resource.edge_snap_threshold; }
|
||||||
inline RowDirection getRowPlacementDirection() const { return *resource.row_direction; }
|
inline RowDirection getRowPlacementDirection() const { return *resource.row_direction; }
|
||||||
|
|
|
@ -503,7 +503,7 @@ void FluxboxWindow::init() {
|
||||||
|
|
||||||
restoreAttributes();
|
restoreAttributes();
|
||||||
|
|
||||||
if (m_workspace_number < 0 || m_workspace_number >= screen().getCount())
|
if (m_workspace_number < 0 || m_workspace_number >= screen().numberOfWorkspaces())
|
||||||
m_workspace_number = screen().currentWorkspaceID();
|
m_workspace_number = screen().currentWorkspaceID();
|
||||||
|
|
||||||
bool place_window = (m_old_pos_x == 0);
|
bool place_window = (m_old_pos_x == 0);
|
||||||
|
@ -2198,7 +2198,7 @@ void FluxboxWindow::restoreAttributes() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (( m_blackbox_attrib.workspace != screen().currentWorkspaceID()) &&
|
if (( m_blackbox_attrib.workspace != screen().currentWorkspaceID()) &&
|
||||||
( m_blackbox_attrib.workspace < screen().getCount()))
|
( m_blackbox_attrib.workspace < screen().numberOfWorkspaces()))
|
||||||
m_workspace_number = m_blackbox_attrib.workspace;
|
m_workspace_number = m_blackbox_attrib.workspace;
|
||||||
|
|
||||||
if (m_blackbox_attrib.flags & ATTRIB_OMNIPRESENT &&
|
if (m_blackbox_attrib.flags & ATTRIB_OMNIPRESENT &&
|
||||||
|
@ -2267,8 +2267,6 @@ void FluxboxWindow::popupMenu() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowCmd<void>::setWindow(this);
|
|
||||||
|
|
||||||
menu().disableTitle();
|
menu().disableTitle();
|
||||||
int menu_y = frame().titlebar().height() + frame().titlebar().borderWidth();
|
int menu_y = frame().titlebar().height() + frame().titlebar().borderWidth();
|
||||||
if (!decorations.titlebar) // if we don't have any titlebar
|
if (!decorations.titlebar) // if we don't have any titlebar
|
||||||
|
@ -2278,13 +2276,6 @@ void FluxboxWindow::popupMenu() {
|
||||||
showMenu(m_last_button_x, menu_y + frame().y());
|
showMenu(m_last_button_x, menu_y + frame().y());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
Determine if this is the lowest tab of them all
|
|
||||||
*/
|
|
||||||
bool FluxboxWindow::isLowerTab() const {
|
|
||||||
cerr<<__FILE__<<"(FluxboxWindow::isLowerTab()) TODO!"<<endl;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Redirect any unhandled event to our handlers
|
Redirect any unhandled event to our handlers
|
||||||
|
@ -2754,12 +2745,12 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
|
||||||
if (me.x_root >= int(screen().width()) - warpPad - 1 &&
|
if (me.x_root >= int(screen().width()) - warpPad - 1 &&
|
||||||
moved_x > 0) {
|
moved_x > 0) {
|
||||||
//warp right
|
//warp right
|
||||||
new_id = (cur_id + 1) % screen().getCount();
|
new_id = (cur_id + 1) % screen().numberOfWorkspaces();
|
||||||
dx = - me.x_root; // move mouse back to x=0
|
dx = - me.x_root; // move mouse back to x=0
|
||||||
} else if (me.x_root <= warpPad &&
|
} else if (me.x_root <= warpPad &&
|
||||||
moved_x < 0) {
|
moved_x < 0) {
|
||||||
//warp left
|
//warp left
|
||||||
new_id = (cur_id + screen().getCount() - 1) % screen().getCount();
|
new_id = (cur_id + screen().numberOfWorkspaces() - 1) % screen().numberOfWorkspaces();
|
||||||
dx = screen().width() - me.x_root-1; // move mouse to screen width - 1
|
dx = screen().width() - me.x_root-1; // move mouse to screen width - 1
|
||||||
}
|
}
|
||||||
if (new_id != cur_id) {
|
if (new_id != cur_id) {
|
||||||
|
|
|
@ -340,7 +340,6 @@ public:
|
||||||
|
|
||||||
unsigned int titlebarHeight() const;
|
unsigned int titlebarHeight() const;
|
||||||
|
|
||||||
bool isLowerTab() const;
|
|
||||||
int initialState() const;
|
int initialState() const;
|
||||||
|
|
||||||
inline FbWinFrame &frame() { return m_frame; }
|
inline FbWinFrame &frame() { return m_frame; }
|
||||||
|
|
|
@ -931,10 +931,10 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) {
|
||||||
if (! screen->isRootColormapInstalled())
|
if (! screen->isRootColormapInstalled())
|
||||||
screen->imageControl().installRootColormap();
|
screen->imageControl().installRootColormap();
|
||||||
// hide menus
|
// hide menus
|
||||||
if (screen->getRootmenu().isVisible())
|
if (screen->rootMenu().isVisible())
|
||||||
screen->getRootmenu().hide();
|
screen->rootMenu().hide();
|
||||||
if (screen->getWorkspacemenu().isVisible())
|
if (screen->workspaceMenu().isVisible())
|
||||||
screen->getWorkspacemenu().hide();
|
screen->workspaceMenu().hide();
|
||||||
|
|
||||||
} else if (be.button == 2) {
|
} else if (be.button == 2) {
|
||||||
FbCommands::ShowWorkspaceMenuCmd cmd;
|
FbCommands::ShowWorkspaceMenuCmd cmd;
|
||||||
|
@ -1033,7 +1033,7 @@ void Fluxbox::handleClientMessage(XClientMessageEvent &ce) {
|
||||||
BScreen *screen = searchScreen(ce.window);
|
BScreen *screen = searchScreen(ce.window);
|
||||||
|
|
||||||
if (screen && ce.data.l[0] >= 0 &&
|
if (screen && ce.data.l[0] >= 0 &&
|
||||||
ce.data.l[0] < (signed)screen->getCount())
|
ce.data.l[0] < (signed)screen->numberOfWorkspaces())
|
||||||
screen->changeWorkspaceID(ce.data.l[0]);
|
screen->changeWorkspaceID(ce.data.l[0]);
|
||||||
|
|
||||||
} else if (ce.message_type == m_fbatoms->getFluxboxChangeWindowFocusAtom()) {
|
} else if (ce.message_type == m_fbatoms->getFluxboxChangeWindowFocusAtom()) {
|
||||||
|
@ -1468,7 +1468,7 @@ void Fluxbox::save_rc() {
|
||||||
sprintf(rc_string, "session.screen%d.workspaceNames: ", screen_number);
|
sprintf(rc_string, "session.screen%d.workspaceNames: ", screen_number);
|
||||||
string workspaces_string(rc_string);
|
string workspaces_string(rc_string);
|
||||||
|
|
||||||
for (unsigned int workspace=0; workspace < screen->getCount(); workspace++) {
|
for (unsigned int workspace=0; workspace < screen->numberOfWorkspaces(); workspace++) {
|
||||||
if (screen->getWorkspace(workspace)->name().size()!=0)
|
if (screen->getWorkspace(workspace)->name().size()!=0)
|
||||||
workspaces_string.append(screen->getWorkspace(workspace)->name());
|
workspaces_string.append(screen->getWorkspace(workspace)->name());
|
||||||
else
|
else
|
||||||
|
@ -1575,10 +1575,7 @@ void Fluxbox::load_rc(BScreen &screen) {
|
||||||
sprintf(class_lookup, "Session.Screen%d.WorkspaceNames", screen_number);
|
sprintf(class_lookup, "Session.Screen%d.WorkspaceNames", screen_number);
|
||||||
if (XrmGetResource(*database, name_lookup, class_lookup, &value_type,
|
if (XrmGetResource(*database, name_lookup, class_lookup, &value_type,
|
||||||
&value)) {
|
&value)) {
|
||||||
#ifdef DEBUG
|
|
||||||
cerr<<__FILE__<<"("<<__FUNCTION__<<"): Workspaces="<<
|
|
||||||
screen.getNumberOfWorkspaces()<<endl;
|
|
||||||
#endif // DEBUG
|
|
||||||
string values(value.addr);
|
string values(value.addr);
|
||||||
BScreen::WorkspaceNames names;
|
BScreen::WorkspaceNames names;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue