diff -Nru unity-5.18.0/AUTHORS unity-5.20.0/AUTHORS --- unity-5.18.0/AUTHORS 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/AUTHORS 2013-04-12 08:24:42.000000000 +0000 @@ -114,6 +114,7 @@ Thomi Richards , Ted Gould Thomi Richards , Thomi Richards Thomi Richards , Tim Penhey + Timo Jyrinki Tim Penhey Tim Penhey , Gordon Allott Tim Penhey , Jason Smith diff -Nru unity-5.18.0/CMakeLists.txt unity-5.20.0/CMakeLists.txt --- unity-5.18.0/CMakeLists.txt 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/CMakeLists.txt 2013-04-12 08:24:42.000000000 +0000 @@ -8,7 +8,7 @@ # set (PROJECT_NAME "unity") set (UNITY_MAJOR 5) -set (UNITY_MINOR 18) +set (UNITY_MINOR 20) set (UNITY_MICRO 0) set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}") set (UNITY_API_VERSION "5.0") diff -Nru unity-5.18.0/ChangeLog unity-5.20.0/ChangeLog --- unity-5.18.0/ChangeLog 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/ChangeLog 2013-04-12 08:24:42.000000000 +0000 @@ -1,3 +1,75 @@ +2013-04-04 Marco Trevisan (Treviño) + + UnityWindow: properly draw the panel shadow when a Nux window is focused or during WS switch + + If a nux window is the active one, compiz won't draw it, so the code that is doing the + panelShadow drawing is excluded. We need to make sure that this will be executed + also in this case. + +2013-04-04 Marco Trevisan (Treviño) + + UnityShell: paint the panel shadow only if we don't have a mask set + +2013-04-04 Marco Trevisan (Treviño) + + UnityWindow: properly draw the panel shadow when a Nux window is focused or during WS switch + + If a nux window is the active one, compiz won't draw it, so the code that is doing the panelShadow drawing is excluded. We need to make sure that this will be executed also in this case. + +2013-04-03 Łukasz 'sil2100' Zemczak + + Partial backport of Unity trunk revno. 2901 to fix where window decorations are being drawn when they should not be (LP: #1122478) (LP: #1083186). + +2013-03-18 Chris Townsend + + Fix issue whare a window created without decorations would have decorations when maximizing and minimizing the window very quicly. This fix was taken from upstream Unity. + +2013-02-18 Andrea Azzarone + + Backport fix for 991637. + + Merged branch lp:~andyrock/unity/fix-991637-5.0 + +2013-02-14 Andrea Azzarone + + Backport fix for 991637. + +2013-01-31 Marco Trevisan (Treviño) + + ResultRendererTile: fix a crash if row.renderer() is null + +2013-01-30 Marco Trevisan (Treviño) + + test_service_lens: 12.04 has not preview support, fix compilation + +2013-01-30 Marco Trevisan (Treviño) + + ResultRendererTile: Fix compilation issue. + +2013-01-30 Marco Trevisan (Treviño) + + merging with lp:unity/5.0 + +2012-07-21 Marco Trevisan (Treviño) + + ResultRendererTile: don't crash in LoadIcon if row.renderer() is null + +2012-12-05 Brandon Schaefer + + Change TimeUtil to use int64, so the buffer wont overflow within our lifetimes.. Fixes: https://bugs.launchpad.net/bugs/806248. Approved by Łukasz Zemczak. + +2012-12-05 Brandon Schaefer + + * Fix header + +2012-12-03 Brandon Schaefer + + * Fix TimeUtil and int32 buffer overflow, now uses an int64 + +2012-11-12 Timo Jyrinki + + Release\ 5.18.0 + 2012-10-18 Andrea Azzarone Use linear filtering to draw icons (when needed).. Fixes: https://bugs.launchpad.net/bugs/1036231. Approved by Marco Trevisan (Treviño). diff -Nru unity-5.18.0/debian/changelog unity-5.20.0/debian/changelog --- unity-5.18.0/debian/changelog 2013-08-08 09:39:15.000000000 +0000 +++ unity-5.20.0/debian/changelog 2013-08-08 09:39:15.000000000 +0000 @@ -1,11 +1,37 @@ -unity (5.18.0-0ubuntu2+ti1.0) precise; urgency=low +unity (5.20.0-0ubuntu2+ti1.0) precise; urgency=low * Fix LP build * Adding dbus-glib and glibmodule as build dependencies (fix from upstream) * Build it just for ARMHF for now, we don't care about failures at other archs at this moment - -- Xavier Boudet Thu, 07 Feb 2013 10:33:31 +0100 + -- Xavier Boudet Wed, 31 Jul 2013 10:26:09 +0200 + +unity (5.20.0-0ubuntu2) precise; urgency=low + + * Check to see if the window is supposed to have decorations instead + of the window actually being decorated when Undecorate() is called. + This fixes a regression from the previous SRU where windows opened + maximized upon login could have extra decorations (LP: #1195730) + + -- Christopher Townsend Mon, 08 Jul 2013 09:37:30 -0600 + +unity (5.20.0-0ubuntu1) precise; urgency=low + + * New upstream release. + - ResultRendererTile: fix a crash if row.renderer() + is null (LP: #926658) + - Fix unity launcher vanishes when switching to mirrored displays + (LP: #991637) + - Fix window decorations being drawn when they should not be. + This fixes icaclient window "dancing" (LP: #1083186) and + hides decoration in a test case with Steam (LP: #1122478) + - [multimonitor] Dash - Opening dash or HUD on one screen removes panel + shadow on the other (LP: #892718) + - Press Alt+F1, panel’s shadow dissapear (LP: #942965) + * Cherry-pick a manual test for decorations fix + + -- Timo Jyrinki Fri, 12 Apr 2013 11:38:40 +0300 unity (5.18.0-0ubuntu2) precise; urgency=low diff -Nru unity-5.18.0/manual-tests/WindowButtons.txt unity-5.20.0/manual-tests/WindowButtons.txt --- unity-5.18.0/manual-tests/WindowButtons.txt 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/manual-tests/WindowButtons.txt 2013-08-08 09:39:15.000000000 +0000 @@ -9,3 +9,17 @@ Expected Result: * The close window button should be shown as disabled (grayed) + + +Custom window buttons and decorations always on desired windows +--------------------------------------------------------------- + +Actions: + * Start Steam on Ubuntu + * Maximize the Steam window + * Minimize the Steam window + * Un-minimize the Steam window + * Restore the Steam window + +Expected Result: + * Make sure that Steam does not have Ubuntu window decorations diff -Nru unity-5.18.0/plugins/unityshell/src/LauncherController.cpp unity-5.20.0/plugins/unityshell/src/LauncherController.cpp --- unity-5.18.0/plugins/unityshell/src/LauncherController.cpp 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/plugins/unityshell/src/LauncherController.cpp 2013-04-12 08:24:42.000000000 +0000 @@ -185,7 +185,7 @@ launchers[i] = nux::ObjectPtr(CreateLauncher(i)); } - int monitor = (num_launchers == 1) ? primary : i; + int monitor = (num_launchers == 1 && num_monitors > 1) ? primary : i; if (launchers[i]->monitor() != monitor) { diff -Nru unity-5.18.0/plugins/unityshell/src/PanelMenuView.cpp unity-5.20.0/plugins/unityshell/src/PanelMenuView.cpp --- unity-5.18.0/plugins/unityshell/src/PanelMenuView.cpp 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/plugins/unityshell/src/PanelMenuView.cpp 2013-04-12 08:24:42.000000000 +0000 @@ -1083,7 +1083,7 @@ // if we've just started tracking this window and it is maximized, let's // make sure it's undecorated just in case it slipped by us earlier // (I'm looking at you, Chromium!) - if (_is_maximized && wm->IsWindowDecorated(xid)) + if (_is_maximized && wm->HasWindowDecorations(xid)) { wm->Undecorate(xid); _maximized_set.insert(xid); @@ -1222,7 +1222,7 @@ } // update the state of the window in the _decor_map - _decor_map[xid] = WindowManager::Default()->IsWindowDecorated(xid); + _decor_map[xid] = WindowManager::Default()->HasWindowDecorations(xid); if (_decor_map[xid]) WindowManager::Default()->Undecorate(xid); @@ -1716,7 +1716,7 @@ { Window xid = bamf_window_get_xid(window); - _decor_map[xid] = WindowManager::Default()->IsWindowDecorated(xid); + _decor_map[xid] = WindowManager::Default()->HasWindowDecorations(xid); if (_decor_map[xid]) WindowManager::Default()->Undecorate(xid); diff -Nru unity-5.18.0/plugins/unityshell/src/PluginAdapter.cpp unity-5.20.0/plugins/unityshell/src/PluginAdapter.cpp --- unity-5.18.0/plugins/unityshell/src/PluginAdapter.cpp 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/plugins/unityshell/src/PluginAdapter.cpp 2013-08-08 09:39:15.000000000 +0000 @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* - * Copyright (C) 2010 Canonical Ltd + * Copyright (C) 2010-2012 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 @@ -42,7 +42,6 @@ #define MWM_HINTS_FUNCTIONS (1L << 0) #define MWM_HINTS_DECORATIONS (1L << 1) #define MWM_HINTS_UNDECORATED_UNITY 0x80 -#define _XA_MOTIF_WM_HINTS "_MOTIF_WM_HINTS" /* static */ PluginAdapter* @@ -151,13 +150,17 @@ void PluginAdapter::NotifyNewDecorationState(guint32 xid) { - bool wasTracked = (_window_decoration_state.find (xid) != _window_decoration_state.end ()); + auto deco_state_it = _window_decoration_state.find(xid); + bool wasTracked = (deco_state_it != _window_decoration_state.end()); bool wasDecorated = false; if (wasTracked) + { wasDecorated = _window_decoration_state[xid]; + _window_decoration_state.erase(deco_state_it); + } - bool decorated = IsWindowDecorated (xid); + bool decorated = HasWindowDecorations(xid); if (decorated == wasDecorated) return; @@ -415,44 +418,74 @@ return false; } -bool -PluginAdapter::IsWindowDecorated(guint32 xid) +unsigned long +PluginAdapter::GetMwnDecorations(Window window_id) const { Display* display = m_Screen->dpy(); - Window win = xid; - Atom hints_atom = None; MotifWmHints* hints = NULL; Atom type = None; gint format; gulong nitems; gulong bytes_after; - bool ret = true; - - hints_atom = XInternAtom(display, _XA_MOTIF_WM_HINTS, false); + unsigned long decorations = 0; - if (XGetWindowProperty(display, win, hints_atom, 0, + if (XGetWindowProperty(display, window_id, Atoms::mwmHints, 0, sizeof(MotifWmHints) / sizeof(long), False, - hints_atom, &type, &format, &nitems, &bytes_after, + Atoms::mwmHints, &type, &format, &nitems, &bytes_after, (guchar**)&hints) != Success) - return false; + { + return decorations; + } + + decorations |= (MwmDecorAll | MwmDecorTitle); if (!hints) - return ret; + return decorations; /* Check for the presence of the high bit * if present, it means that we undecorated * this window, so don't mark it as undecorated */ - if (type == hints_atom && format != 0 && - hints->flags & MWM_HINTS_DECORATIONS) + if (type == Atoms::mwmHints && format != 0 && hints->flags & MWM_HINTS_DECORATIONS) { - /* Must have both bits set */ - _window_decoration_state[xid] = ret = - (hints->decorations & (MwmDecorAll | MwmDecorTitle)) || - (hints->decorations & MWM_HINTS_UNDECORATED_UNITY); + decorations = hints->decorations; } XFree(hints); - return ret; + return decorations; +} + +bool +PluginAdapter::HasWindowDecorations(guint32 xid) const +{ + Window window_id = xid; + auto deco_state_it = _window_decoration_state.find(window_id); + + if (deco_state_it != _window_decoration_state.end()) + return deco_state_it->second; + + unsigned long decorations = GetMwnDecorations(window_id); + + /* Must have both bits set */ + bool decorated = (decorations & (MwmDecorAll | MwmDecorTitle)) || + (decorations & MWM_HINTS_UNDECORATED_UNITY); + + _window_decoration_state[window_id] = decorated; + return decorated; +} + +bool +PluginAdapter::IsWindowDecorated(guint32 xid) +{ + Window window_id = xid; + + bool decorated = GetMwnDecorations(window_id) & (MwmDecorAll | MwmDecorTitle); + + if (decorated && GetCardinalProperty(window_id, Atoms::frameExtents).empty()) + { + decorated = false; + } + + return decorated; } bool @@ -1023,7 +1056,6 @@ PluginAdapter::SetMwmWindowHints(Window xid, MotifWmHints* new_hints) { Display* display = m_Screen->dpy(); - Atom hints_atom = None; MotifWmHints* data = NULL; MotifWmHints* hints = NULL; Atom type = None; @@ -1031,18 +1063,16 @@ gulong nitems; gulong bytes_after; - hints_atom = XInternAtom(display, _XA_MOTIF_WM_HINTS, false); - if (XGetWindowProperty(display, xid, - hints_atom, 0, sizeof(MotifWmHints) / sizeof(long), + Atoms::mwmHints, 0, sizeof(MotifWmHints) / sizeof(long), False, AnyPropertyType, &type, &format, &nitems, &bytes_after, (guchar**)&data) != Success) { return; } - if (type != hints_atom || !data) + if (type != Atoms::mwmHints || !data) { hints = new_hints; } @@ -1064,7 +1094,7 @@ XChangeProperty(display, xid, - hints_atom, hints_atom, 32, PropModeReplace, + Atoms::mwmHints, Atoms::mwmHints, 32, PropModeReplace, (guchar*)hints, sizeof(MotifWmHints) / sizeof(long)); if (data) @@ -1074,6 +1104,9 @@ void PluginAdapter::Decorate(guint32 xid) { + if (!HasWindowDecorations(xid)) + return; + MotifWmHints hints = { 0 }; hints.flags = MWM_HINTS_DECORATIONS; @@ -1085,6 +1118,9 @@ void PluginAdapter::Undecorate(guint32 xid) { + if (!HasWindowDecorations(xid)) + return; + MotifWmHints hints = { 0 }; /* Set the high bit to indicate that we undecorated this @@ -1319,3 +1355,29 @@ .add("expo_active", IsExpoActive()) .add("viewport_switch_running", IsViewPortSwitchStarted()); } + +std::vector PluginAdapter::GetCardinalProperty(Window window_id, Atom atom) const +{ + Atom type; + int result, format; + unsigned long n_items, bytes_after; + long *buf = nullptr; + + result = XGetWindowProperty(m_Screen->dpy(), window_id, atom, 0L, 65536, False, + XA_CARDINAL, &type, &format, &n_items, &bytes_after, + reinterpret_cast(&buf)); + + std::unique_ptr buffer(buf, XFree); + + if (result == Success && type == XA_CARDINAL && format == 32 && buffer && n_items > 0) + { + std::vector values(n_items); + + for (unsigned i = 0; i < n_items; ++i) + values[i] = buffer[i]; + + return values; + } + + return std::vector(); +} diff -Nru unity-5.18.0/plugins/unityshell/src/PluginAdapter.h unity-5.20.0/plugins/unityshell/src/PluginAdapter.h --- unity-5.18.0/plugins/unityshell/src/PluginAdapter.h 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/plugins/unityshell/src/PluginAdapter.h 2013-04-12 08:24:42.000000000 +0000 @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* - * Copyright (C) 2010 Canonical Ltd + * Copyright (C) 2010-2012 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 @@ -125,6 +125,7 @@ bool IsWindowClosable(guint32 xid); bool IsWindowMinimizable(guint32 xid); bool IsWindowMaximizable(guint32 xid); + bool HasWindowDecorations(guint32 xid) const; void Restore(guint32 xid); void RestoreAt(guint32 xid, int x, int y); @@ -174,6 +175,9 @@ bool CheckWindowIntersection(nux::Geometry const& region, CompWindow* window); void SetMwmWindowHints(Window xid, MotifWmHints* new_hints); + unsigned long GetMwnDecorations(Window xid) const; + + std::vector GetCardinalProperty(Window xid, Atom atom) const; CompScreen* m_Screen; MultiActionList m_ExpoActionList; @@ -193,7 +197,7 @@ bool _in_show_desktop; CompWindow* _last_focused_window; - std::map _window_decoration_state; + mutable std::map _window_decoration_state; static PluginAdapter* _default; }; diff -Nru unity-5.18.0/plugins/unityshell/src/ResultRendererTile.cpp unity-5.20.0/plugins/unityshell/src/ResultRendererTile.cpp --- unity-5.18.0/plugins/unityshell/src/ResultRendererTile.cpp 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/plugins/unityshell/src/ResultRendererTile.cpp 2013-04-12 08:24:42.000000000 +0000 @@ -21,14 +21,10 @@ */ -#include // for ostringstream #include "ResultRendererTile.h" -#include - #include #include -#include #include #include @@ -51,6 +47,7 @@ namespace { nux::logging::Logger logger("unity.dash.results"); +const std::string DEFAULT_GICON = ". GThemedIcon text-x-preview"; const int FONT_SIZE = 10; } @@ -230,7 +227,7 @@ void ResultRendererTile::Preload(Result& row) { - if (row.renderer() == nullptr) + if (!row.renderer()) { row.set_renderer(new TextureContainer()); LoadIcon(row); @@ -240,17 +237,25 @@ void ResultRendererTile::Unload(Result& row) { - TextureContainer *container = row.renderer(); - delete container; + delete row.renderer(); row.set_renderer(nullptr); } void ResultRendererTile::LoadIcon(Result& row) { + auto container = row.renderer(); + + if (!container) + { + LOG_ERROR(logger) << "No valid container for Result " << row.name() << " with URI " + << row.uri(); + return; + } + Style& style = Style::Instance(); std::string const& icon_hint = row.icon_hint; -#define DEFAULT_GICON ". GThemedIcon text-x-preview" std::string icon_name; + if (G_UNLIKELY(neko)) { int tmp1 = style.GetTileIconSize() + (rand() % 16) - 8; @@ -266,28 +271,25 @@ icon_name = !icon_hint.empty() ? icon_hint : DEFAULT_GICON; } + auto slot = sigc::bind(sigc::mem_fun(this, &ResultRendererTile::IconLoaded), icon_hint, row); - - GIcon* icon = g_icon_new_for_string(icon_name.c_str(), NULL); - TextureContainer* container = row.renderer(); - - IconLoader::IconLoaderCallback slot = sigc::bind(sigc::mem_fun(this, &ResultRendererTile::IconLoaded), icon_hint, row); - - if (g_strrstr(icon_name.c_str(), "://")) + if (icon_name.find("://") != std::string::npos) { container->slot_handle = IconLoader::GetDefault().LoadFromURI(icon_name, style.GetTileIconSize(), slot); } - else if (G_IS_ICON(icon)) - { - container->slot_handle = IconLoader::GetDefault().LoadFromGIconString(icon_name, style.GetTileIconSize(), slot); - } else { - container->slot_handle = IconLoader::GetDefault().LoadFromIconName(icon_name, style.GetTileIconSize(), slot); - } + glib::Object icon(g_icon_new_for_string(icon_name.c_str(), nullptr)); - if (icon != NULL) - g_object_unref(icon); + if (G_IS_ICON(icon.RawPtr())) + { + container->slot_handle = IconLoader::GetDefault().LoadFromGIconString(icon_name, style.GetTileIconSize(), slot); + } + else + { + container->slot_handle = IconLoader::GetDefault().LoadFromIconName(icon_name, style.GetTileIconSize(), slot); + } + } } nux::BaseTexture* ResultRendererTile::CreateTextureCallback(std::string const& texid, diff -Nru unity-5.18.0/plugins/unityshell/src/WindowManager.cpp unity-5.20.0/plugins/unityshell/src/WindowManager.cpp --- unity-5.18.0/plugins/unityshell/src/WindowManager.cpp 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/plugins/unityshell/src/WindowManager.cpp 2013-04-12 08:24:42.000000000 +0000 @@ -58,6 +58,11 @@ return true; } + bool HasWindowDecorations(guint32 xid) const + { + return true; + } + bool IsWindowOnCurrentDesktop(guint32 xid) { return true; diff -Nru unity-5.18.0/plugins/unityshell/src/WindowManager.h unity-5.20.0/plugins/unityshell/src/WindowManager.h --- unity-5.18.0/plugins/unityshell/src/WindowManager.h 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/plugins/unityshell/src/WindowManager.h 2013-04-12 08:24:42.000000000 +0000 @@ -61,6 +61,7 @@ virtual bool IsWindowClosable(guint32 xid) = 0; virtual bool IsWindowMinimizable(guint32 xid) = 0; virtual bool IsWindowMaximizable(guint32 xid) = 0; + virtual bool HasWindowDecorations(guint32 xid) const = 0; virtual void ShowDesktop() = 0; diff -Nru unity-5.18.0/plugins/unityshell/src/unityshell.cpp unity-5.20.0/plugins/unityshell/src/unityshell.cpp --- unity-5.18.0/plugins/unityshell/src/unityshell.cpp 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/plugins/unityshell/src/unityshell.cpp 2013-04-12 08:24:42.000000000 +0000 @@ -592,18 +592,8 @@ // compiz doesn't use the same method of tracking monitors as our toolkit // we need to make sure we properly associate with the right monitor - int current_monitor = -1; - auto monitors = UScreen::GetDefault()->GetMonitors(); - int i = 0; - for (auto monitor : monitors) - { - if (monitor.x == output->x() && monitor.y == output->y()) - { - current_monitor = i; - break; - } - i++; - } + auto const& uscreen = UScreen::GetDefault(); + int current_monitor = uscreen->GetMonitorAtPosition(output->x(), output->y()); if (!(launcher_controller_->IsOverlayOpen() && current_monitor == dash_monitor_) && panel_controller_->opacity() > 0.0f) @@ -671,18 +661,8 @@ // compiz doesn't use the same method of tracking monitors as our toolkit // we need to make sure we properly associate with the right monitor - int current_monitor = -1; - auto monitors = UScreen::GetDefault()->GetMonitors(); - int i = 0; - for (auto monitor : monitors) - { - if (monitor.x == output->x() && monitor.y == output->y()) - { - current_monitor = i; - break; - } - i++; - } + auto const& uscreen = UScreen::GetDefault(); + int current_monitor = uscreen->GetMonitorAtPosition(output->x(), output->y()); if (!(launcher_controller_->IsOverlayOpen() && current_monitor == dash_monitor_) && panel_controller_->opacity() > 0.0f) @@ -2345,7 +2325,7 @@ return "Unity"; } -bool isNuxWindow (CompWindow* value) +bool isNuxWindow(CompWindow* value) { std::vector const& xwns = nux::XInputWindow::NativeHandleList(); auto id = value->id(); @@ -2394,13 +2374,21 @@ * fully covers the shell on its output. It does not include regular windows * stacked above the shell like DnD icons or Onboard etc. */ - if (isNuxWindow(window)) + if (G_UNLIKELY(is_nux_window_)) { if (mask & PAINT_WINDOW_OCCLUSION_DETECTION_MASK) { uScreen->nuxRegion += window->geometry(); uScreen->nuxRegion -= uScreen->fullscreenRegion; } + + if (window->id() == screen->activeWindow() && + !(mask & PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK)) + { + if (!mask) + uScreen->paintPanelShadow(matrix); + } + return false; // Ensure nux windows are never painted by compiz } else if (mask & PAINT_WINDOW_OCCLUSION_DETECTION_MASK) @@ -2483,8 +2471,7 @@ if (uScreen->doShellRepaint && !uScreen->forcePaintOnTop () && window == uScreen->firstWindowAboveShell && - !uScreen->fullscreenRegion.contains(window->geometry()) - ) + !uScreen->fullscreenRegion.contains(window->geometry())) { #ifdef USE_GLES uScreen->paintDisplay(); @@ -3154,6 +3141,7 @@ , mMinimizeHandler() , mShowdesktopHandler(nullptr) , focusdesktop_handle_(0) + , is_nux_window_(isNuxWindow(window)) { WindowInterface::setHandler(window); GLWindowInterface::setHandler(gWindow); diff -Nru unity-5.18.0/plugins/unityshell/src/unityshell.h unity-5.20.0/plugins/unityshell/src/unityshell.h --- unity-5.18.0/plugins/unityshell/src/unityshell.h 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/plugins/unityshell/src/unityshell.h 2013-04-12 08:24:42.000000000 +0000 @@ -434,8 +434,8 @@ unsigned int GetNoCoreInstanceMask (); compiz::WindowInputRemoverLock::Ptr GetInputRemover (); - compiz::WindowInputRemoverLock::Weak input_remover_; + bool is_nux_window_; }; diff -Nru unity-5.18.0/tests/test_launcher_controller.cpp unity-5.20.0/tests/test_launcher_controller.cpp --- unity-5.18.0/tests/test_launcher_controller.cpp 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/tests/test_launcher_controller.cpp 2013-04-12 08:24:42.000000000 +0000 @@ -111,6 +111,16 @@ } } +TEST_F(TestLauncherController, MirroredMultimonitorSingleLauncherOnExternalMonitor) +{ + // See lp bug 991637 + lc.multiple_launchers = false; + uscreen.SetPrimary(1); + + ASSERT_EQ(lc.launchers().size(), 1); + ASSERT_EQ(lc.launcher().monitor(), 0); +} + TEST_F(TestLauncherController, MultimonitorSwitchToMultipleLaunchers) { lc.multiple_launchers = false; diff -Nru unity-5.18.0/tests/test_service_lens.c unity-5.20.0/tests/test_service_lens.c --- unity-5.18.0/tests/test_service_lens.c 2012-11-12 12:11:59.000000000 +0000 +++ unity-5.20.0/tests/test_service_lens.c 2013-04-12 08:24:42.000000000 +0000 @@ -8,7 +8,6 @@ static void add_filters(ServiceLens *self); static void on_search_changed(UnityScope* scope, UnityLensSearch *lens_search, UnitySearchType search_type, GCancellable *canc, ServiceLens* self); static UnityActivationResponse* on_activate_uri(UnityScope* scope, const char* uri, ServiceLens* self); -static UnityPreview* on_preview_uri(UnityScope* scope, const char* uri, ServiceLens *self); struct _ServiceLensPrivate { @@ -59,8 +58,6 @@ G_CALLBACK(on_search_changed), self); g_signal_connect(priv->scope, "activate-uri", G_CALLBACK(on_activate_uri), self); - g_signal_connect(priv->scope, "preview-uri", - G_CALLBACK(on_preview_uri), self); /* Get ready to export and export */ unity_lens_add_local_scope(priv->lens, priv->scope); @@ -183,18 +180,6 @@ return unity_activation_response_new(UNITY_HANDLED_TYPE_HIDE_DASH, ""); } -static UnityPreview* -on_preview_uri(UnityScope* scope, const char* uri, ServiceLens *self) -{ - gchar *genres[] = {"awesome"}; - return (UnityPreview*)unity_track_preview_new(1, "Animus Vox", - "The Glitch Mob", "Drink The Sea", - 404, genres, 1, - "file://music/the/track", "Play", - "", "play://music/the/track", - "preview://music/the/track", "pause://music/the/track"); -} - ServiceLens* service_lens_new() {