summaryrefslogtreecommitdiff
path: root/plugins
diff options
Diffstat (limited to 'plugins')
-rw-r--r--plugins/unityshell/src/WindowMinimizeSpeedController.cpp1
-rw-r--r--plugins/unityshell/src/inputremover.cpp2
-rw-r--r--plugins/unityshell/src/unityshell.cpp35
-rw-r--r--plugins/unityshell/src/unityshell.h320
4 files changed, 168 insertions, 190 deletions
diff --git a/plugins/unityshell/src/WindowMinimizeSpeedController.cpp b/plugins/unityshell/src/WindowMinimizeSpeedController.cpp
index 29df106fa..6d7db5bf3 100644
--- a/plugins/unityshell/src/WindowMinimizeSpeedController.cpp
+++ b/plugins/unityshell/src/WindowMinimizeSpeedController.cpp
@@ -19,6 +19,7 @@
* not be able to re-use it if you want to use a different licence.
*/
+#include <cmath>
#include <gio/gio.h>
#include <NuxCore/Logger.h>
diff --git a/plugins/unityshell/src/inputremover.cpp b/plugins/unityshell/src/inputremover.cpp
index c24639c81..de675ee05 100644
--- a/plugins/unityshell/src/inputremover.cpp
+++ b/plugins/unityshell/src/inputremover.cpp
@@ -354,7 +354,7 @@ compiz::WindowInputRemover::writeProperty (XRectangle *input,
for (int i = 0; i < nInput; ++i)
{
- const unsigned int position = dataSize + (i * 4);
+ const unsigned int position = headerSize + (i * 4);
data[position + 0] = input[i].x;
data[position + 1] = input[i].y;
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 3126d5b4b..f0c24f340 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -203,8 +203,7 @@ UnityScreen::UnityScreen(CompScreen* screen)
, doShellRepaint(false)
, didShellRepaint(false)
, allowWindowPaint(false)
- , _key_nav_mode_requested(false)
- , _last_output(nullptr)
+ , last_output_(nullptr)
, force_draw_countdown_(0)
, firstWindowAboveShell(nullptr)
, onboard_(nullptr)
@@ -215,12 +214,13 @@ UnityScreen::UnityScreen(CompScreen* screen)
, first_menu_keypress_time_(0)
, paint_panel_under_dash_(false)
, scale_just_activated_(false)
- , big_tick_(0)
, screen_introspection_(screen)
, ignore_redraw_request_(false)
, dirty_helpers_on_this_frame_(false)
- , back_buffer_age_(0)
, is_desktop_active_(false)
+ , key_nav_mode_requested_(false)
+ , big_tick_(0)
+ , back_buffer_age_(0)
{
Timer timer;
#ifndef USE_GLES
@@ -341,7 +341,7 @@ UnityScreen::UnityScreen(CompScreen* screen)
tick_source_.reset(new na::TickSource);
animation_controller_.reset(new na::AnimationController(*tick_source_));
- wt->RedrawRequested.connect(sigc::mem_fun(this, &UnityScreen::onRedrawRequested));
+ wt->RedrawRequested.connect(sigc::mem_fun(this, &UnityScreen::OnRedrawRequested));
unity_a11y_init(wt.get());
@@ -692,7 +692,7 @@ void UnityScreen::nuxEpilogue()
/* In some unknown place inside nux drawing we change the viewport without
* setting it back to the default one, so we need to restore it before allowing
* compiz to take the scene */
- auto* o = _last_output;
+ auto* o = last_output_;
glViewport(o->x(), screen->height() - o->y2(), o->width(), o->height());
glDepthRange(0, 1);
@@ -748,7 +748,7 @@ void UnityScreen::paintPanelShadow(CompRegion const& clip)
if (WM.IsExpoActive())
return;
- CompOutput* output = _last_output;
+ CompOutput* output = last_output_;
if (fullscreenRegion.contains(*output))
return;
@@ -863,7 +863,7 @@ void UnityScreen::DamageBlurUpdateRegion(nux::Geometry const& blur_update)
void UnityScreen::paintDisplay()
{
- CompOutput *output = _last_output;
+ CompOutput *output = last_output_;
DrawPanelUnderDash();
@@ -990,7 +990,7 @@ void UnityScreen::DrawPanelUnderDash()
auto const& output_dev = screen->currentOutputDev();
- if (_last_output->id() != output_dev.id())
+ if (last_output_->id() != output_dev.id())
return;
auto graphics_engine = nux::GetGraphicsDisplay()->GetGraphicsEngine();
@@ -1485,7 +1485,7 @@ bool UnityScreen::glPaintOutput(const GLScreenPaintAttrib& attrib,
);
allowWindowPaint = true;
- _last_output = output;
+ last_output_ = output;
paint_panel_under_dash_ = false;
// CompRegion has no clear() method. So this is the fastest alternative.
@@ -1522,7 +1522,7 @@ void UnityScreen::glPaintTransformedOutput(const GLScreenPaintAttrib& attrib,
* this output.
*
* However, damaging nux has a side effect of notifying compiz
- * through onRedrawRequested that we need to queue another frame.
+ * through OnRedrawRequested that we need to queue another frame.
* In most cases that would be desirable, and in the case where
* we did that in damageCutoff, it would not be a problem as compiz
* does not queue up new frames for damage that can be processed
@@ -1687,7 +1687,7 @@ void UnityScreen::donePaint()
wt->ForeignFrameEnded();
if (animation_controller_->HasRunningAnimations())
- onRedrawRequested();
+ OnRedrawRequested();
for (auto it = ShowdesktopHandler::animating_windows.begin(); it != ShowdesktopHandler::animating_windows.end();)
{
@@ -1813,7 +1813,7 @@ void UnityScreen::handleEvent(XEvent* event)
else if (!screen->grabbed() && event->xfocus.mode == NotifyWhileGrabbed)
wm.OnScreenGrabbed();
- if (_key_nav_mode_requested)
+ if (key_nav_mode_requested_)
{
// Close any overlay that is open.
if (launcher_controller_->IsOverlayOpen())
@@ -1821,7 +1821,7 @@ void UnityScreen::handleEvent(XEvent* event)
dash_controller_->HideDash();
hud_controller_->HideHud();
}
- _key_nav_mode_requested = false;
+ key_nav_mode_requested_ = false;
launcher_controller_->KeyNavGrab();
}
break;
@@ -2343,7 +2343,7 @@ bool UnityScreen::setKeyboardFocusKeyInitiate(CompAction* action,
else if (WM.IsExpoActive())
WM.TerminateExpo();
- _key_nav_mode_requested = true;
+ key_nav_mode_requested_ = true;
return true;
}
@@ -3542,7 +3542,7 @@ void UnityScreen::InitNuxThread(nux::NThread* thread, void* data)
LOG_INFO(logger) << "UnityScreen::InitNuxThread: " << timer.ElapsedSeconds() << "s";
}
-void UnityScreen::onRedrawRequested()
+void UnityScreen::OnRedrawRequested()
{
if (!ignore_redraw_request_)
cScreen->damagePending();
@@ -4282,6 +4282,7 @@ UnityWindow::UnityWindow(CompWindow* window)
{
WindowInterface::setHandler(window);
GLWindowInterface::setHandler(gWindow);
+ CompositeWindowInterface::setHandler(cWindow);
ScaleWindowInterface::setHandler(ScaleWindow::get(window));
PluginAdapter::Default().OnLeaveDesktop();
@@ -4647,7 +4648,7 @@ void UnityWindow::paintInnerGlow(nux::Geometry glow_geo, GLMatrix const& matrix,
void UnityWindow::paintThumbnail(nux::Geometry const& geo, float alpha, float parent_alpha, float scale_ratio, unsigned deco_height, bool selected)
{
GLMatrix matrix;
- matrix.toScreenSpace(uScreen->_last_output, -DEFAULT_Z_CAMERA);
+ matrix.toScreenSpace(uScreen->last_output_, -DEFAULT_Z_CAMERA);
last_bound = geo;
GLWindowPaintAttrib attrib = gWindow->lastPaintAttrib();
diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h
index cc714b37d..8f3d89c08 100644
--- a/plugins/unityshell/src/unityshell.h
+++ b/plugins/unityshell/src/unityshell.h
@@ -2,7 +2,7 @@
/* Compiz unity plugin
* unity.h
*
- * Copyright (c) 2010-11 Canonical Ltd.
+ * Copyright (c) 2010-16 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -120,61 +120,69 @@ public:
UnityScreen(CompScreen* s);
~UnityScreen();
- /* We store these to avoid unecessary calls to ::get */
- CompScreen* screen;
- CompositeScreen* cScreen;
- GLScreen* gScreen;
- ScaleScreen* sScreen;
-
- /* prepares nux for drawing */
- void nuxPrologue();
- /* pops nux draw stack */
- void nuxEpilogue();
-
- /* nux draw wrapper */
- void paintDisplay();
- void paintPanelShadow(CompRegion const& clip);
- void setPanelShadowMatrix(const GLMatrix& matrix);
-
- void updateBlurDamage();
- void damageCutoff();
- void preparePaint (int ms);
- void donePaint ();
+ switcher::Controller::Ptr switcher_controller();
+ launcher::Controller::Ptr launcher_controller();
+ lockscreen::Controller::Ptr lockscreen_controller();
- void RaiseInputWindows();
+ void SetUpAndShowSwitcher(switcher::ShowMode show_mode = switcher::ShowMode::CURRENT_VIEWPORT);
- void
- handleCompizEvent (const char *pluginName,
- const char *eventName,
- CompOption::Vector &o);
+protected:
+ void damageCutoff() override;
+ void preparePaint(int ms) override;
+ void donePaint() override;
- void damageRegion(const CompRegion &region);
+ void handleCompizEvent(const char *pluginName, const char *eventName, CompOption::Vector &o) override;
+ void damageRegion(const CompRegion &region) override;
/* paint on top of all windows if we could not find a window
* to paint underneath */
- bool glPaintOutput(const GLScreenPaintAttrib&,
- const GLMatrix&,
- const CompRegion&,
- CompOutput*,
- unsigned int);
+ bool glPaintOutput(const GLScreenPaintAttrib&, const GLMatrix&, const CompRegion&, CompOutput*, unsigned int) override;
/* paint in the special case that the output is transformed */
- void glPaintTransformedOutput(const GLScreenPaintAttrib&,
- const GLMatrix&,
- const CompRegion&,
- CompOutput*,
- unsigned int);
+ void glPaintTransformedOutput(const GLScreenPaintAttrib&, const GLMatrix&, const CompRegion&, CompOutput*, unsigned int) override;
/* handle X11 events */
- void handleEvent(XEvent*);
- void addSupportedAtoms(std::vector<Atom>&);
+ void handleEvent(XEvent*) override;
+ void addSupportedAtoms(std::vector<Atom>&) override;
/* handle showdesktop */
- void enterShowDesktopMode ();
- void leaveShowDesktopMode (CompWindow *w);
+ void enterShowDesktopMode() override;
+ void leaveShowDesktopMode(CompWindow *w) override;
/* window scaling */
- bool layoutSlotsAndAssignWindows();
+ bool layoutSlotsAndAssignWindows() override;
+ bool getMipmap() override { return false; }
+
+ /* Handle changes in the number of workspaces by showing the switcher
+ * or not showing the switcher */
+ bool setOptionForPlugin(const char* plugin, const char* name, CompOption::Value& v) override;
+
+ /* init plugin actions for screen */
+ bool initPluginForScreen(CompPlugin* p) override;
+
+ void outputChangeNotify() override;
+
+ CompAction::Vector& getActions() override;
+
+ std::string GetName() const override;
+ void AddProperties(debug::IntrospectionData&) override;
+
+private:
+ static void InitNuxThread(nux::NThread* thread, void* data);
+ void InitUnityComponents();
+ bool InitPluginActions();
+ void InitAltTabNextWindow();
+
+ /* prepares nux for drawing */
+ void nuxPrologue();
+ /* pops nux draw stack */
+ void nuxEpilogue();
+
+ /* nux draw wrapper */
+ void paintDisplay();
+ void paintPanelShadow(CompRegion const& clip);
+ void setPanelShadowMatrix(const GLMatrix& matrix);
+ void updateBlurDamage();
bool showMenuBarInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
bool showMenuBarTerminate(CompAction* action, CompAction::State state, CompOption::Vector& options);
@@ -190,9 +198,7 @@ public:
bool setKeyboardFocusKeyInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
bool altTabInitiateCommon(CompAction* action, switcher::ShowMode mode);
- bool altTabTerminateCommon(CompAction* action,
- CompAction::State state,
- CompOption::Vector& options);
+ bool altTabTerminateCommon(CompAction* action, CompAction::State state, CompOption::Vector& options);
bool altTabForwardInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
bool altTabPrevInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
@@ -201,10 +207,9 @@ public:
bool altTabNextWindowInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
bool altTabPrevWindowInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
- bool ShowHud();
- /* handle hud key activations */
bool ShowHudInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
bool ShowHudTerminate(CompAction* action, CompAction::State state, CompOption::Vector& options);
+
bool launcherSwitcherForwardInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
bool launcherSwitcherPrevInitiate(CompAction* action, CompAction::State state, CompOption::Vector& options);
bool launcherSwitcherTerminate(CompAction* action, CompAction::State state, CompOption::Vector& options);
@@ -214,56 +219,28 @@ public:
/* handle option changes and change settings inside of the
* panel and dock views */
void optionChanged(CompOption*, Options num);
+ void OnMinimizeDurationChanged();
- /* Handle changes in the number of workspaces by showing the switcher
- * or not showing the switcher */
- bool setOptionForPlugin(const char* plugin, const char* name,
- CompOption::Value& v);
-
- /* init plugin actions for screen */
- bool initPluginForScreen(CompPlugin* p);
-
- void outputChangeNotify();
void NeedsRelayout();
void ScheduleRelayout(guint timeout);
- bool forcePaintOnTop ();
-
- void SetUpAndShowSwitcher(switcher::ShowMode show_mode = switcher::ShowMode::CURRENT_VIEWPORT);
-
- void OnMinimizeDurationChanged();
+ bool forcePaintOnTop();
void OnLockScreenRequested();
void OnScreenLocked();
void OnScreenUnlocked();
void SaveLockStamp(bool);
- switcher::Controller::Ptr switcher_controller();
- launcher::Controller::Ptr launcher_controller();
- lockscreen::Controller::Ptr lockscreen_controller();
-
bool DoesPointIntersectUnityGeos(nux::Point const& pt);
ui::LayoutWindow::Ptr GetSwitcherDetailLayoutWindow(Window window) const;
- CompAction::Vector& getActions();
-
-protected:
- std::string GetName() const;
- void AddProperties(debug::IntrospectionData&);
-
-private:
enum CancelActionTarget
{
LAUNCHER_SWITCHER,
SHORTCUT_HINT
};
- static void InitNuxThread(nux::NThread* thread, void* data);
- void InitUnityComponents();
- bool InitPluginActions();
- void InitAltTabNextWindow();
-
void SendExecuteCommand();
void EnsureSuperKeybindings();
@@ -273,21 +250,22 @@ private:
void compizDamageNux(CompRegion const& region);
void determineNuxDamage(CompRegion &nux_damage);
- void onRedrawRequested();
void Relayout();
+ void RaiseInputWindows();
static void OnStartKeyNav(GVariant* data, void* value);
static void OnExitKeyNav(GVariant* data, void* value);
void restartLauncherKeyNav();
- void OnDashRealized ();
-
+ bool ShowHud();
void RaiseOSK();
+ void OnDashRealized();
void OnLauncherStartKeyNav(GVariant* data);
void OnLauncherEndKeyNav(GVariant* data);
void OnSwitcherDetailChanged(bool detail);
+ void OnRedrawRequested();
void OnInitiateSpread();
void OnTerminateSpread();
@@ -307,20 +285,24 @@ private:
void DrawPanelUnderDash();
- void FillShadowRectForOutput(CompRect &shadowRect,
- CompOutput const &output);
+ void FillShadowRectForOutput(CompRect &shadowRect, CompOutput const &output);
unsigned CompizModifiersToNux(unsigned input) const;
unsigned XModifiersToNux(unsigned input) const;
void UpdateCloseWindowKey(CompAction::KeyBinding const&);
void UpdateActivateIndicatorsKey();
- bool getMipmap () override { return false; }
-
void DamageBlurUpdateRegion(nux::Geometry const&);
void ShowFirstRunHints();
void SpreadAppWindows(bool anywhere);
+ bool queryForShader();
+
+ /* We store these to avoid unecessary calls to ::get */
+ CompScreen* screen;
+ CompositeScreen* cScreen;
+ GLScreen* gScreen;
+ ScaleScreen* sScreen;
std::unique_ptr<na::TickSource> tick_source_;
std::unique_ptr<na::AnimationController> animation_controller_;
@@ -365,8 +347,8 @@ private:
/* Subscription for gestures that manipulate windows. */
std::unique_ptr<nux::GesturesSubscription> gestures_sub_windows_;
- bool needsRelayout;
- bool super_keypressed_;
+ bool needsRelayout;
+ bool super_keypressed_;
typedef std::shared_ptr<CompAction> CompActionPtr;
typedef std::vector<CompActionPtr> ShortcutActions;
ShortcutActions _shortcut_actions;
@@ -380,11 +362,10 @@ private:
GLTexture::List _shadow_texture;
/* handle paint order */
- bool doShellRepaint;
- bool didShellRepaint;
- bool allowWindowPaint;
- bool _key_nav_mode_requested;
- CompOutput* _last_output;
+ bool doShellRepaint;
+ bool didShellRepaint;
+ bool allowWindowPaint;
+ CompOutput* last_output_;
/* a small count-down work-a-around
* to force full redraws of the shell
@@ -400,16 +381,14 @@ private:
::GLFramebufferObject *oldFbo;
- bool queryForShader ();
-
int overlay_monitor_;
CompScreen::GrabHandle grab_index_;
- CompWindowList fullscreen_windows_;
- bool painting_tray_;
- unsigned int tray_paint_mask_;
- unsigned int last_scroll_event_;
- int hud_keypress_time_;
- int first_menu_keypress_time_;
+ CompWindowList fullscreen_windows_;
+ bool painting_tray_;
+ unsigned int tray_paint_mask_;
+ unsigned int last_scroll_event_;
+ int hud_keypress_time_;
+ int first_menu_keypress_time_;
GLMatrix panel_shadow_matrix_;
@@ -418,9 +397,6 @@ private:
bool scale_just_activated_;
WindowMinimizeSpeedController minimize_speed_controller_;
-
- uint64_t big_tick_;
-
debug::ScreenIntrospection screen_introspection_;
UBusManager ubus_manager_;
@@ -430,12 +406,12 @@ private:
CompRegion buffered_compiz_damage_this_frame_;
CompRegion buffered_compiz_damage_last_frame_;
- bool ignore_redraw_request_;
- bool dirty_helpers_on_this_frame_;
-
- unsigned int back_buffer_age_;
-
+ bool ignore_redraw_request_;
+ bool dirty_helpers_on_this_frame_;
bool is_desktop_active_;
+ bool key_nav_mode_requested_;
+ uint64_t big_tick_;
+ unsigned int back_buffer_age_;
friend class UnityWindow;
friend class debug::ScreenIntrospection;
@@ -445,6 +421,7 @@ private:
class UnityWindow :
public WindowInterface,
public GLWindowInterface,
+ public CompositeWindowInterface,
public ShowdesktopHandlerWindowInterface,
public compiz::WindowInputRemoverLockAcquireInterface,
public WrapableHandler<ScaleWindowInterface, 4>,
@@ -457,98 +434,91 @@ public:
UnityWindow(CompWindow*);
~UnityWindow();
- CompWindow* window;
- CompositeWindow* cWindow;
- GLWindow* gWindow;
-
- nux::Geometry last_bound;
+ void minimize() override;
+ void unminimize() override;
+ bool minimized() const override;
+ bool focus() override;
+ void activate() override;
- void minimize();
- void unminimize();
- bool minimized() const;
- bool focus();
- void activate();
+ //! Emited when CompWindowNotifyBeforeDestroy is received
+ sigc::signal<void> being_destroyed;
- void updateFrameRegion(CompRegion &region);
- void getOutputExtents(CompWindowExtents& output);
+protected:
+ void updateFrameRegion(CompRegion &region) override;
+ void getOutputExtents(CompWindowExtents& output) override;
/* occlusion detection
* and window hiding */
- bool glPaint(GLWindowPaintAttrib const&, GLMatrix const&, CompRegion const&, unsigned mask);
+ bool glPaint(GLWindowPaintAttrib const&, GLMatrix const&, CompRegion const&, unsigned mask) override;
/* basic window draw function */
- bool glDraw(GLMatrix const&, GLWindowPaintAttrib const&, CompRegion const&, unsigned mask);
+ bool glDraw(GLMatrix const&, GLWindowPaintAttrib const&, CompRegion const&, unsigned mask) override;
+ bool damageRect(bool initial, CompRect const&) override;
- bool damageRect(bool initial, CompRect const&);
+ void updateIconPos(int &wx, int &wy, int x, int y, float width, float height) override;
+ void windowNotify(CompWindowNotify n) override;
+ void moveNotify(int x, int y, bool immediate) override;
+ void resizeNotify(int x, int y, int w, int h) override;
+ void stateChangeNotify(unsigned int lastState) override;
- void updateIconPos (int &wx, int &wy, int x, int y, float width, float height);
- void windowNotify(CompWindowNotify n);
- void moveNotify(int x, int y, bool immediate);
- void resizeNotify(int x, int y, int w, int h);
- void stateChangeNotify(unsigned int lastState);
+ bool place(CompPoint& pos) override;
+ void scalePaintDecoration(GLWindowPaintAttrib const&, GLMatrix const&, CompRegion const&, unsigned mask) override;
- bool place(CompPoint& pos);
- CompPoint tryNotIntersectUI(CompPoint& pos);
- nux::Geometry GetScaledGeometry();
- nux::Geometry GetLayoutWindowGeometry();
-
- void paintThumbnail(nux::Geometry const& bounding, float parent_alpha, float alpha, float scale_ratio, unsigned deco_height, bool selected);
-
- void enterShowDesktop();
- void leaveShowDesktop();
- bool HandleAnimations(unsigned int ms);
-
- bool handleEvent(XEvent *event);
- void scalePaintDecoration(GLWindowPaintAttrib const&, GLMatrix const&, CompRegion const&, unsigned mask);
-
- //! Emited when CompWindowNotifyBeforeDestroy is received
- sigc::signal<void> being_destroyed;
-
-
-protected:
- std::string GetName() const;
- void AddProperties(debug::IntrospectionData&);
+ std::string GetName() const override;
+ void AddProperties(debug::IntrospectionData&) override;
private:
typedef compiz::CompizMinimizedWindowHandler<UnityScreen, UnityWindow> UnityMinimizedHandler;
typedef std::shared_ptr<compiz_utils::PixmapTexture> PixmapTexturePtr;
- void DoEnableFocus ();
- void DoDisableFocus ();
-
- bool IsOverrideRedirect ();
- bool IsManaged ();
- bool IsGrabbed ();
- bool IsDesktopOrDock ();
- bool IsSkipTaskbarOrPager ();
- bool IsHidden ();
- bool IsInShowdesktopMode ();
- bool IsShaded ();
- bool IsMinimized ();
+ void DoEnableFocus();
+ void DoDisableFocus();
+
+ bool IsOverrideRedirect();
+ bool IsManaged();
+ bool IsGrabbed();
+ bool IsDesktopOrDock();
+ bool IsSkipTaskbarOrPager();
+ bool IsHidden();
+ bool IsInShowdesktopMode();
+ bool IsShaded();
+ bool IsMinimized();
bool CanBypassLockScreen() const;
- void DoOverrideFrameRegion (CompRegion &r);
+ void DoOverrideFrameRegion(CompRegion &r);
- void DoHide ();
- void DoNotifyHidden ();
- void DoShow ();
- void DoNotifyShown ();
+ void DoHide();
+ void DoNotifyHidden();
+ void DoShow();
+ void DoNotifyShown();
void OnInitiateSpread();
void OnTerminateSpread();
- void DoAddDamage ();
- ShowdesktopHandlerWindowInterface::PostPaintAction DoHandleAnimations (unsigned int ms);
+ CompPoint tryNotIntersectUI(CompPoint& pos);
+ nux::Geometry GetScaledGeometry();
+ nux::Geometry GetLayoutWindowGeometry();
+
+ void enterShowDesktop();
+ void leaveShowDesktop();
+ bool HandleAnimations(unsigned int ms);
+
+ bool handleEvent(XEvent *event);
+ void paintThumbnail(nux::Geometry const& bounding, float parent_alpha, float alpha, float scale_ratio, unsigned deco_height, bool selected);
- void DoMoveFocusAway ();
+ void DoAddDamage();
+ ShowdesktopHandlerWindowInterface::PostPaintAction DoHandleAnimations(unsigned int ms);
- void DoDeleteHandler ();
+ void DoMoveFocusAway();
- unsigned int GetNoCoreInstanceMask ();
+ void DoDeleteHandler();
- compiz::WindowInputRemoverLock::Ptr GetInputRemover ();
+ unsigned int GetNoCoreInstanceMask();
+
+ compiz::WindowInputRemoverLock::Ptr GetInputRemover();
void RenderDecoration(compiz_utils::CairoContext const&, double aspect = 1.0f);
- void RenderTitle(compiz_utils::CairoContext const&, int x, int y, int width, int height, double aspect = 1.0f);
+ void RenderTitle(compiz_utils::CairoContext const&, int x, int y, int width,
+ int height, double aspect = 1.0f);
void DrawTexture(GLTexture::List const& textures, GLWindowPaintAttrib const&,
GLMatrix const&, unsigned mask, int x, int y, double aspect = 1.0f);
@@ -565,7 +535,12 @@ public:
std::unique_ptr <UnityMinimizedHandler> mMinimizeHandler;
private:
+ CompWindow* window;
+ CompositeWindow* cWindow;
+ GLWindow* gWindow;
+
std::unique_ptr <ShowdesktopHandler> mShowdesktopHandler;
+ nux::Geometry last_bound;
PixmapTexturePtr decoration_tex_;
PixmapTexturePtr decoration_selected_tex_;
std::string decoration_title_;
@@ -579,6 +554,7 @@ private:
glib::Source::UniquePtr focus_desktop_timeout_;
friend class UnityScreen;
+ friend UnityMinimizedHandler;
};