summaryrefslogtreecommitdiff
diff options
-rw-r--r--launcher/ApplicationLauncherIcon.cpp6
-rw-r--r--launcher/ApplicationLauncherIcon.h3
-rw-r--r--launcher/FileManagerLauncherIcon.cpp8
-rw-r--r--lockscreen/LockScreenAcceleratorController.cpp24
-rw-r--r--panel/PanelView.cpp5
-rw-r--r--plugins/unityshell/src/unityshell.cpp2
6 files changed, 40 insertions, 8 deletions
diff --git a/launcher/ApplicationLauncherIcon.cpp b/launcher/ApplicationLauncherIcon.cpp
index b5ee808e9..0fa0effdc 100644
--- a/launcher/ApplicationLauncherIcon.cpp
+++ b/launcher/ApplicationLauncherIcon.cpp
@@ -42,7 +42,6 @@ namespace
DECLARE_LOGGER(logger, "unity.launcher.icon.application");
// We use the "application-" prefix since the manager is protected, to avoid name clash
-const std::string ICON_REMOVE_TIMEOUT = "application-icon-remove";
const std::string DEFAULT_ICON = "application-default-icon";
enum MenuItemType
@@ -109,14 +108,13 @@ void ApplicationLauncherIcon::SetApplication(ApplicationPtr const& app)
app_->visible.changed.emit(app_->visible());
app_->active.changed.emit(app_->active());
app_->running.changed.emit(app_->running());
+ app_->urgent.changed.emit(app_->urgent());
+ app_->starting.changed.emit(app_->starting() || GetQuirk(Quirk::STARTING));
app_->desktop_file.changed.emit(app_->desktop_file());
// Make sure we set the LauncherIcon stick bit too...
if (app_->sticky() || was_sticky)
Stick(false); // don't emit the signal
-
- if (app_->starting())
- SetQuirk(Quirk::STARTING, true);
}
void ApplicationLauncherIcon::UnsetApplication()
diff --git a/launcher/ApplicationLauncherIcon.h b/launcher/ApplicationLauncherIcon.h
index afdf0118e..1a21f1f22 100644
--- a/launcher/ApplicationLauncherIcon.h
+++ b/launcher/ApplicationLauncherIcon.h
@@ -54,6 +54,9 @@ public:
void UnStick() override;
protected:
+ // This must be defined here as it's used both in ApplicationLauncherIcon and in FileManagerLauncherIcon.
+ static constexpr const char* ICON_REMOVE_TIMEOUT = "application-icon-remove";
+
void SetApplication(ApplicationPtr const& app);
ApplicationPtr GetApplication() const;
diff --git a/launcher/FileManagerLauncherIcon.cpp b/launcher/FileManagerLauncherIcon.cpp
index d5895ad0f..e4cf98d55 100644
--- a/launcher/FileManagerLauncherIcon.cpp
+++ b/launcher/FileManagerLauncherIcon.cpp
@@ -67,6 +67,14 @@ FileManagerLauncherIcon::FileManagerLauncherIcon(ApplicationPtr const& app, Devi
icon_name = (icon.empty() ? DEFAULT_ICON : icon);
}));
+ signals_conn_.Add(app_->running.changed.connect([this](bool running) {
+ LOG_DEBUG(logger) << tooltip_text() << " running now " << (running ? "true" : "false");
+
+ if (running)
+ _source_manager.Remove(ICON_REMOVE_TIMEOUT);
+ }));
+
+
UpdateStorageWindows();
}
diff --git a/lockscreen/LockScreenAcceleratorController.cpp b/lockscreen/LockScreenAcceleratorController.cpp
index adc2de355..80436881d 100644
--- a/lockscreen/LockScreenAcceleratorController.cpp
+++ b/lockscreen/LockScreenAcceleratorController.cpp
@@ -20,6 +20,8 @@
#include "LockScreenAcceleratorController.h"
+#include <sigc++/bind.h>
+
#include <NuxCore/Logger.h>
#include <UnityCore/GLibDBusProxy.h>
@@ -70,6 +72,22 @@ const std::vector<std::string> ALLOWED_XF86_KEYS = {
"XF86Touchpad",
};
+bool IsSettingKeyAvailable(glib::Object<GSettings> const& settings, std::string const& key)
+{
+ bool available = false;
+ GSettingsSchema* schema;
+
+ g_object_get(glib::object_cast<GObject>(settings), "settings-schema", &schema, nullptr);
+
+ if (schema)
+ {
+ available = g_settings_schema_has_key(schema, key.c_str());
+ g_settings_schema_unref(schema);
+ }
+
+ return available;
+}
+
bool IsKeyBindingAllowed(std::string const& key)
{
if (std::find(begin(ALLOWED_XF86_KEYS), end(ALLOWED_XF86_KEYS), key) != end(ALLOWED_XF86_KEYS))
@@ -80,6 +98,9 @@ bool IsKeyBindingAllowed(std::string const& key)
for (auto const& setting : ALLOWED_MEDIA_KEYS)
{
+ if (!IsSettingKeyAvailable(media_settings, setting))
+ continue;
+
Accelerator media_key(glib::String(g_settings_get_string(media_settings, setting.c_str())).Str());
if (media_key == key_accelerator)
return true;
@@ -89,6 +110,9 @@ bool IsKeyBindingAllowed(std::string const& key)
for (auto const& setting : ALLOWED_WM_KEYS)
{
+ if (!IsSettingKeyAvailable(wm_settings, setting))
+ continue;
+
glib::Variant accels(g_settings_get_value(wm_settings, setting.c_str()), glib::StealRef());
auto children = g_variant_n_children(accels);
diff --git a/panel/PanelView.cpp b/panel/PanelView.cpp
index a8fbc4644..01c21b403 100644
--- a/panel/PanelView.cpp
+++ b/panel/PanelView.cpp
@@ -300,8 +300,9 @@ void
PanelView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
{
nux::Geometry const& geo = GetGeometry();
+ nux::Geometry const& geo_absolute = GetAbsoluteGeometry();
nux::Geometry const& mgeo = UScreen::GetDefault()->GetMonitorGeometry(monitor_);
- nux::Geometry isect = mgeo.Intersect(geo);
+ nux::Geometry isect = mgeo.Intersect(geo_absolute);
if(!isect.width || !isect.height)
return;
@@ -313,8 +314,6 @@ PanelView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
if (IsTransparent())
{
- nux::Geometry const& geo_absolute = GetAbsoluteGeometry();
-
if (BackgroundEffectHelper::blur_type != BLUR_NONE)
{
bg_blur_texture_ = bg_effect_helper_.GetBlurRegion();
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 521779596..eae3e412a 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -2986,7 +2986,7 @@ bool UnityWindow::glPaint(const GLWindowPaintAttrib& attrib,
uScreen->windows_for_monitor_[monitor] = 1;
if (!(mask & nonOcclusionBits) &&
- (window->state() & CompWindowStateFullscreenMask && !window->minimized()) &&
+ (window->state() & CompWindowStateFullscreenMask && !window->minimized() && !window->inShowDesktopMode()) &&
uScreen->windows_for_monitor_[monitor] == 1)
// And I've been advised to test other things, but they don't work:
// && (attrib.opacity == OPAQUE)) <-- Doesn't work; Only set in glDraw