diff options
| author | Andrea Azzarone <azzaronea@gmail.com> | 2012-10-17 18:16:00 +0200 |
|---|---|---|
| committer | Andrea Azzarone <azzaronea@gmail.com> | 2012-10-17 18:16:00 +0200 |
| commit | 4111c2095eaa0895ec731f040885a9b5cd142a5e (patch) | |
| tree | b25e5fe4934f9ac88ab9f2293f3be1cbaa52dff2 /plugins | |
| parent | d29aac5cdd8745ea6b2c8f758d6a79a87c80e4eb (diff) | |
Don't remove updateIconPos.
(bzr r2844.2.2)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 27 | ||||
| -rw-r--r-- | plugins/unityshell/src/unityshell.h | 3 |
2 files changed, 24 insertions, 6 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index 86494147b..95c6958ef 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -676,6 +676,18 @@ void UnityScreen::paintPanelShadow(const CompRegion& clip) nuxEpilogue(); } +void +UnityWindow::updateIconPos (int &wx, + int &wy, + int x, + int y, + float width, + float height) +{ + wx = x + (last_bound.width - width) / 2; + wy = y + (last_bound.height - height) / 2; +} + void UnityScreen::OnPanelStyleChanged() { panel_texture_has_changed_ = true; @@ -841,18 +853,21 @@ void UnityWindow::paintThumbnail (nux::Geometry const& bounding, float alpha) GLMatrix matrix; matrix.toScreenSpace (UnityScreen::get (screen)->_last_output, -DEFAULT_Z_CAMERA); + nux::Geometry geo = bounding; + last_bound = geo; + GLWindowPaintAttrib attrib = gWindow->lastPaintAttrib (); attrib.opacity = (GLushort) (alpha * G_MAXUSHORT); paintThumb (attrib, matrix, 0, - bounding.x, - bounding.y, - bounding.width, - bounding.height, - bounding.width, - bounding.height); + geo.x, + geo.y, + geo.width, + geo.height, + geo.width, + geo.height); } void UnityScreen::EnableCancelAction(CancelActionTarget target, bool enabled, int modifiers) diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h index 05e5988c3..81dc78eda 100644 --- a/plugins/unityshell/src/unityshell.h +++ b/plugins/unityshell/src/unityshell.h @@ -359,6 +359,8 @@ public: CompWindow* window; GLWindow* gWindow; + nux::Geometry last_bound; + void minimize(); void unminimize(); bool minimized(); @@ -374,6 +376,7 @@ public: /* basic window draw function */ bool glDraw(GLMatrix const&, GLWindowPaintAttrib const&, CompRegion const&, unsigned mask); + 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); |
