summaryrefslogtreecommitdiff
diff options
-rw-r--r--hud/HudController.cpp3
-rw-r--r--hud/HudController.h4
-rw-r--r--plugins/unityshell/src/unityshell.cpp4
-rw-r--r--unity-shared/ResizedInputWindowBaseWindow.h53
4 files changed, 5 insertions, 59 deletions
diff --git a/hud/HudController.cpp b/hud/HudController.cpp
index 3cbfffa4a..d139f0bb6 100644
--- a/hud/HudController.cpp
+++ b/hud/HudController.cpp
@@ -26,7 +26,6 @@
#include "unity-shared/PanelStyle.h"
#include "unity-shared/UBusMessages.h"
#include "unity-shared/UScreen.h"
-#include "unity-shared/ResizedInputWindowBaseWindow.h"
#include "config.h"
#include <libbamf/libbamf.h>
@@ -89,7 +88,7 @@ Controller::Controller(std::function<AbstractView*(void)> const& function)
void Controller::SetupWindow()
{
- window_.Adopt(new ResizedInputWindowBaseWindow("Hud", [this](nux::Geometry const& geo)
+ window_.Adopt(new ResizingBaseWindow("Hud", [this](nux::Geometry const& geo)
{
if (view_)
return GetInputWindowGeometry();
diff --git a/hud/HudController.h b/hud/HudController.h
index 5231d4c9b..1f20f1e4b 100644
--- a/hud/HudController.h
+++ b/hud/HudController.h
@@ -32,7 +32,7 @@
#include "unity-shared/Animator.h"
#include "unity-shared/UBusWrapper.h"
-#include "unity-shared/ResizedInputWindowBaseWindow.h"
+#include "unity-shared/ResizingBaseWindow.h"
#include "HudView.h"
namespace unity
@@ -100,7 +100,7 @@ private:
void OnQueriesFinished(Hud::Queries queries);
private:
- nux::ObjectPtr<ResizedInputWindowBaseWindow> window_;
+ nux::ObjectPtr<ResizingBaseWindow> window_;
UBusManager ubus;
glib::SignalManager sig_manager_;
Hud hud_service_;
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 49f10b063..67b7bd163 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -1431,7 +1431,7 @@ void UnityScreen::handleEvent(XEvent* event)
if (overlay_monitor_ != monitor_with_mouse ||
!geo_dash.IsInside(pt))
{
- ubus_manager_.SendMessage(UBUS_PLACE_VIEW_CLOSE_REQUEST, g_variant_new_boolean(FALSE));
+ dash_controller_->HideDash(false);
}
}
@@ -1444,7 +1444,7 @@ void UnityScreen::handleEvent(XEvent* event)
if (overlay_monitor_ != monitor_with_mouse ||
!geo_hud.IsInside(pt))
{
- ubus_manager_.SendMessage(UBUS_HUD_CLOSE_REQUEST, g_variant_new_boolean(FALSE));
+ hud_controller_->HideHud(false);
}
}
break;
diff --git a/unity-shared/ResizedInputWindowBaseWindow.h b/unity-shared/ResizedInputWindowBaseWindow.h
deleted file mode 100644
index ea34831c4..000000000
--- a/unity-shared/ResizedInputWindowBaseWindow.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2010 Canonical Ltd
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * Authored by: Neil Jagdish Patel <neil.patel@canonical.com>
- */
-
-#ifndef RESIZEDINPUTWINDOW_BASEWINDOW_H
-#define RESIZEDINPUTWINDOW_BASEWINDOW_H
-
-#include <Nux/BaseWindow.h>
-
-namespace unity
-{
-
-class ResizedInputWindowBaseWindow : public nux::BaseWindow
-{
-public:
- ResizedInputWindowBaseWindow(const char *WindowName, std::function<nux::Geometry (nux::Geometry const&)> geo_func)
- : BaseWindow(WindowName, NUX_TRACKER_LOCATION)
- {
- geo_func_ = geo_func;
- }
-
- void UpdateInputWindowGeometry()
- {
- if (m_input_window)
- m_input_window->SetGeometry(geo_func_(GetGeometry()));
- }
-
- virtual void SetGeometry(const nux::Geometry &geo)
- {
- Area::SetGeometry(geo);
- UpdateInputWindowGeometry();
- }
-
-private:
- std::function<nux::Geometry (nux::Geometry const&)> geo_func_;
-};
-
-}
-#endif // RESIZEDINPUTWINDOW_BASEWINDOW_H