summaryrefslogtreecommitdiff
diff options
authorsmspillaz <sam.spilsbury@canonical.com>2012-04-18 17:19:44 +0800
committersmspillaz <sam.spilsbury@canonical.com>2012-04-18 17:19:44 +0800
commitec8f0363fbf06759244b90197482759f360403bb (patch)
tree6186ec73d27207fa54fb2bdf7f121bccaca20c3d
parent9ae7fdff4d0d27b37f05de24320e97667de60cb7 (diff)
Make the minimize handler use the same mechanism
(bzr r2294.1.2)
-rw-r--r--plugins/unityshell/src/UnityShowdesktopHandler.cpp5
-rw-r--r--plugins/unityshell/src/UnityShowdesktopHandler.h7
-rw-r--r--plugins/unityshell/src/compizminimizedwindowhandler.h8
-rw-r--r--plugins/unityshell/src/inputremover.h13
-rw-r--r--plugins/unityshell/src/minimizedwindowhandler.cpp26
-rw-r--r--plugins/unityshell/src/minimizedwindowhandler.h2
-rw-r--r--plugins/unityshell/src/unityshell.cpp5
-rw-r--r--plugins/unityshell/src/unityshell.h1
-rw-r--r--tests/test-minimize-window-handler/test-minimize-handler.cpp19
-rw-r--r--tests/test_showdesktop_handler.cpp37
10 files changed, 74 insertions, 49 deletions
diff --git a/plugins/unityshell/src/UnityShowdesktopHandler.cpp b/plugins/unityshell/src/UnityShowdesktopHandler.cpp
index 3bbd1c41d..df448fdf5 100644
--- a/plugins/unityshell/src/UnityShowdesktopHandler.cpp
+++ b/plugins/unityshell/src/UnityShowdesktopHandler.cpp
@@ -79,8 +79,9 @@ ShowdesktopHandler::InhibitingXid()
return inhibiting_xid;
}
-ShowdesktopHandler::ShowdesktopHandler (ShowdesktopHandlerWindowInterface *wi) :
+ShowdesktopHandler::ShowdesktopHandler (ShowdesktopHandlerWindowInterface *wi, compiz::WindowInputRemoverLockAcquireInterface *lock_acquire_interface) :
showdesktop_handler_window_interface_ (wi),
+ lock_acquire_interface_ (lock_acquire_interface),
remover_ (),
state_ (StateVisible),
progress_ (0.0f)
@@ -105,7 +106,7 @@ void ShowdesktopHandler::FadeOut()
{
showdesktop_handler_window_interface_->Hide();
showdesktop_handler_window_interface_->NotifyHidden();
- remover_ = showdesktop_handler_window_interface_->InputRemover ();
+ remover_ = lock_acquire_interface_->InputRemover ();
if (std::find (animating_windows.begin(),
animating_windows.end(),
diff --git a/plugins/unityshell/src/UnityShowdesktopHandler.h b/plugins/unityshell/src/UnityShowdesktopHandler.h
index 743458642..820fdafd4 100644
--- a/plugins/unityshell/src/UnityShowdesktopHandler.h
+++ b/plugins/unityshell/src/UnityShowdesktopHandler.h
@@ -71,8 +71,6 @@ class ShowdesktopHandlerWindowInterface
unsigned int NoCoreInstanceMask () { return GetNoCoreInstanceMask (); }
- compiz::WindowInputRemoverLock::Ptr InputRemover () { return GetInputRemover (); }
-
private:
virtual void DoEnableFocus () = 0;
@@ -104,15 +102,13 @@ class ShowdesktopHandlerWindowInterface
virtual void DoDeleteHandler () = 0;
virtual unsigned int GetNoCoreInstanceMask () = 0;
-
- virtual compiz::WindowInputRemoverLock::Ptr GetInputRemover () = 0;
};
class ShowdesktopHandler
{
public:
- ShowdesktopHandler (ShowdesktopHandlerWindowInterface *uwi);
+ ShowdesktopHandler (ShowdesktopHandlerWindowInterface *uwi, compiz::WindowInputRemoverLockAcquireInterface *lock_acquire_interface);
~ShowdesktopHandler ();
typedef enum {
@@ -145,6 +141,7 @@ public:
private:
ShowdesktopHandlerWindowInterface *showdesktop_handler_window_interface_;
+ compiz::WindowInputRemoverLockAcquireInterface *lock_acquire_interface_;
compiz::WindowInputRemoverLock::Ptr remover_;
ShowdesktopHandler::State state_;
float progress_;
diff --git a/plugins/unityshell/src/compizminimizedwindowhandler.h b/plugins/unityshell/src/compizminimizedwindowhandler.h
index 3c5bebf64..26d7e2706 100644
--- a/plugins/unityshell/src/compizminimizedwindowhandler.h
+++ b/plugins/unityshell/src/compizminimizedwindowhandler.h
@@ -46,7 +46,7 @@ class CompizMinimizedWindowHandler:
{
public:
- CompizMinimizedWindowHandler (CompWindow *w);
+ CompizMinimizedWindowHandler (CompWindow *w, compiz::WindowInputRemoverLockAcquireInterface *lock_acquire);
~CompizMinimizedWindowHandler ();
void setVisibility (bool visible);
@@ -92,8 +92,8 @@ template <typename Screen, typename Window>
bool compiz::CompizMinimizedWindowHandler<Screen, Window>::handleEvents = true;
template <typename Screen, typename Window>
-compiz::CompizMinimizedWindowHandler<Screen, Window>::CompizMinimizedWindowHandler(CompWindow *w) :
- MinimizedWindowHandler (screen->dpy (), w->id ())
+compiz::CompizMinimizedWindowHandler<Screen, Window>::CompizMinimizedWindowHandler(CompWindow *w, compiz::WindowInputRemoverLockAcquireInterface *lock_acquire) :
+ MinimizedWindowHandler (screen->dpy (), w->id (), lock_acquire)
{
priv = new PrivateCompizMinimizedWindowHandler ();
@@ -159,7 +159,7 @@ compiz::CompizMinimizedWindowHandler<Screen, Window>::minimize ()
{
Window *w = Window::get (win);
if (!w->mMinimizeHandler)
- w->mMinimizeHandler.reset (new Type (win));
+ w->mMinimizeHandler.reset (new Type (win, w));
w->mMinimizeHandler->minimize ();
}
}
diff --git a/plugins/unityshell/src/inputremover.h b/plugins/unityshell/src/inputremover.h
index b0275c778..4bb0535d1 100644
--- a/plugins/unityshell/src/inputremover.h
+++ b/plugins/unityshell/src/inputremover.h
@@ -116,6 +116,19 @@ class WindowInputRemoverLock
WindowInputRemoverInterface *remover_;
};
+class WindowInputRemoverLockAcquireInterface
+{
+public:
+
+ virtual ~WindowInputRemoverLockAcquireInterface () {}
+
+ WindowInputRemoverLock::Ptr InputRemover () { return GetInputRemover (); }
+
+private:
+
+ virtual WindowInputRemoverLock::Ptr GetInputRemover () = 0;
+};
+
}
#endif
diff --git a/plugins/unityshell/src/minimizedwindowhandler.cpp b/plugins/unityshell/src/minimizedwindowhandler.cpp
index 761287f37..083cc6ddd 100644
--- a/plugins/unityshell/src/minimizedwindowhandler.cpp
+++ b/plugins/unityshell/src/minimizedwindowhandler.cpp
@@ -20,6 +20,7 @@
*/
#include "minimizedwindowhandler.h"
+#include "inputremover.h"
#include <cstring>
namespace compiz
@@ -35,7 +36,8 @@ public:
std::list <MinimizedWindowHandler::Ptr> mTransients;
- WindowInputRemover *mRemover;
+ WindowInputRemoverLock::Ptr mRemover;
+ WindowInputRemoverLockAcquireInterface *mLockAcquire;
};
}
@@ -56,19 +58,13 @@ compiz::MinimizedWindowHandler::setVisibility (bool visible, Window shapeWin)
{
if (!visible && !priv->mRemover)
{
- priv->mRemover = new compiz::WindowInputRemover (priv->mDpy, shapeWin);
+ priv->mRemover = priv->mLockAcquire->InputRemover ();
if (!priv->mRemover)
return;
-
- if (priv->mRemover->save ())
- priv->mRemover->remove ();
}
else if (visible && priv->mRemover)
{
- priv->mRemover->restore ();
-
- delete priv->mRemover;
- priv->mRemover = NULL;
+ priv->mRemover.reset ();
}
}
@@ -99,7 +95,7 @@ compiz::MinimizedWindowHandler::minimize ()
Window root = DefaultRootWindow (priv->mDpy), parent = priv->mXid, lastParent = priv->mXid;
Window *children;
unsigned int nchildren;
- compiz::MinimizedWindowHandler::Ptr holder = compiz::MinimizedWindowHandler::Ptr (new compiz::MinimizedWindowHandler (priv->mDpy, 0));
+ compiz::MinimizedWindowHandler::Ptr holder = compiz::MinimizedWindowHandler::Ptr (new compiz::MinimizedWindowHandler (priv->mDpy, 0, priv->mLockAcquire));
auto predicate_this = boost::bind (&compiz::MinimizedWindowHandler::contains, this, _1);
auto predicate_holder = !boost::bind (&compiz::MinimizedWindowHandler::contains, holder.get (), _1);
@@ -107,7 +103,7 @@ compiz::MinimizedWindowHandler::minimize ()
for (unsigned int &w : transients)
{
- compiz::MinimizedWindowHandler::Ptr p = compiz::MinimizedWindowHandler::Ptr (new compiz::MinimizedWindowHandler (priv->mDpy, w));
+ compiz::MinimizedWindowHandler::Ptr p = compiz::MinimizedWindowHandler::Ptr (new compiz::MinimizedWindowHandler (priv->mDpy, w, priv->mLockAcquire));
holder->priv->mTransients.push_back (p);
}
@@ -180,7 +176,7 @@ compiz::MinimizedWindowHandler::unminimize ()
Window root = DefaultRootWindow (priv->mDpy), parent = priv->mXid, lastParent = priv->mXid;
Window *children;
unsigned int nchildren;
- compiz::MinimizedWindowHandler::Ptr holder = compiz::MinimizedWindowHandler::Ptr (new compiz::MinimizedWindowHandler (priv->mDpy, 0));
+ compiz::MinimizedWindowHandler::Ptr holder = compiz::MinimizedWindowHandler::Ptr (new compiz::MinimizedWindowHandler (priv->mDpy, 0, priv->mLockAcquire));
auto predicate_this = boost::bind (&compiz::MinimizedWindowHandler::contains, this, _1);
auto predicate_holder = !boost::bind (&compiz::MinimizedWindowHandler::contains, holder.get (), _1);
@@ -188,7 +184,7 @@ compiz::MinimizedWindowHandler::unminimize ()
for (unsigned int &w : transients)
{
- compiz::MinimizedWindowHandler::Ptr p = compiz::MinimizedWindowHandler::Ptr (new compiz::MinimizedWindowHandler (priv->mDpy, w));
+ compiz::MinimizedWindowHandler::Ptr p = compiz::MinimizedWindowHandler::Ptr (new compiz::MinimizedWindowHandler (priv->mDpy, w, priv->mLockAcquire));
holder->priv->mTransients.push_back (p);
}
@@ -264,13 +260,13 @@ compiz::MinimizedWindowHandler::unminimize ()
XDeleteProperty (priv->mDpy, priv->mXid, netWmState);
}
-compiz::MinimizedWindowHandler::MinimizedWindowHandler (Display *dpy, unsigned int xid)
+compiz::MinimizedWindowHandler::MinimizedWindowHandler (Display *dpy, unsigned int xid, compiz::WindowInputRemoverLockAcquireInterface *lock_acquire)
{
priv = new PrivateMinimizedWindowHandler;
priv->mDpy = dpy;
priv->mXid = xid;
- priv->mRemover = NULL;
+ priv->mLockAcquire = lock_acquire;
}
compiz::MinimizedWindowHandler::~MinimizedWindowHandler ()
diff --git a/plugins/unityshell/src/minimizedwindowhandler.h b/plugins/unityshell/src/minimizedwindowhandler.h
index a7dcf9d98..ecfc1be9e 100644
--- a/plugins/unityshell/src/minimizedwindowhandler.h
+++ b/plugins/unityshell/src/minimizedwindowhandler.h
@@ -38,7 +38,7 @@ class MinimizedWindowHandler
{
public:
- MinimizedWindowHandler (Display *dpy, unsigned int xid);
+ MinimizedWindowHandler (Display *dpy, unsigned int xid, compiz::WindowInputRemoverLockAcquireInterface *lock_acquire);
virtual ~MinimizedWindowHandler ();
virtual void minimize ();
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 48b615289..40465e613 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -1040,7 +1040,8 @@ void UnityScreen::leaveShowDesktopMode (CompWindow *w)
void UnityWindow::enterShowDesktop ()
{
if (!mShowdesktopHandler)
- mShowdesktopHandler = new ShowdesktopHandler (static_cast <ShowdesktopHandlerWindowInterface *> (this));
+ mShowdesktopHandler = new ShowdesktopHandler (static_cast <ShowdesktopHandlerWindowInterface *> (this),
+ static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (this));
window->setShowDesktopMode (true);
mShowdesktopHandler->FadeOut ();
@@ -2289,7 +2290,7 @@ UnityWindow::minimize ()
if (!mMinimizeHandler)
{
- mMinimizeHandler.reset (new UnityMinimizedHandler (window));
+ mMinimizeHandler.reset (new UnityMinimizedHandler (window, this));
mMinimizeHandler->minimize ();
}
}
diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h
index 8cf28239d..2275bc0bb 100644
--- a/plugins/unityshell/src/unityshell.h
+++ b/plugins/unityshell/src/unityshell.h
@@ -319,6 +319,7 @@ class UnityWindow :
public WindowInterface,
public GLWindowInterface,
public ShowdesktopHandlerWindowInterface,
+ public compiz::WindowInputRemoverLockAcquireInterface,
public BaseSwitchWindow,
public PluginClassHandler <UnityWindow, CompWindow>
{
diff --git a/tests/test-minimize-window-handler/test-minimize-handler.cpp b/tests/test-minimize-window-handler/test-minimize-handler.cpp
index d45c5012b..e73dbc225 100644
--- a/tests/test-minimize-window-handler/test-minimize-handler.cpp
+++ b/tests/test-minimize-window-handler/test-minimize-handler.cpp
@@ -35,7 +35,8 @@
#include <x11-window-read-transients.h>
class X11WindowFakeMinimizable :
- public X11WindowReadTransients
+ public X11WindowReadTransients,
+ public compiz::WindowInputRemoverLockAcquireInterface
{
public:
@@ -50,9 +51,23 @@ class X11WindowFakeMinimizable :
private:
+ compiz::WindowInputRemoverLock::Ptr GetInputRemover ();
+
+ compiz::WindowInputRemoverLock::Weak input_remover_;
compiz::MinimizedWindowHandler::Ptr mMinimizedHandler;
};
+compiz::WindowInputRemoverLock::Ptr
+X11WindowFakeMinimizable::GetInputRemover ()
+{
+ if (!input_remover_.expired ())
+ return input_remover_.lock ();
+
+ compiz::WindowInputRemoverLock::Ptr ret (new compiz::WindowInputRemoverLock (new compiz::WindowInputRemover (mDpy, mXid)));
+ input_remover_ = ret;
+ return ret;
+}
+
X11WindowFakeMinimizable::X11WindowFakeMinimizable (Display *d, Window id) :
X11WindowReadTransients (d, id)
{
@@ -74,7 +89,7 @@ X11WindowFakeMinimizable::minimize ()
if (!mMinimizedHandler)
{
printf ("Fake minimize window 0x%x\n", (unsigned int) mXid);
- mMinimizedHandler = compiz::MinimizedWindowHandler::Ptr (new compiz::MinimizedWindowHandler (mDpy, mXid));
+ mMinimizedHandler = compiz::MinimizedWindowHandler::Ptr (new compiz::MinimizedWindowHandler (mDpy, mXid, this));
mMinimizedHandler->minimize ();
}
}
diff --git a/tests/test_showdesktop_handler.cpp b/tests/test_showdesktop_handler.cpp
index f6402a6d3..5238b8158 100644
--- a/tests/test_showdesktop_handler.cpp
+++ b/tests/test_showdesktop_handler.cpp
@@ -50,7 +50,8 @@ public:
class MockUnityShowdesktopHandlerWindow :
- public ShowdesktopHandlerWindowInterface
+ public ShowdesktopHandlerWindowInterface,
+ public compiz::WindowInputRemoverLockAcquireInterface
{
public:
@@ -99,7 +100,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestNoORWindowsSD)
{
MockUnityShowdesktopHandlerWindow mMockWindow;
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsOverrideRedirect ()).WillOnce (Return (true));
EXPECT_FALSE (ShowdesktopHandler::ShouldHide (&mMockWindow));
@@ -109,7 +110,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestNoUnmanagedWindowsSD)
{
MockUnityShowdesktopHandlerWindow mMockWindow;
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsOverrideRedirect ());
EXPECT_CALL (mMockWindow, IsManaged ()).WillOnce (Return (false));
@@ -120,7 +121,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestNoGrabbedWindowsSD)
{
MockUnityShowdesktopHandlerWindow mMockWindow;
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsOverrideRedirect ());
EXPECT_CALL (mMockWindow, IsManaged ());
@@ -132,7 +133,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestNoDesktopOrDockWindowsSD)
{
MockUnityShowdesktopHandlerWindow mMockWindow;
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsOverrideRedirect ());
EXPECT_CALL (mMockWindow, IsManaged ());
@@ -145,7 +146,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestNoSkipTaskbarOrPagerWindowsSD)
{
MockUnityShowdesktopHandlerWindow mMockWindow;
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsOverrideRedirect ());
EXPECT_CALL (mMockWindow, IsManaged ());
@@ -159,7 +160,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestHiddenNotSDAndShadedWindowsNoSD)
{
MockUnityShowdesktopHandlerWindow mMockWindow;
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsOverrideRedirect ());
EXPECT_CALL (mMockWindow, IsManaged ());
@@ -176,7 +177,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestHiddenSDAndShadedWindowsNoSD)
{
MockUnityShowdesktopHandlerWindow mMockWindow;
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsOverrideRedirect ());
EXPECT_CALL (mMockWindow, IsManaged ());
@@ -192,7 +193,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestHiddenNotSDAndNotShadedWindowsSD)
{
MockUnityShowdesktopHandlerWindow mMockWindow;
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsOverrideRedirect ());
EXPECT_CALL (mMockWindow, IsManaged ());
@@ -232,7 +233,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestFadeOutHidesWindow)
EXPECT_CALL (mMockWindow, GetInputRemover ()).WillOnce (Invoke (UnityShowdesktopHandlerTest::getLock <MockWindowInputRemoverTestFadeOut>));
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsHidden ());
EXPECT_CALL (mMockWindow, DoHide ());
@@ -264,7 +265,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestFadeOutOnHiddenDoesntHideWindow)
{
MockUnityShowdesktopHandlerWindow mMockWindow;
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsHidden ()).WillOnce (Return (true));
@@ -278,7 +279,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestFadeOutAlreadyFadedDoesntHideWindow)
MockUnityShowdesktopHandlerWindow mMockWindow;
EXPECT_CALL (mMockWindow, GetInputRemover ()).WillOnce (Invoke (UnityShowdesktopHandlerTest::getLock <MockWindowInputRemoverTestFadeOut>));
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsHidden ());
EXPECT_CALL (mMockWindow, DoHide ());
@@ -294,7 +295,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestFadeInNonFadedDoesntShowWindow)
{
MockUnityShowdesktopHandlerWindow mMockWindow;
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
mMockHandler.FadeIn ();
@@ -327,7 +328,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestFadeOutHidesWindowFadeInShowsWindow)
MockUnityShowdesktopHandlerWindow mMockWindow;
EXPECT_CALL (mMockWindow, GetInputRemover ()).WillOnce (Invoke (UnityShowdesktopHandlerTest::getLock <MockWindowInputRemoverTestFadeOutFadeIn>));
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsHidden ());
EXPECT_CALL (mMockWindow, DoHide ());
@@ -348,7 +349,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestAnimationPostPaintActions)
MockUnityShowdesktopHandlerWindow mMockWindow;
EXPECT_CALL (mMockWindow, GetInputRemover ()).WillOnce (Invoke (UnityShowdesktopHandlerTest::getLock <MockWindowInputRemoverTestFadeOutFadeIn>));
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsHidden ());
EXPECT_CALL (mMockWindow, DoHide ());
@@ -389,7 +390,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestAnimationOpacity)
MockUnityShowdesktopHandlerWindow mMockWindow;
EXPECT_CALL (mMockWindow, GetInputRemover ()).WillOnce (Invoke (UnityShowdesktopHandlerTest::getLock <MockWindowInputRemoverTestFadeOutFadeIn>));
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsHidden ());
EXPECT_CALL (mMockWindow, DoHide ());
@@ -445,7 +446,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestAnimationPaintMasks)
MockUnityShowdesktopHandlerWindow mMockWindow;
EXPECT_CALL (mMockWindow, GetInputRemover ()).WillOnce (Invoke (UnityShowdesktopHandlerTest::getLock <MockWindowInputRemoverTestFadeOutFadeIn>));
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsHidden ());
EXPECT_CALL (mMockWindow, DoHide ());
@@ -500,7 +501,7 @@ TEST_F(UnityShowdesktopHandlerTest, TestShapeEvent)
MockUnityShowdesktopHandlerWindow mMockWindow;
EXPECT_CALL (mMockWindow, GetInputRemover ()).WillOnce (Invoke (UnityShowdesktopHandlerTest::getLock <MockWindowInputRemoverTestFadeOutFadeInWithShapeEvent>));
- ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow));
+ ShowdesktopHandler mMockHandler (static_cast <ShowdesktopHandlerWindowInterface *> (&mMockWindow), static_cast <compiz::WindowInputRemoverLockAcquireInterface *> (&mMockWindow));
EXPECT_CALL (mMockWindow, IsHidden ());
EXPECT_CALL (mMockWindow, DoHide ());