summaryrefslogtreecommitdiff
path: root/unity-shared
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2015-10-21 16:28:00 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2015-10-21 16:28:00 +0200
commita17a9ae3b1d4edf3af86759435cb5b2f963ead10 (patch)
tree6da9eca43902cfefa34e962ae7414d55a5cef215 /unity-shared
parent690f984f34a38f318a218239af9cd25207b0481c (diff)
WindowManager: add GetCachedCursor function
It wraps CompScreen::cusorCache (bzr r4008.8.5)
Diffstat (limited to 'unity-shared')
-rw-r--r--unity-shared/PluginAdapter.cpp5
-rw-r--r--unity-shared/PluginAdapter.h2
-rw-r--r--unity-shared/StandaloneWindowManager.cpp5
-rw-r--r--unity-shared/StandaloneWindowManager.h2
-rw-r--r--unity-shared/WindowManager.h2
5 files changed, 16 insertions, 0 deletions
diff --git a/unity-shared/PluginAdapter.cpp b/unity-shared/PluginAdapter.cpp
index 9239b12e7..8e4f0d46d 100644
--- a/unity-shared/PluginAdapter.cpp
+++ b/unity-shared/PluginAdapter.cpp
@@ -1486,6 +1486,11 @@ void PluginAdapter::OnWindowClosed(CompWindow *w)
_last_focused_window = NULL;
}
+Cursor PluginAdapter::GetCachedCursor(unsigned int cursor_name) const
+{
+ return screen->cursorCache(cursor_name);
+}
+
void PluginAdapter::UnmapAllNoNuxWindowsSync()
{
for (auto const& window : m_Screen->windows())
diff --git a/unity-shared/PluginAdapter.h b/unity-shared/PluginAdapter.h
index 1c1eb3a2b..3445d27e7 100644
--- a/unity-shared/PluginAdapter.h
+++ b/unity-shared/PluginAdapter.h
@@ -194,6 +194,8 @@ public:
Window GetTopWindowAbove(Window xid) const;
+ Cursor GetCachedCursor(unsigned int) const;
+
void UnmapAllNoNuxWindowsSync();
static bool IsNuxWindow(CompWindow* value);
diff --git a/unity-shared/StandaloneWindowManager.cpp b/unity-shared/StandaloneWindowManager.cpp
index de318c5c1..3e9a63c93 100644
--- a/unity-shared/StandaloneWindowManager.cpp
+++ b/unity-shared/StandaloneWindowManager.cpp
@@ -742,6 +742,11 @@ std::list<StandaloneWindow::Ptr> StandaloneWindowManager::GetStandaloneWindows()
return standalone_windows_;
}
+Cursor StandaloneWindowManager::GetCachedCursor(unsigned int cursor_name) const
+{
+ return 0;
+}
+
void StandaloneWindowManager::SetCurrentViewport(nux::Point const& vp)
{
current_vp_ = vp;
diff --git a/unity-shared/StandaloneWindowManager.h b/unity-shared/StandaloneWindowManager.h
index ebdf6bbab..295cdfc81 100644
--- a/unity-shared/StandaloneWindowManager.h
+++ b/unity-shared/StandaloneWindowManager.h
@@ -181,6 +181,8 @@ public:
void SetCurrentViewport(nux::Point const& vp);
void SetWorkareaGeometry(nux::Geometry const& geo);
+ Cursor GetCachedCursor(unsigned int cursor_name) const;
+
void ResetStatus();
protected:
diff --git a/unity-shared/WindowManager.h b/unity-shared/WindowManager.h
index 9cee0c405..da29a7b39 100644
--- a/unity-shared/WindowManager.h
+++ b/unity-shared/WindowManager.h
@@ -171,6 +171,8 @@ public:
virtual std::string GetStringProperty(Window, Atom) const = 0;
virtual std::vector<long> GetCardinalProperty(Window, Atom) const = 0;
+ virtual Cursor GetCachedCursor(unsigned int cursor_name) const = 0;
+
virtual void UnmapAllNoNuxWindowsSync() = 0;