From a6551852bb5cc860c2ba62b4b70ec269dcd9eb40 Mon Sep 17 00:00:00 2001 From: mathias Date: Tue, 11 Apr 2006 18:26:00 +0000 Subject: fixed size_t issue with prevWorkspace, minor cosmetic changes to Screen.hh --- ChangeLog | 3 +++ src/Screen.cc | 2 +- src/Screen.hh | 10 +++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f62ee3..6238678 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ (Format: Year/Month/Day) Changes for 0.9.16: +*06/04/11: + * Fix calculation of prevWorkspace (Mathias) + Screen.cc *06/04/09: * Fix label background update with external tabs (Simon) FbWinFrame.cc diff --git a/src/Screen.cc b/src/Screen.cc index 4eae1b6..5dd5f9a 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1913,7 +1913,7 @@ void BScreen::nextWorkspace(const int delta) { Goes to the workspace "left" of the current */ void BScreen::prevWorkspace(const int delta) { - changeWorkspaceID( (currentWorkspaceID() - delta + numberOfWorkspaces()) % numberOfWorkspaces()); + changeWorkspaceID( (static_cast(numberOfWorkspaces()) + currentWorkspaceID() - (delta % numberOfWorkspaces())) % numberOfWorkspaces()); } /** diff --git a/src/Screen.hh b/src/Screen.hh index 13f2fb9..ffac442 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -170,15 +170,15 @@ public: /// @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; } -- cgit v0.11.2