summaryrefslogtreecommitdiff
path: root/plugins
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2014-03-07 20:18:30 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2014-03-07 20:18:30 +0100
commite14d4782b425286890e24397470987e90c85e5af (patch)
treefeb27bc3d838d67f8d57415eff1cb109dddd89fb /plugins
parentcc4dd4b1aeb3f21b72cad434ea2c3ac2073cd282 (diff)
UnityScreen: allow to paint a menu *only* if an indicator is currently opened
This solves a possible secuity flaw that caused any pop-up menu to be drawn also if not an indicator. (bzr r3695.4.61)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/unityshell/src/unityshell.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 85d7734d9..8c284847b 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -2820,9 +2820,10 @@ bool UnityWindow::glPaint(const GLWindowPaintAttrib& attrib,
GLWindowPaintAttrib wAttrib = attrib;
- if (window->type() != CompWindowTypePopupMenuMask)
+ if (uScreen->lockscreen_controller_->IsLocked())
{
- if (uScreen->lockscreen_controller_->IsLocked())
+ if (window->type() != CompWindowTypePopupMenuMask ||
+ !uScreen->lockscreen_controller_->HasOpenMenu())
{
// For some reasons PAINT_WINDOW_NO_CORE_INSTANCE_MASK doesn't work here
// (well, it works too much, as it applies to menus too), so we need