fixed size_t issue with prevWorkspace, minor cosmetic changes to Screen.hh
mathias mathias
3 files changed,
9 insertions(+),
6 deletions(-)
M
src/Screen.cc
→
src/Screen.cc
@@ -1913,7 +1913,7 @@ /**
Goes to the workspace "left" of the current */ void BScreen::prevWorkspace(const int delta) { - changeWorkspaceID( (currentWorkspaceID() - delta + numberOfWorkspaces()) % numberOfWorkspaces()); + changeWorkspaceID( (static_cast<signed>(numberOfWorkspaces()) + currentWorkspaceID() - (delta % numberOfWorkspaces())) % numberOfWorkspaces()); } /**
M
src/Screen.hh
→
src/Screen.hh
@@ -170,15 +170,15 @@ bool isKdeDockapp(Window win) const;
/// @return true if dock app was added, else false bool addKdeDockapp(Window win); - inline unsigned int width() const { return rootWindow().width(); } - inline unsigned int height() const { return rootWindow().height(); } - inline int screenNumber() const { return rootWindow().screenNumber(); } + unsigned int width() const { return rootWindow().width(); } + unsigned int height() const { return rootWindow().height(); } + int screenNumber() const { return rootWindow().screenNumber(); } /// @return number of workspaces size_t numberOfWorkspaces() const { return m_workspaces_list.size(); } - inline const Icons &iconList() const { return m_icon_list; } - inline Icons &iconList() { return m_icon_list; } + const Icons &iconList() const { return m_icon_list; } + Icons &iconList() { return m_icon_list; } const Workspaces &getWorkspacesList() const { return m_workspaces_list; } Workspaces &getWorkspacesList() { return m_workspaces_list; }