Merge lp:~unity-team/unity/trusty-sru-7.2.6 into lp:unity/7.2

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 3835
Proposed branch: lp:~unity-team/unity/trusty-sru-7.2.6
Merge into: lp:unity/7.2
Diff against target: 1554 lines (+547/-141)
43 files modified
CMakeLists.txt (+1/-1)
ChangeLog (+182/-0)
UnityCore/GLibDBusProxy.cpp (+16/-3)
UnityCore/GnomeSessionManager.cpp (+6/-1)
dash/DashController.cpp (+2/-0)
dash/DashController.h (+0/-1)
dash/DashView.cpp (+72/-32)
dash/DashView.h (+3/-3)
dash/PlacesGroup.cpp (+13/-2)
dash/PlacesGroup.h (+1/-0)
dash/ResultView.cpp (+25/-0)
dash/ResultView.h (+6/-4)
dash/ResultViewGrid.cpp (+29/-13)
dash/ScopeView.cpp (+20/-22)
dash/ScopeView.h (+2/-0)
debian/changelog (+51/-0)
decorations/DecoratedWindow.cpp (+5/-0)
decorations/DecoratedWindow.h (+1/-0)
decorations/DecorationsManager.cpp (+5/-1)
hud/HudButton.cpp (+0/-5)
hud/HudController.cpp (+2/-0)
hud/HudController.h (+0/-1)
launcher/DeviceNotificationDisplayImp.cpp (+0/-1)
launcher/LauncherController.cpp (+2/-2)
launcher/LauncherIcon.cpp (+9/-4)
panel/PanelView.cpp (+18/-0)
panel/PanelView.h (+1/-0)
plugins/unityshell/src/unityshell.cpp (+16/-2)
plugins/unityshell/unityshell.xml.in (+6/-0)
unity-shared/BGHash.cpp (+5/-2)
unity-shared/CompizUtils.cpp (+0/-3)
unity-shared/OverlayRenderer.cpp (+2/-0)
unity-shared/OverlayScrollView.cpp (+5/-1)
unity-shared/OverlayScrollView.h (+2/-0)
unity-shared/OverlayWindowButtons.cpp (+3/-3)
unity-shared/PlacesOverlayVScrollBar.cpp (+5/-0)
unity-shared/PlacesOverlayVScrollBar.h (+8/-6)
unity-shared/PluginAdapter.cpp (+5/-1)
unity-shared/SearchBar.cpp (+9/-23)
unity-shared/SearchBar.h (+1/-3)
unity-shared/UnitySettings.cpp (+6/-1)
unity-shared/UnitySettings.h (+1/-0)
unity-shared/WindowButtons.cpp (+1/-0)
To merge this branch: bzr merge lp:~unity-team/unity/trusty-sru-7.2.6
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
Review via email: mp+274599@code.launchpad.net

Commit message

Releasing 7.2.6

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2015-04-16 15:55:07 +0000
+++ CMakeLists.txt 2015-10-20 18:34:31 +0000
@@ -10,7 +10,7 @@
10set (PROJECT_NAME "unity")10set (PROJECT_NAME "unity")
11set (UNITY_MAJOR 7)11set (UNITY_MAJOR 7)
12set (UNITY_MINOR 2)12set (UNITY_MINOR 2)
13set (UNITY_MICRO 5)13set (UNITY_MICRO 6)
14set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}")14set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}")
15set (UNITY_API_VERSION "6.0")15set (UNITY_API_VERSION "6.0")
16set (UNITY_COMPONENTS_VERSION "6")16set (UNITY_COMPONENTS_VERSION "6")
1717
=== modified file 'ChangeLog'
--- ChangeLog 2015-04-16 15:55:07 +0000
+++ ChangeLog 2015-10-20 18:34:31 +0000
@@ -1,3 +1,185 @@
12015-10-15 Marco Trevisan (Treviño) <mail@3v1n0.net>
2
3 * Releasing 7.2.6
4 * Updating ChangeLog
5
62015-10-15 Marco Trevisan (Treviño) <mail@3v1n0.net>
7
8 New stable release
9
102015-10-15 Andrea Azzarone andrea.azzarone@canonical.com
11
12 Merge patch from https://launchpadlibrarian.net/216276242/low-gfx-override.patch
13
142015-10-15 Chris Townsend <christopher.townsend@canonical.com>
15
16 When looking for the top-most valid window in a VP, also check if the window is focused if the window is set to Always on Top. This allows Launcher icon spread to work properly when a window is minimized an Always on Top exists in the group.
17
182015-10-15 Chris Townsend <christopher.townsend@canonical.com>
19
20 Wait on Spread to be terminated before showing the Quicklist.
21
222015-10-15 Marco Trevisan (Treviño) <mail@3v1n0.net>
23
24 ResultViewGrid: wait for double-click event only if the relative result needs the Preview
25
26 This was causing a 500ms delay between the user click and some results (apps) activation.
27 Also, at this point, we can get rid of PREVIEW_LEFT_BUTTON activation type. , #1447372
28
292015-10-15 Chris Townsend <christopher.townsend@canonical.com>
30
31 If dragging an application:// uri type from the Dash to the desktop, change it to a file:// uri type so Nautilus can understand the type a make a copy of it on the desktop.
32
332015-10-15 Chris Townsend <christopher.townsend@canonical.com>
34
35 Enable real page up/page down key navigation in the Dash. When using these keys the view scrolls the length of the visible view.
36
372015-10-15 Chris Townsend <christopher.townsend@canonical.com>
38
39 Save the active window when showing the Hud so the correct window is focused when hiding the Hud. Fixes issue when "Always on Top" windows are present.
40
412015-10-15 Chris Townsend <christopher.townsend@canonical.com>
42
43 Save the active window when showing the Dash so the correct window is focused when hiding the Dash. Fixes issue when "Always on Top" windows are present.
44
452015-10-15 Andrea Azzarone azzaronea@gmail.com
46
47 Properly hide decorations when on "Show Desktop" mode.
48
492015-10-15 Andrea Azzarone andrea.azzarone@canonical.com
50
51 Do not handle events coming from viewports not actually containing the window.
52
532015-10-15 Chris Townsend <christopher.townsend@canonical.com>
54
55 When using keyboard navigation in the Dash, skip category headers that are not expandable. Also, do not highlight the category header when the mouse cursor is over it.
56
572015-10-15 Chris Townsend <christopher.townsend@canonical.com>
58
59 Also use the Compiz show() method when forcing an unmapped window to be visible when clicking on it's active Launcher icon.
60
612015-10-15 Andrea Azzarone andrea.azzarone@canonical.com
62
63 Make sure new icons are added to the model before calling SortAndUpdate.
64
652015-10-15 Marco Trevisan (Treviño) <mail@3v1n0.net>
66
67 OverlayWindowButtons: trigger a queuedraw also when a child requires a redraw
68
692015-10-15 Chris Townsend <christopher.townsend@canonical.com>
70
71 Add option to enable and disable Unity low graphics mode on the fly in ccsm or via gsettings.
72
732015-10-15 Marco Trevisan (Treviño) <mail@3v1n0.net>
74
75 GnomeSessionManager: Request ScreenSaver (de)activation on VT changes
76
77 Connect to login1 session active property, and monitor its state.
78 When the session is active we can safely request the screensaver to stop.
79
802015-06-03 CI Train Bot <ci-train-bot@canonical.com>
81
82 Releasing 7.2.5+14.04.20150603-0ubuntu1
83
842015-06-03 Chris Townsend <christopher.townsend@canonical.com>
85
86 Revert rev. 3810 due to a crash being seen on Trusty when the lockscreen is activated. Fixes: #1451613
87 Approved by: PS Jenkins bot, Stephen M. Webb
88
892015-06-03 Chris Townsend <christopher.townsend@canonical.com>
90
91 Revert rev. 3810 due to a crash being seen on Trusty when the lockscreen is activated.
92
932015-05-21 CI Train Bot <ci-train-bot@canonical.com>
94
95 Releasing 7.2.5+14.04.20150521.1-0ubuntu1
96
972015-05-21 Stephen M. Webb <stephen.webb@canonical.com>
98
99 AP tests: accounted for arbitrarily-raised exceptions in checking scaled windows Fixes: #1436095
100 Approved by: Stephen M. Webb, PS Jenkins bot
101
1022015-05-15 Stephen M. Webb <stephen.webb@canonical.com>
103
104 AP tests: accounted for arbitrarily-raised exceptions in checking scaled windows
105
1062015-05-21 Andrea Azzarone <azzaronea@gmail.com>
107
108 Forward first key event that happens on top of the blank window to the lockscreen. Fixes: #1308265
109 Approved by: Stephen M. Webb, PS Jenkins bot
110
1112015-05-15 Andrea Azzarone <azzaronea@gmail.com>
112
113 Forward first key event that happens on top of the blank window to the lockscreen.
114
1152015-05-21 Andrea Azzarone <azzaronea@gmail.com>
116
117 Release pointer barrier if launcher is in lock_hide state. Fixes: #1029114
118 Approved by: Stephen M. Webb, PS Jenkins bot
119
1202015-05-15 Andrea Azzarone <azzaronea@gmail.com>
121
122 Release pointer barrier if launcher is in lock_hide state.
123
1242015-05-21 Andrea Azzarone <azzaronea@gmail.com>
125
126 Make sure scope_views_[filter.id] exists before using operator[] on it. Fixes: #926979
127 Approved by: Stephen M. Webb, PS Jenkins bot
128
1292015-05-15 Andrea Azzarone <azzaronea@gmail.com>
130
131 Make sure scope_views_[filter.id] exists before using operator[] on it.
132
1332015-05-21 Andrea Azzarone <azzaronea@gmail.com>
134
135 Do not restore focus if a quicklist is opened during launcher key navigation. Fixes: #932486
136 Approved by: Stephen M. Webb, PS Jenkins bot
137
1382015-05-15 Andrea Azzarone <azzaronea@gmail.com>
139
140 Do not restore focus if a quicklist is opened during launcher key navigation.
141
1422015-05-21 Brandon Schaefer <brandontschaefer@gmail.com>
143
144 When we quit the quicklist it would check if the mouse was over the launcher, if it wasn't it would fold the launcher. We don't need to check this if we are in keynav as we want all the icons to be unfolded. Fixes: #1246891
145 Approved by: Stephen M. Webb, PS Jenkins bot
146
1472015-05-15 Brandon Schaefer <brandontschaefer@gmail.com>
148
149 When we quit the quicklist it would check if the mouse was over the launcher, if it wasn't it would fold the launcher. We don't need to check this if we are in keynav as we want all the icons to be unfolded.
150
1512015-05-21 Chris Townsend <christopher.townsend@canonical.com>
152
153 Use a 2 second delay before showing the first run shortcut hints to workaround a race condition on input handling. Fixes: #1313597
154 Approved by: Stephen M. Webb, PS Jenkins bot
155
1562015-05-15 Chris Townsend <christopher.townsend@canonical.com>
157
158 Use a 2 second delay before showing the first run shortcut hints to workaround a race condition on input handling.
159
1602015-05-21 Andrea Azzarone <azzaronea@gmail.com>
161
162 Draw osk above unity shell. Fixes: #1413165
163 Approved by: Stephen M. Webb, PS Jenkins bot
164
1652015-05-15 Andrea Azzarone <azzaronea@gmail.com>
166
167 Draw osk above unity shell.
168
1692015-05-21 Andrea Azzarone <azzaronea@gmail.com>
170
171 Add the possibility to specify the font size and the font weight without chaning the default font name. Fixes: #886478
172 Approved by: Stephen M. Webb, PS Jenkins bot
173
1742015-05-15 Andrea Azzarone <azzaronea@gmail.com>
175
176 Add the possibility to specify the font size and the font weight without chaning the default font name.
177
1782015-04-16 Chris Townsend <christopher.townsend@canonical.com>
179
180 * Releasing 7.2.5.
181 * Bump version to 7.2.5.
182
12015-03-16 CI Train Bot <ci-train-bot@canonical.com>1832015-03-16 CI Train Bot <ci-train-bot@canonical.com>
2184
3 Releasing 7.2.4+14.04.20150316-0ubuntu1185 Releasing 7.2.4+14.04.20150316-0ubuntu1
4186
=== modified file 'UnityCore/GLibDBusProxy.cpp'
--- UnityCore/GLibDBusProxy.cpp 2014-12-16 19:27:36 +0000
+++ UnityCore/GLibDBusProxy.cpp 2015-10-20 18:34:31 +0000
@@ -89,7 +89,7 @@
8989
90 void OnProxyNameOwnerChanged(GDBusProxy*, GParamSpec*);90 void OnProxyNameOwnerChanged(GDBusProxy*, GParamSpec*);
91 void OnProxySignal(GDBusProxy* proxy, const char*, const char*, GVariant*);91 void OnProxySignal(GDBusProxy* proxy, const char*, const char*, GVariant*);
92 void OnPropertyChanged(GDBusProxy*, GVariant*, GStrv*);92 void OnPropertyChanged(GDBusProxy*, GVariant*, GStrv);
9393
94 static void OnProxyConnectCallback(GObject* source, GAsyncResult* res, gpointer impl);94 static void OnProxyConnectCallback(GObject* source, GAsyncResult* res, gpointer impl);
95 static void OnCallCallback(GObject* source, GAsyncResult* res, gpointer call_data);95 static void OnCallCallback(GObject* source, GAsyncResult* res, gpointer call_data);
@@ -114,7 +114,7 @@
114 unsigned reconnection_attempts_;114 unsigned reconnection_attempts_;
115115
116 glib::Signal<void, GDBusProxy*, const char*, const char*, GVariant*> g_signal_connection_;116 glib::Signal<void, GDBusProxy*, const char*, const char*, GVariant*> g_signal_connection_;
117 glib::Signal<void, GDBusProxy*, GVariant*, GStrv*> g_property_signal_;117 glib::Signal<void, GDBusProxy*, GVariant*, GStrv> g_property_signal_;
118 glib::Signal<void, GDBusProxy*, GParamSpec*> name_owner_signal_;118 glib::Signal<void, GDBusProxy*, GParamSpec*> name_owner_signal_;
119 glib::Source::UniquePtr reconnect_timeout_;119 glib::Source::UniquePtr reconnect_timeout_;
120 sigc::signal<void> proxy_acquired;120 sigc::signal<void> proxy_acquired;
@@ -277,7 +277,7 @@
277 }277 }
278}278}
279279
280void DBusProxy::Impl::OnPropertyChanged(GDBusProxy* proxy, GVariant* changed_props, GStrv* invalidated)280void DBusProxy::Impl::OnPropertyChanged(GDBusProxy* proxy, GVariant* changed_props, GStrv invalidated)
281{281{
282 LOG_DEBUG(logger) << "Properties changed for proxy (" << object_path_ << ")";282 LOG_DEBUG(logger) << "Properties changed for proxy (" << object_path_ << ")";
283283
@@ -303,6 +303,19 @@
303303
304 g_variant_iter_free (iter);304 g_variant_iter_free (iter);
305 }305 }
306
307 for (const gchar *property_name = *invalidated; property_name; property_name = *(++invalidated))
308 {
309 LOG_DEBUG(logger) << "Property: '" << property_name << "' invalidated";
310
311 auto handler_it = property_handlers_.find(property_name);
312
313 if (handler_it != property_handlers_.end())
314 {
315 for (ReplyCallback const& callback : handler_it->second)
316 callback(nullptr);
317 }
318 }
306}319}
307320
308void DBusProxy::Impl::WaitForProxy(GCancellable* cancellable,321void DBusProxy::Impl::WaitForProxy(GCancellable* cancellable,
309322
=== modified file 'UnityCore/GnomeSessionManager.cpp'
--- UnityCore/GnomeSessionManager.cpp 2015-03-16 17:29:46 +0000
+++ UnityCore/GnomeSessionManager.cpp 2015-10-20 18:34:31 +0000
@@ -104,7 +104,8 @@
104 login_proxy_ = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.freedesktop.login1",104 login_proxy_ = std::make_shared<glib::DBusProxy>(test_mode_ ? testing::DBUS_NAME : "org.freedesktop.login1",
105 "/org/freedesktop/login1/session/" + glib::gchar_to_string(session_id),105 "/org/freedesktop/login1/session/" + glib::gchar_to_string(session_id),
106 "org.freedesktop.login1.Session",106 "org.freedesktop.login1.Session",
107 test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM);107 test_mode_ ? G_BUS_TYPE_SESSION : G_BUS_TYPE_SYSTEM,
108 G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES);
108109
109 login_proxy_->Connect("Lock", [this](GVariant*){110 login_proxy_->Connect("Lock", [this](GVariant*){
110 manager_->PromptLockScreen();111 manager_->PromptLockScreen();
@@ -113,6 +114,10 @@
113 login_proxy_->Connect("Unlock", [this](GVariant*){114 login_proxy_->Connect("Unlock", [this](GVariant*){
114 manager_->unlock_requested.emit();115 manager_->unlock_requested.emit();
115 });116 });
117
118 login_proxy_->ConnectProperty("Active", [this] (GVariant* active) {
119 manager_->screensaver_requested.emit(!glib::Variant(active).GetBool());
120 });
116 }121 }
117122
118 {123 {
119124
=== modified file 'dash/DashController.cpp'
--- dash/DashController.cpp 2014-07-24 14:03:10 +0000
+++ dash/DashController.cpp 2015-10-20 18:34:31 +0000
@@ -308,6 +308,8 @@
308 return false;308 return false;
309 }309 }
310310
311 wm.SaveInputFocus();
312
311 EnsureDash();313 EnsureDash();
312 monitor_ = GetIdealMonitor();314 monitor_ = GetIdealMonitor();
313 screen_ungrabbed_slot_->disconnect();315 screen_ungrabbed_slot_->disconnect();
314316
=== modified file 'dash/DashController.h'
--- dash/DashController.h 2014-04-25 02:42:01 +0000
+++ dash/DashController.h 2015-10-20 18:34:31 +0000
@@ -21,7 +21,6 @@
2121
22#include <memory>22#include <memory>
2323
24#include <gdk/gdk.h>
25#include <UnityCore/ConnectionManager.h>24#include <UnityCore/ConnectionManager.h>
26#include <UnityCore/GLibDBusServer.h>25#include <UnityCore/GLibDBusServer.h>
27#include <UnityCore/GLibSignal.h>26#include <UnityCore/GLibSignal.h>
2827
=== modified file 'dash/DashView.cpp'
--- dash/DashView.cpp 2015-05-15 15:52:31 +0000
+++ dash/DashView.cpp 2015-10-20 18:34:31 +0000
@@ -59,7 +59,7 @@
59const RawPixel PREVIEW_CONTAINER_TRIANGLE_WIDTH = 14_em;59const RawPixel PREVIEW_CONTAINER_TRIANGLE_WIDTH = 14_em;
60const RawPixel PREVIEW_CONTAINER_TRIANGLE_HEIGHT = 12_em;60const RawPixel PREVIEW_CONTAINER_TRIANGLE_HEIGHT = 12_em;
6161
62const int MAX_ENTRY_ACTIVATE_WAIT_TIMEOUT = 1000;62const int MAX_ENTRY_ACTIVATE_WAIT_TIMEOUT = 300;
63}63}
6464
65// This is so we can access some protected members in nux::VLayout and65// This is so we can access some protected members in nux::VLayout and
@@ -120,7 +120,6 @@
120 , preview_displaying_(false)120 , preview_displaying_(false)
121 , preview_navigation_mode_(previews::Navigation::NONE)121 , preview_navigation_mode_(previews::Navigation::NONE)
122 , last_activated_timestamp_(0)122 , last_activated_timestamp_(0)
123 , search_in_progress_(false)
124 , activate_on_finish_(false)123 , activate_on_finish_(false)
125 , visible_(false)124 , visible_(false)
126 , opening_column_x_(-1)125 , opening_column_x_(-1)
@@ -1221,21 +1220,27 @@
12211220
1222void DashView::OnSearchChanged(std::string const& search_string)1221void DashView::OnSearchChanged(std::string const& search_string)
1223{1222{
1224 search_in_progress_ = true;1223 activate_on_finish_ = false;
1225}1224}
12261225
1227void DashView::OnLiveSearchReached(std::string const& search_string)1226void DashView::OnLiveSearchReached(std::string const& search_string)
1228{1227{
1229 // reset and set it again once we're sure a search is happening
1230 search_in_progress_ = false;
1231
1232 LOG_DEBUG(logger) << "Live search reached: " << search_string;1228 LOG_DEBUG(logger) << "Live search reached: " << search_string;
1233 if (active_scope_view_)1229 if (!active_scope_view_.IsValid())
1230 return;
1231
1232 if (active_scope_view_->PerformSearch(search_string, sigc::mem_fun(this, &DashView::OnScopeSearchFinished)))
1234 {1233 {
1235 if (active_scope_view_->PerformSearch(search_string, sigc::mem_fun(this, &DashView::OnScopeSearchFinished)))1234 activate_delay_.reset(new glib::Timeout(MAX_ENTRY_ACTIVATE_WAIT_TIMEOUT, [this] {
1236 {1235 if (activate_on_finish_)
1237 search_in_progress_ = true;1236 {
1238 }1237 activate_on_finish_ = false;
1238 active_scope_view_->ActivateFirst();
1239 }
1240
1241 activate_delay_.reset();
1242 return false;
1243 }));
1239 }1244 }
1240}1245}
12411246
@@ -1254,12 +1259,15 @@
1254 LOG_DEBUG(logger) << "Search completed: " << search_string;1259 LOG_DEBUG(logger) << "Search completed: " << search_string;
12551260
1256 search_bar_->SetSearchFinished();1261 search_bar_->SetSearchFinished();
1257 search_in_progress_ = false;1262
12581263 if (activate_on_finish_)
1259 activate_timeout_.reset();1264 {
1260 if (activate_on_finish_ && !err)1265 activate_on_finish_ = false;
1261 OnEntryActivated();1266 activate_delay_.reset();
1262 activate_on_finish_= false;1267
1268 if (!err)
1269 active_scope_view_->ActivateFirst();
1270 }
1263 }1271 }
1264}1272}
12651273
@@ -1407,20 +1415,12 @@
1407}1415}
1408void DashView::OnEntryActivated()1416void DashView::OnEntryActivated()
1409{1417{
1410 if (active_scope_view_.IsValid() && !search_in_progress_)1418 if (active_scope_view_.IsValid())
1411 {1419 {
1412 active_scope_view_->ActivateFirst();1420 if (!activate_delay_ && !search_bar_->in_live_search())
1413 }
1414 // delay the activation until we get the SearchFinished signal
1415 activate_on_finish_ = search_in_progress_;
1416
1417 if (activate_on_finish_)
1418 {
1419 activate_timeout_.reset(new glib::Timeout(MAX_ENTRY_ACTIVATE_WAIT_TIMEOUT, [this] {
1420 activate_on_finish_ = false;
1421 active_scope_view_->ActivateFirst();1421 active_scope_view_->ActivateFirst();
1422 return FALSE;1422 else
1423 }));1423 activate_on_finish_ = true;
1424 }1424 }
1425}1425}
14261426
@@ -1546,6 +1546,32 @@
1546 ubus_manager_.SendMessage(UBUS_OVERLAY_CLOSE_REQUEST);1546 ubus_manager_.SendMessage(UBUS_OVERLAY_CLOSE_REQUEST);
1547}1547}
15481548
1549nux::Area* DashView::SkipUnexpandableHeaderKeyNav()
1550{
1551 PlacesGroup::Ptr prev_view;
1552 auto category_views = active_scope_view_->GetOrderedCategoryViews();
1553
1554 for (auto category : category_views)
1555 {
1556 if (category->GetLayout() != nullptr)
1557 {
1558 auto header = category->GetHeaderFocusableView();
1559 if (header && header->HasKeyFocus() && !category->IsExpandable())
1560 {
1561 if (prev_view)
1562 return prev_view->GetChildView();
1563 else
1564 return search_bar_->text_entry();
1565 }
1566
1567 if (category->IsVisible())
1568 prev_view = category;
1569 }
1570 }
1571
1572 return nullptr;
1573}
1574
1549nux::Area* DashView::FindKeyFocusArea(unsigned int key_symbol,1575nux::Area* DashView::FindKeyFocusArea(unsigned int key_symbol,
1550 unsigned long x11_key_code,1576 unsigned long x11_key_code,
1551 unsigned long special_keys_state)1577 unsigned long special_keys_state)
@@ -1576,11 +1602,9 @@
1576 direction = KEY_NAV_RIGHT;1602 direction = KEY_NAV_RIGHT;
1577 break;1603 break;
1578 case NUX_VK_LEFT_TAB:1604 case NUX_VK_LEFT_TAB:
1579 case NUX_VK_PAGE_UP:
1580 direction = KEY_NAV_TAB_PREVIOUS;1605 direction = KEY_NAV_TAB_PREVIOUS;
1581 break;1606 break;
1582 case NUX_VK_TAB:1607 case NUX_VK_TAB:
1583 case NUX_VK_PAGE_DOWN:
1584 direction = KEY_NAV_TAB_NEXT;1608 direction = KEY_NAV_TAB_NEXT;
1585 break;1609 break;
1586 case NUX_VK_ENTER:1610 case NUX_VK_ENTER:
@@ -1588,6 +1612,14 @@
1588 // Not sure if Enter should be a navigation key1612 // Not sure if Enter should be a navigation key
1589 direction = KEY_NAV_ENTER;1613 direction = KEY_NAV_ENTER;
1590 break;1614 break;
1615 case NUX_VK_PAGE_UP:
1616 case NUX_VK_PAGE_DOWN:
1617 if (!preview_displaying_)
1618 {
1619 active_scope_view_->PerformPageNavigation((x11_key_code == NUX_VK_PAGE_UP) ? ScrollDir::UP : ScrollDir::DOWN);
1620 return nux::GetWindowCompositor().GetKeyFocusArea();
1621 }
1622 break;
1591 default:1623 default:
1592 auto const& close_key = WindowManager::Default().close_window_key();1624 auto const& close_key = WindowManager::Default().close_window_key();
15931625
@@ -1691,6 +1723,14 @@
1691 }1723 }
1692 }1724 }
16931725
1726 if (direction == KEY_NAV_UP)
1727 {
1728 if (auto skip_view = SkipUnexpandableHeaderKeyNav())
1729 {
1730 return skip_view;
1731 }
1732 }
1733
1694 bool search_key = false;1734 bool search_key = false;
16951735
1696 if (direction == KEY_NAV_NONE)1736 if (direction == KEY_NAV_NONE)
16971737
=== modified file 'dash/DashView.h'
--- dash/DashView.h 2014-07-24 13:49:53 +0000
+++ dash/DashView.h 2015-10-20 18:34:31 +0000
@@ -137,6 +137,8 @@
137137
138 nux::Area* KeyNavIteration(nux::KeyNavDirection direction);138 nux::Area* KeyNavIteration(nux::KeyNavDirection direction);
139139
140 nux::Area* SkipUnexpandableHeaderKeyNav();
141
140 UBusManager ubus_manager_;142 UBusManager ubus_manager_;
141 Scopes::Ptr scopes_;143 Scopes::Ptr scopes_;
142 ScopeViews scope_views_;144 ScopeViews scope_views_;
@@ -170,10 +172,8 @@
170172
171 LocalResult last_activated_result_;173 LocalResult last_activated_result_;
172 guint64 last_activated_timestamp_;174 guint64 last_activated_timestamp_;
173 bool search_in_progress_;
174 bool activate_on_finish_;175 bool activate_on_finish_;
175 glib::Source::UniquePtr activate_timeout_;176 glib::Source::UniquePtr activate_delay_;
176
177 bool visible_;177 bool visible_;
178178
179 nux::ObjectPtr<nux::IOpenGLBaseTexture> dash_view_copy_;179 nux::ObjectPtr<nux::IOpenGLBaseTexture> dash_view_copy_;
180180
=== modified file 'dash/PlacesGroup.cpp'
--- dash/PlacesGroup.cpp 2014-07-24 14:14:47 +0000
+++ dash/PlacesGroup.cpp 2015-10-20 18:34:31 +0000
@@ -212,7 +212,12 @@
212 if(direction == nux::KEY_NAV_UP)212 if(direction == nux::KEY_NAV_UP)
213 nux::GetWindowCompositor().SetKeyFocusArea(_child_view, direction);213 nux::GetWindowCompositor().SetKeyFocusArea(_child_view, direction);
214 else214 else
215 nux::GetWindowCompositor().SetKeyFocusArea(GetHeaderFocusableView(), direction);215 {
216 if (IsExpandable())
217 nux::GetWindowCompositor().SetKeyFocusArea(GetHeaderFocusableView(), direction);
218 else
219 nux::GetWindowCompositor().SetKeyFocusArea(_child_view, direction);
220 }
216 });221 });
217222
218 UpdatePlacesGroupSize();223 UpdatePlacesGroupSize();
@@ -567,6 +572,12 @@
567}572}
568573
569bool574bool
575PlacesGroup::IsExpandable() const
576{
577 return (_n_visible_items_in_unexpand_mode < _n_total_items);
578}
579
580bool
570PlacesGroup::GetExpanded() const581PlacesGroup::GetExpanded() const
571{582{
572 return _is_expanded;583 return _is_expanded;
@@ -649,7 +660,7 @@
649660
650bool PlacesGroup::ShouldBeHighlighted() const661bool PlacesGroup::ShouldBeHighlighted() const
651{662{
652 return HeaderHasKeyFocus();663 return (HeaderHasKeyFocus() && IsExpandable());
653}664}
654665
655void PlacesGroup::SetResultsPreviewAnimationValue(float preview_animation)666void PlacesGroup::SetResultsPreviewAnimationValue(float preview_animation)
656667
=== modified file 'dash/PlacesGroup.h'
--- dash/PlacesGroup.h 2014-03-20 04:05:39 +0000
+++ dash/PlacesGroup.h 2015-10-20 18:34:31 +0000
@@ -77,6 +77,7 @@
7777
78 void SetCounts(unsigned n_total_items);78 void SetCounts(unsigned n_total_items);
7979
80 virtual bool IsExpandable() const;
80 virtual void SetExpanded(bool is_expanded);81 virtual void SetExpanded(bool is_expanded);
81 virtual bool GetExpanded() const;82 virtual bool GetExpanded() const;
8283
8384
=== modified file 'dash/ResultView.cpp'
--- dash/ResultView.cpp 2014-03-20 05:13:04 +0000
+++ dash/ResultView.cpp 2015-10-20 18:34:31 +0000
@@ -23,6 +23,7 @@
2323
24#include "ResultView.h"24#include "ResultView.h"
2525
26#include <boost/algorithm/string.hpp>
26#include <Nux/Layout.h>27#include <Nux/Layout.h>
2728
28#include "unity-shared/IntrospectableWrappers.h"29#include "unity-shared/IntrospectableWrappers.h"
@@ -49,6 +50,7 @@
49 , scale(DEFAULT_SCALE)50 , scale(DEFAULT_SCALE)
50 , renderer_(NULL)51 , renderer_(NULL)
51 , cached_result_(nullptr, nullptr, nullptr)52 , cached_result_(nullptr, nullptr, nullptr)
53 , default_click_activation_(ActivateType::PREVIEW)
52{54{
53 expanded.changed.connect([this](bool value)55 expanded.changed.connect([this](bool value)
54 {56 {
@@ -61,6 +63,21 @@
61 NeedRedraw();63 NeedRedraw();
62 });64 });
6365
66 default_click_activation.SetGetterFunction([this] {
67 if (Settings::Instance().double_click_activate())
68 return default_click_activation_;
69 return ActivateType::DIRECT;
70 });
71
72 default_click_activation.SetSetterFunction([this] (ActivateType at) {
73 if (default_click_activation_ != at)
74 {
75 default_click_activation_ = at;
76 return true;
77 }
78 return false;
79 });
80
64 Settings::Instance().font_scaling.changed.connect(sigc::mem_fun(this, &ResultView::UpdateFontScale));81 Settings::Instance().font_scaling.changed.connect(sigc::mem_fun(this, &ResultView::UpdateFontScale));
65 enable_texture_render.changed.connect(sigc::mem_fun(this, &ResultView::OnEnableRenderToTexture));82 enable_texture_render.changed.connect(sigc::mem_fun(this, &ResultView::OnEnableRenderToTexture));
66 scale.changed.connect(sigc::mem_fun(this, &ResultView::UpdateScale));83 scale.changed.connect(sigc::mem_fun(this, &ResultView::UpdateScale));
@@ -208,6 +225,14 @@
208 return LocalResult(*GetIteratorAtRow(index));225 return LocalResult(*GetIteratorAtRow(index));
209}226}
210227
228ResultView::ActivateType ResultView::GetLocalResultActivateType(LocalResult const& result) const
229{
230 if (boost::starts_with(result.uri, "x-unity-no-preview"))
231 return ActivateType::DIRECT;
232
233 return ActivateType::PREVIEW;
234}
235
211void ResultView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)236void ResultView::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
212{}237{}
213238
214239
=== modified file 'dash/ResultView.h'
--- dash/ResultView.h 2014-03-20 05:13:04 +0000
+++ dash/ResultView.h 2015-10-20 18:34:31 +0000
@@ -58,12 +58,11 @@
58class ResultView : public nux::View, public debug::Introspectable58class ResultView : public nux::View, public debug::Introspectable
59{59{
60public:60public:
61 typedef enum ActivateType_61 enum class ActivateType
62 {62 {
63 DIRECT,63 DIRECT,
64 PREVIEW_LEFT_BUTTON,
65 PREVIEW64 PREVIEW
66 } ActivateType;65 };
6766
68 NUX_DECLARE_OBJECT_TYPE(ResultView, nux::View);67 NUX_DECLARE_OBJECT_TYPE(ResultView, nux::View);
6968
@@ -73,8 +72,9 @@
73 void SetModelRenderer(ResultRenderer* renderer);72 void SetModelRenderer(ResultRenderer* renderer);
74 void SetResultsModel(Results::Ptr const& results);73 void SetResultsModel(Results::Ptr const& results);
7574
76 unsigned int GetIndexForLocalResult(LocalResult const& local_result);75 unsigned int GetIndexForLocalResult(LocalResult const&);
77 LocalResult GetLocalResultForIndex(unsigned int);76 LocalResult GetLocalResultForIndex(unsigned int);
77 ActivateType GetLocalResultActivateType(LocalResult const&) const;
7878
79 nux::Property<bool> expanded;79 nux::Property<bool> expanded;
80 nux::Property<int> results_per_row;80 nux::Property<int> results_per_row;
@@ -82,6 +82,7 @@
82 nux::Property<float> desaturation_progress;82 nux::Property<float> desaturation_progress;
83 nux::Property<bool> enable_texture_render;83 nux::Property<bool> enable_texture_render;
84 nux::Property<double> scale;84 nux::Property<double> scale;
85 nux::RWProperty<ActivateType> default_click_activation;
8586
86 sigc::signal<void, LocalResult const&, ActivateType, GVariant*> ResultActivated;87 sigc::signal<void, LocalResult const&, ActivateType, GVariant*> ResultActivated;
8788
@@ -130,6 +131,7 @@
130 void UpdateFontScale(double scale);131 void UpdateFontScale(double scale);
131132
132 Result cached_result_;133 Result cached_result_;
134 ActivateType default_click_activation_;
133 connection::Manager result_connections_;135 connection::Manager result_connections_;
134};136};
135137
136138
=== modified file 'dash/ResultViewGrid.cpp'
--- dash/ResultViewGrid.cpp 2014-03-20 04:05:39 +0000
+++ dash/ResultViewGrid.cpp 2015-10-20 18:34:31 +0000
@@ -24,9 +24,8 @@
24#include <NuxCore/Logger.h>24#include <NuxCore/Logger.h>
25#include <Nux/VLayout.h>25#include <Nux/VLayout.h>
26#include <NuxGraphics/GdkGraphics.h>26#include <NuxGraphics/GdkGraphics.h>
27#include <gtk/gtk.h>
28#include <gdk/gdk.h>
29#include <unity-protocol.h>27#include <unity-protocol.h>
28#include <boost/algorithm/string.hpp>
3029
31#include "unity-shared/IntrospectableWrappers.h"30#include "unity-shared/IntrospectableWrappers.h"
32#include "unity-shared/Timer.h"31#include "unity-shared/Timer.h"
@@ -34,8 +33,8 @@
34#include "unity-shared/UBusMessages.h"33#include "unity-shared/UBusMessages.h"
35#include "unity-shared/GraphicsUtils.h"34#include "unity-shared/GraphicsUtils.h"
36#include "unity-shared/RawPixel.h"35#include "unity-shared/RawPixel.h"
37#include "unity-shared/UnitySettings.h"
38#include "unity-shared/WindowManager.h"36#include "unity-shared/WindowManager.h"
37#include <UnityCore/DesktopUtilities.h>
39#include "ResultViewGrid.h"38#include "ResultViewGrid.h"
40#include "math.h"39#include "math.h"
4140
@@ -58,6 +57,8 @@
5857
59 const RawPixel WIDTH_PADDING = 25_em;58 const RawPixel WIDTH_PADDING = 25_em;
60 const RawPixel SCROLLBAR_WIDTH = 3_em;59 const RawPixel SCROLLBAR_WIDTH = 3_em;
60
61 const std::string APPLICATION_URI_PREFIX = "application://";
61}62}
6263
63NUX_IMPLEMENT_OBJECT_TYPE(ResultViewGrid);64NUX_IMPLEMENT_OBJECT_TYPE(ResultViewGrid);
@@ -94,8 +95,7 @@
94 scale.changed.connect(sigc::mem_fun(this, &ResultViewGrid::UpdateScale));95 scale.changed.connect(sigc::mem_fun(this, &ResultViewGrid::UpdateScale));
9596
96 key_nav_focus_change.connect(sigc::mem_fun(this, &ResultViewGrid::OnKeyNavFocusChange));97 key_nav_focus_change.connect(sigc::mem_fun(this, &ResultViewGrid::OnKeyNavFocusChange));
97 key_nav_focus_activate.connect([this] (nux::Area *area)98 key_nav_focus_activate.connect([this] (nux::Area *area) {
98 {
99 Activate(focused_result_, selected_index_, ResultView::ActivateType::DIRECT);99 Activate(focused_result_, selected_index_, ResultView::ActivateType::DIRECT);
100 });100 });
101 key_down.connect(sigc::mem_fun(this, &ResultViewGrid::OnKeyDown));101 key_down.connect(sigc::mem_fun(this, &ResultViewGrid::OnKeyDown));
@@ -210,6 +210,12 @@
210 row_y += row_index * row_height;210 row_y += row_index * row_height;
211 }211 }
212212
213 if (type == ActivateType::PREVIEW)
214 {
215 if (GetLocalResultActivateType(local_result) != type)
216 type = ActivateType::DIRECT;
217 }
218
213 active_index_ = index;219 active_index_ = index;
214 guint64 timestamp = nux::GetGraphicsDisplay()->GetCurrentEvent().x11_timestamp;220 guint64 timestamp = nux::GetGraphicsDisplay()->GetCurrentEvent().x11_timestamp;
215 glib::Variant data(g_variant_new("(tiiiiii)", timestamp, column_x, row_y, column_width, row_height, left_results, right_results));221 glib::Variant data(g_variant_new("(tiiiiii)", timestamp, column_x, row_y, column_width, row_height, left_results, right_results));
@@ -796,6 +802,7 @@
796 unsigned num_results = GetNumResults();802 unsigned num_results = GetNumResults();
797 unsigned index = GetIndexAtPosition(x, y);803 unsigned index = GetIndexAtPosition(x, y);
798 mouse_over_index_ = index;804 mouse_over_index_ = index;
805
799 if (index < num_results)806 if (index < num_results)
800 {807 {
801 // we got a click on a button so activate it808 // we got a click on a button so activate it
@@ -805,32 +812,32 @@
805 focused_result_ = result;812 focused_result_ = result;
806 activated_result_ = result;813 activated_result_ = result;
807814
808
809 if (nux::GetEventButton(button_flags) == nux::NUX_MOUSE_BUTTON1)815 if (nux::GetEventButton(button_flags) == nux::NUX_MOUSE_BUTTON1)
810 {816 {
811 if (unity::Settings::Instance().double_click_activate)817 if (default_click_activation() == ActivateType::PREVIEW &&
818 GetLocalResultActivateType(activated_result_) == ActivateType::PREVIEW)
812 {819 {
813 // delay activate for single left click. (for double click check)820 // delay activate for single left click. (for double click check)
814 activate_timer_.reset(new glib::Timeout(DOUBLE_CLICK_SPEED, [this, index]() {821 activate_timer_.reset(new glib::Timeout(DOUBLE_CLICK_SPEED, [this, index] {
815 Activate(activated_result_, index, ResultView::ActivateType::PREVIEW_LEFT_BUTTON);822 Activate(activated_result_, index, ActivateType::PREVIEW);
816 return false;823 return false;
817 }));824 }));
818 }825 }
819 else826 else
820 {827 {
821 Activate(activated_result_, index, ResultView::ActivateType::DIRECT);828 Activate(activated_result_, index, ActivateType::DIRECT);
822 }829 }
823 }830 }
824 else831 else
825 {832 {
826 Activate(activated_result_, index, ResultView::ActivateType::PREVIEW);833 Activate(activated_result_, index, ActivateType::PREVIEW);
827 }834 }
828 }835 }
829}836}
830837
831void ResultViewGrid::MouseDoubleClick(int x, int y, unsigned long button_flags, unsigned long key_flags)838void ResultViewGrid::MouseDoubleClick(int x, int y, unsigned long button_flags, unsigned long key_flags)
832{839{
833 if (unity::Settings::Instance().double_click_activate == false)840 if (default_click_activation() == ActivateType::DIRECT)
834 return;841 return;
835842
836 unsigned num_results = GetNumResults();843 unsigned num_results = GetNumResults();
@@ -845,7 +852,7 @@
845 focused_result_ = result;852 focused_result_ = result;
846853
847 activated_result_ = result;854 activated_result_ = result;
848 Activate(activated_result_, index, ResultView::ActivateType::DIRECT);855 Activate(activated_result_, index, ActivateType::DIRECT);
849 }856 }
850}857}
851858
@@ -916,6 +923,15 @@
916 if (current_drag_result_.empty())923 if (current_drag_result_.empty())
917 current_drag_result_.uri = current_drag_result_.uri.substr(current_drag_result_.uri.find(":") + 1);924 current_drag_result_.uri = current_drag_result_.uri.substr(current_drag_result_.uri.find(":") + 1);
918925
926 if (boost::starts_with(current_drag_result_.uri, APPLICATION_URI_PREFIX))
927 {
928 auto desktop_id = current_drag_result_.uri.substr(APPLICATION_URI_PREFIX.size());
929 auto desktop_path = DesktopUtilities::GetDesktopPathById(desktop_id);
930
931 if (!desktop_path.empty())
932 current_drag_result_.uri = "file://" + desktop_path;
933 }
934
919 LOG_DEBUG (logger) << "Dnd begin at " <<935 LOG_DEBUG (logger) << "Dnd begin at " <<
920 last_mouse_down_x_ << ", " << last_mouse_down_y_ << " - using; "936 last_mouse_down_x_ << ", " << last_mouse_down_y_ << " - using; "
921 << current_drag_result_.uri;937 << current_drag_result_.uri;
922938
=== modified file 'dash/ScopeView.cpp'
--- dash/ScopeView.cpp 2014-08-06 14:09:30 +0000
+++ dash/ScopeView.cpp 2015-10-20 18:34:31 +0000
@@ -481,47 +481,40 @@
481 /* Reset result count */481 /* Reset result count */
482 counts_[group] = 0;482 counts_[group] = 0;
483483
484 ResultView* results_view = nullptr;484 auto* results_view = new ResultViewGrid(NUX_TRACKER_LOCATION);
485
485 if (category.GetContentType() == "social" && category.renderer_name == "default")486 if (category.GetContentType() == "social" && category.renderer_name == "default")
486 {487 {
487 results_view = new ResultViewGrid(NUX_TRACKER_LOCATION);
488 results_view->SetModelRenderer(new ResultRendererHorizontalTile(NUX_TRACKER_LOCATION));488 results_view->SetModelRenderer(new ResultRendererHorizontalTile(NUX_TRACKER_LOCATION));
489 static_cast<ResultViewGrid*> (results_view)->horizontal_spacing = CARD_VIEW_GAP_HORIZ.CP(scale());489 results_view->horizontal_spacing = CARD_VIEW_GAP_HORIZ.CP(scale());
490 static_cast<ResultViewGrid*> (results_view)->vertical_spacing = CARD_VIEW_GAP_VERT.CP(scale());490 results_view->vertical_spacing = CARD_VIEW_GAP_VERT.CP(scale());
491 }491 }
492 else492 else
493 {493 {
494 results_view = new ResultViewGrid(NUX_TRACKER_LOCATION);
495 results_view->SetModelRenderer(new ResultRendererTile(NUX_TRACKER_LOCATION));494 results_view->SetModelRenderer(new ResultRendererTile(NUX_TRACKER_LOCATION));
496 }495 }
497496
498 if (scope_)497 if (scope_)
499 {498 {
500 const std::string category_id = category.id();499 results_view->unique_id = name + scope_->name();
501 std::string unique_id = category.name() + scope_->name();
502 results_view->unique_id = unique_id;
503 results_view->expanded = false;500 results_view->expanded = false;
504501
505 results_view->ResultActivated.connect([this, unique_id, category_id] (LocalResult const& local_result, ResultView::ActivateType type, GVariant* data)502 if (scope_->id() == "applications.scope" ||
506 {503 (scope_->id() == "home.scope" && category.id() == "applications.scope"))
507 if (g_str_has_prefix(local_result.uri.c_str(), "x-unity-no-preview"))504 {
508 type = ResultView::ActivateType::DIRECT;505 results_view->default_click_activation = ResultView::ActivateType::DIRECT;
509506 }
510 // Applications scope results should be activated on left-click (instead of preview). Note that app scope can still507
511 // respond with preview for activation request (the case for uninstalled apps).508 results_view->ResultActivated.connect([this, results_view] (LocalResult const& local_result, ResultView::ActivateType type, GVariant* data)
512 bool is_app_scope_result = (scope_->id() == "applications.scope" || (scope_->id() == "home.scope" && category_id == "applications.scope"));509 {
513510 result_activated.emit(type, local_result, data, results_view->unique_id());
514 if (is_app_scope_result && type == ResultView::ActivateType::PREVIEW_LEFT_BUTTON)511
515 type = ResultView::ActivateType::DIRECT;
516
517 result_activated.emit(type, local_result, data, unique_id);
518 switch (type)512 switch (type)
519 {513 {
520 case ResultView::ActivateType::DIRECT:514 case ResultView::ActivateType::DIRECT:
521 {515 {
522 scope_->Activate(local_result, nullptr, cancellable_);516 scope_->Activate(local_result, nullptr, cancellable_);
523 } break;517 } break;
524 case ResultView::ActivateType::PREVIEW_LEFT_BUTTON:
525 case ResultView::ActivateType::PREVIEW:518 case ResultView::ActivateType::PREVIEW:
526 {519 {
527 scope_->Preview(local_result, nullptr, cancellable_);520 scope_->Preview(local_result, nullptr, cancellable_);
@@ -1007,6 +1000,11 @@
1007 scroll_view_->ScrollToPosition(nux::Geometry(0, 0, 0, 0));1000 scroll_view_->ScrollToPosition(nux::Geometry(0, 0, 0, 0));
1008}1001}
10091002
1003void ScopeView::PerformPageNavigation(ScrollDir dir)
1004{
1005 scroll_view_->page_direction.emit(dir);
1006}
1007
1010void ScopeView::ActivateFirst()1008void ScopeView::ActivateFirst()
1011{1009{
1012 if (!scope_)1010 if (!scope_)
10131011
=== modified file 'dash/ScopeView.h'
--- dash/ScopeView.h 2014-08-06 14:09:30 +0000
+++ dash/ScopeView.h 2015-10-20 18:34:31 +0000
@@ -36,6 +36,7 @@
36#include "PlacesGroup.h"36#include "PlacesGroup.h"
37#include "ResultViewGrid.h"37#include "ResultViewGrid.h"
38#include "unity-shared/UBusWrapper.h"38#include "unity-shared/UBusWrapper.h"
39#include "unity-shared/PlacesOverlayVScrollBar.h"
3940
40namespace unity41namespace unity
41{42{
@@ -61,6 +62,7 @@
61 int GetNumRows();62 int GetNumRows();
62 void AboutToShow();63 void AboutToShow();
63 void JumpToTop();64 void JumpToTop();
65 void PerformPageNavigation(ScrollDir dir);
6466
65 virtual void ActivateFirst();67 virtual void ActivateFirst();
6668
6769
=== modified file 'debian/changelog'
--- debian/changelog 2015-06-03 15:22:38 +0000
+++ debian/changelog 2015-10-20 18:34:31 +0000
@@ -1,3 +1,54 @@
1unity (7.2.6-0ubuntu1) UNRELEASED; urgency=medium
2
3 * New upstream release
4
5 [ Andrea Azzarone ]
6 * Merge patch from https://launchpadlibrarian.net/216276242/low-gfx-
7 override.patch (LP: #1491913)
8 * Properly hide decorations when on "Show Desktop" mode. (LP: #1485073)
9 * Do not handle events coming from viewports not actually containing the window.
10 (LP: #1449654)
11 * Make sure new icons are added to the model before calling SortAndUpdate
12 (LP: #1458950)
13 * GnomeSessionManager: Do not allow shutdown when screen is locked. (LP: #1460626)
14
15 [ Chris Townsend ]
16 * When looking for the top-most valid window in a VP, also check if the window
17 is focused if the window is set to Always on Top. This allows Launcher icon
18 spread to work properly when a window is minimized an Always on Top exists in
19 the group. (LP: #1131385)
20 * Wait on Spread to be terminated before showing the Quicklist. (LP: #1441626)
21 * If dragging an application:// uri type from the Dash to the desktop, change it
22 to a file:// uri type so Nautilus can understand the type a make a copy of it
23 on the desktop. (LP: #1241972)
24 * Enable real page up/page down key navigation in the Dash. When using these
25 keys the view scrolls the length of the visible view. (LP: #913612)
26 * Save the active window when showing the Hud so the correct window is focused
27 when hiding the Hud. Fixes issue when "Always on Top" windows are present.
28 (LP: #1366583)
29 * Save the active window when showing the Dash so the correct window is focused
30 when hiding the Dash. Fixes issue when "Always on Top" windows are present.
31 (LP: #1446634)
32 * When using keyboard navigation in the Dash, skip category headers that are not
33 expandable. Also, do not highlight the category header when the mouse cursor
34 is over it. (LP: #1045933)
35 * Also use the Compiz show() method when forcing an unmapped window to be
36 visible when clicking on it's active Launcher icon. (LP: #989588)
37 * Add option to enable and disable Unity low graphics mode on the fly in ccsm or
38 via gsettings. (LP: #1412937)
39
40 [ Marco Trevisan (Treviño) ]
41 * ResultViewGrid: wait for double-click event only if the relative result needs
42 the Preview (LP: #1291950)
43 * OverlayWindowButtons: trigger a queuedraw also when a child requires a redraw
44 (LP: #1461618)
45 * GnomeSessionManager: Request ScreenSaver (de)activation on VT changes (LP:
46 #1405349)
47 * UScreen, PanelService: get monitor at position, ignoring pre-multipled Gdk
48 scale factor (LP: #1351591)
49
50 -- Marco Trevisan (Treviño) <marco@ubuntu.com> Thu, 15 Oct 2015 17:35:51 +0100
51
1unity (7.2.5+14.04.20150603-0ubuntu1) trusty; urgency=medium52unity (7.2.5+14.04.20150603-0ubuntu1) trusty; urgency=medium
253
3 [ Chris Townsend ]54 [ Chris Townsend ]
455
=== modified file 'decorations/DecoratedWindow.cpp'
--- decorations/DecoratedWindow.cpp 2015-03-12 00:57:05 +0000
+++ decorations/DecoratedWindow.cpp 2015-10-20 18:34:31 +0000
@@ -840,6 +840,11 @@
840 , impl_(new Impl(this, cwin))840 , impl_(new Impl(this, cwin))
841{}841{}
842842
843CompWindow* Window::GetCompWindow()
844{
845 return impl_->win_;
846}
847
843void Window::Update()848void Window::Update()
844{849{
845 impl_->Update();850 impl_->Update();
846851
=== modified file 'decorations/DecoratedWindow.h'
--- decorations/DecoratedWindow.h 2014-03-03 19:07:56 +0000
+++ decorations/DecoratedWindow.h 2015-10-20 18:34:31 +0000
@@ -45,6 +45,7 @@
45 nux::Property<bool> scaled;45 nux::Property<bool> scaled;
46 nux::ROProperty<double> dpi_scale;46 nux::ROProperty<double> dpi_scale;
4747
48 CompWindow* GetCompWindow();
48 void Update();49 void Update();
49 void Undecorate();50 void Undecorate();
50 void UpdateDecorationPosition();51 void UpdateDecorationPosition();
5152
=== modified file 'decorations/DecorationsManager.cpp'
--- decorations/DecorationsManager.cpp 2015-03-12 00:57:05 +0000
+++ decorations/DecorationsManager.cpp 2015-10-20 18:34:31 +0000
@@ -178,7 +178,7 @@
178{178{
179 auto const& win = GetWindowByXid(xid);179 auto const& win = GetWindowByXid(xid);
180180
181 if (win && !win->impl_->win_->hasUnmapReference())181 if (win && !win->GetCompWindow()->hasUnmapReference())
182 {182 {
183 win->Update();183 win->Update();
184 return true;184 return true;
@@ -312,6 +312,10 @@
312bool Manager::Impl::HandleFrameEvent(XEvent* event)312bool Manager::Impl::HandleFrameEvent(XEvent* event)
313{313{
314 auto const& win = GetWindowByFrame(event->xany.window);314 auto const& win = GetWindowByFrame(event->xany.window);
315 CompWindow* comp_window = win ? win->GetCompWindow() : nullptr;
316
317 if (comp_window && comp_window->defaultViewport() != screen->vp())
318 return false;
315319
316 // ButtonRelease events might happen also outside the frame window, in this320 // ButtonRelease events might happen also outside the frame window, in this
317 // case we must unset the mouse owner, wherever the event happens.321 // case we must unset the mouse owner, wherever the event happens.
318322
=== modified file 'hud/HudButton.cpp'
--- hud/HudButton.cpp 2014-07-24 14:20:30 +0000
+++ hud/HudButton.cpp 2015-10-20 18:34:31 +0000
@@ -20,11 +20,6 @@
20 */20 */
21#include "config.h"21#include "config.h"
2222
23#include <pango/pango.h>
24#include <pango/pangocairo.h>
25#include <gdk/gdk.h>
26#include <gtk/gtk.h>
27
28#include <Nux/Nux.h>23#include <Nux/Nux.h>
29#include <Nux/HLayout.h>24#include <Nux/HLayout.h>
30#include <NuxCore/Logger.h>25#include <NuxCore/Logger.h>
3126
=== modified file 'hud/HudController.cpp'
--- hud/HudController.cpp 2014-07-24 14:20:30 +0000
+++ hud/HudController.cpp 2015-10-20 18:34:31 +0000
@@ -372,6 +372,8 @@
372 focused_app_icon_ = PKGDATADIR "/launcher_bfb.png";372 focused_app_icon_ = PKGDATADIR "/launcher_bfb.png";
373 }373 }
374374
375 wm.SaveInputFocus();
376
375 LOG_DEBUG(logger) << "Taking application icon: " << focused_app_icon_;377 LOG_DEBUG(logger) << "Taking application icon: " << focused_app_icon_;
376 SetIcon(focused_app_icon_);378 SetIcon(focused_app_icon_);
377 FocusWindow();379 FocusWindow();
378380
=== modified file 'hud/HudController.h'
--- hud/HudController.h 2014-07-24 14:20:30 +0000
+++ hud/HudController.h 2015-10-20 18:34:31 +0000
@@ -22,7 +22,6 @@
22#include <functional>22#include <functional>
23#include <memory>23#include <memory>
2424
25#include <gdk/gdk.h>
26#include <UnityCore/Hud.h>25#include <UnityCore/Hud.h>
27#include <UnityCore/GLibSignal.h>26#include <UnityCore/GLibSignal.h>
2827
2928
=== modified file 'launcher/DeviceNotificationDisplayImp.cpp'
--- launcher/DeviceNotificationDisplayImp.cpp 2013-10-03 23:48:48 +0000
+++ launcher/DeviceNotificationDisplayImp.cpp 2015-10-20 18:34:31 +0000
@@ -17,7 +17,6 @@
17 * Authored by: Andrea Azzarone <andrea.azzarone@canonical.com>17 * Authored by: Andrea Azzarone <andrea.azzarone@canonical.com>
18 */18 */
1919
20#include <gdk/gdk.h>
21#include "config.h"20#include "config.h"
22#include <glib/gi18n-lib.h>21#include <glib/gi18n-lib.h>
23#include <libnotify/notify.h>22#include <libnotify/notify.h>
2423
=== modified file 'launcher/LauncherController.cpp'
--- launcher/LauncherController.cpp 2015-05-15 14:50:28 +0000
+++ launcher/LauncherController.cpp 2015-10-20 18:34:31 +0000
@@ -759,14 +759,14 @@
759 *uri_ptr = new_uri;759 *uri_ptr = new_uri;
760 });760 });
761761
762 model_->AddIcon(icon);
763
762 if (icon->GetIconType() == AbstractLauncherIcon::IconType::APPLICATION)764 if (icon->GetIconType() == AbstractLauncherIcon::IconType::APPLICATION)
763 {765 {
764 icon->visibility_changed.connect(sigc::hide(sigc::mem_fun(this, &Impl::SortAndUpdate)));766 icon->visibility_changed.connect(sigc::hide(sigc::mem_fun(this, &Impl::SortAndUpdate)));
765 SortAndUpdate();767 SortAndUpdate();
766 }768 }
767769
768 model_->AddIcon(icon);
769
770 std::string const& path = icon->DesktopFile();770 std::string const& path = icon->DesktopFile();
771771
772 if (!path.empty())772 if (!path.empty())
773773
=== modified file 'launcher/LauncherIcon.cpp'
--- launcher/LauncherIcon.cpp 2015-05-15 14:50:28 +0000
+++ launcher/LauncherIcon.cpp 2015-10-20 18:34:31 +0000
@@ -577,10 +577,6 @@
577 }577 }
578578
579 WindowManager& win_manager = WindowManager::Default();579 WindowManager& win_manager = WindowManager::Default();
580
581 if (win_manager.IsScaleActive())
582 win_manager.TerminateScale();
583
584 auto const& pos = GetTipPosition(monitor);580 auto const& pos = GetTipPosition(monitor);
585581
586 /* If the expo plugin is active, we need to wait it to be terminated, before582 /* If the expo plugin is active, we need to wait it to be terminated, before
@@ -593,6 +589,15 @@
593 conn->disconnect();589 conn->disconnect();
594 });590 });
595 }591 }
592 else if (win_manager.IsScaleActive())
593 {
594 auto conn = std::make_shared<sigc::connection>();
595 *conn = win_manager.terminate_spread.connect([this, conn, pos, restore_input_focus] {
596 QuicklistManager::Default()->ShowQuicklist(_quicklist, pos.x, pos.y, restore_input_focus);
597 conn->disconnect();
598 });
599 win_manager.TerminateScale();
600 }
596 else601 else
597 {602 {
598 QuicklistManager::Default()->ShowQuicklist(_quicklist, pos.x, pos.y, restore_input_focus);603 QuicklistManager::Default()->ShowQuicklist(_quicklist, pos.x, pos.y, restore_input_focus);
599604
=== modified file 'panel/PanelView.cpp'
--- panel/PanelView.cpp 2014-03-06 16:26:34 +0000
+++ panel/PanelView.cpp 2015-10-20 18:34:31 +0000
@@ -64,6 +64,7 @@
64 auto& wm = WindowManager::Default();64 auto& wm = WindowManager::Default();
65 panel::Style::Instance().changed.connect(sigc::mem_fun(this, &PanelView::ForceUpdateBackground));65 panel::Style::Instance().changed.connect(sigc::mem_fun(this, &PanelView::ForceUpdateBackground));
66 Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &PanelView::Resize));66 Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &PanelView::Resize));
67 Settings::Instance().low_gfx_changed.connect(sigc::mem_fun(this, &PanelView::OnLowGfxChanged));
6768
68 wm.average_color.changed.connect(sigc::mem_fun(this, &PanelView::OnBackgroundUpdate));69 wm.average_color.changed.connect(sigc::mem_fun(this, &PanelView::OnBackgroundUpdate));
69 wm.initiate_spread.connect(sigc::mem_fun(this, &PanelView::OnSpreadInitiate));70 wm.initiate_spread.connect(sigc::mem_fun(this, &PanelView::OnSpreadInitiate));
@@ -252,6 +253,22 @@
252 EnableOverlayMode(false);253 EnableOverlayMode(false);
253}254}
254255
256void PanelView::OnLowGfxChanged()
257{
258 if (!Settings::Instance().GetLowGfxMode())
259 {
260 nux::ROPConfig rop;
261
262 rop.Blend = true;
263 rop.SrcBlend = GL_ZERO;
264 rop.DstBlend = GL_SRC_COLOR;
265 nux::Color darken_colour = nux::Color(0.9f, 0.9f, 0.9f, 1.0f);
266 bg_darken_layer_.reset(new nux::ColorLayer(darken_colour, false, rop));
267 }
268
269 ForceUpdateBackground();
270}
271
255void PanelView::AddPanelView(PanelIndicatorsView* child,272void PanelView::AddPanelView(PanelIndicatorsView* child,
256 unsigned int stretchFactor)273 unsigned int stretchFactor)
257{274{
@@ -540,6 +557,7 @@
540 is_dirty_ = true;557 is_dirty_ = true;
541 UpdateBackground();558 UpdateBackground();
542559
560 QueueRelayout();
543 QueueDraw();561 QueueDraw();
544}562}
545563
546564
=== modified file 'panel/PanelView.h'
--- panel/PanelView.h 2014-03-06 16:26:34 +0000
+++ panel/PanelView.h 2015-10-20 18:34:31 +0000
@@ -98,6 +98,7 @@
98 void OnOverlayHidden(GVariant *data);98 void OnOverlayHidden(GVariant *data);
99 void OnSpreadInitiate();99 void OnSpreadInitiate();
100 void OnSpreadTerminate();100 void OnSpreadTerminate();
101 void OnLowGfxChanged();
101 void EnableOverlayMode(bool);102 void EnableOverlayMode(bool);
102103
103 bool ActivateFirstSensitive();104 bool ActivateFirstSensitive();
104105
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2015-06-03 12:46:12 +0000
+++ plugins/unityshell/src/unityshell.cpp 2015-10-20 18:34:31 +0000
@@ -259,10 +259,16 @@
259 renderer.find("Mesa X11") != std::string::npos ||259 renderer.find("Mesa X11") != std::string::npos ||
260 renderer.find("LLVM") != std::string::npos ||260 renderer.find("LLVM") != std::string::npos ||
261 renderer.find("on softpipe") != std::string::npos ||261 renderer.find("on softpipe") != std::string::npos ||
262 (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 1))262 (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 1) ||
263 optionGetLowGraphicsMode())
263 {264 {
264 unity_settings_.SetLowGfxMode(true);265 unity_settings_.SetLowGfxMode(true);
265 }266 }
267
268 if (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 0)
269 {
270 unity_settings_.SetLowGfxMode(false);
271 }
266#endif272#endif
267273
268 if (!failed)274 if (!failed)
@@ -340,6 +346,7 @@
340 optionSetAutohideAnimationNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));346 optionSetAutohideAnimationNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
341 optionSetDashBlurExperimentalNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));347 optionSetDashBlurExperimentalNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
342 optionSetShortcutOverlayNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));348 optionSetShortcutOverlayNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
349 optionSetLowGraphicsModeNotify(boost::bind(&UnityScreen::optionChanged, this, _1, _2));
343 optionSetShowLauncherInitiate(boost::bind(&UnityScreen::showLauncherKeyInitiate, this, _1, _2, _3));350 optionSetShowLauncherInitiate(boost::bind(&UnityScreen::showLauncherKeyInitiate, this, _1, _2, _3));
344 optionSetShowLauncherTerminate(boost::bind(&UnityScreen::showLauncherKeyTerminate, this, _1, _2, _3));351 optionSetShowLauncherTerminate(boost::bind(&UnityScreen::showLauncherKeyTerminate, this, _1, _2, _3));
345 optionSetKeyboardFocusInitiate(boost::bind(&UnityScreen::setKeyboardFocusKeyInitiate, this, _1, _2, _3));352 optionSetKeyboardFocusInitiate(boost::bind(&UnityScreen::setKeyboardFocusKeyInitiate, this, _1, _2, _3));
@@ -1223,7 +1230,6 @@
12231230
1224 window->updateFrameRegionSetCurrentIndex(MAXSHORT);1231 window->updateFrameRegionSetCurrentIndex(MAXSHORT);
1225 window->updateFrameRegion(region);1232 window->updateFrameRegion(region);
1226 deco_win_->UpdateFrameRegion(region);
1227 window->updateFrameRegionSetCurrentIndex(oldUpdateFrameRegionIndex);1233 window->updateFrameRegionSetCurrentIndex(oldUpdateFrameRegionIndex);
1228}1234}
12291235
@@ -3595,6 +3601,14 @@
3595 case UnityshellOptions::ShortcutOverlay:3601 case UnityshellOptions::ShortcutOverlay:
3596 shortcut_controller_->SetEnabled(optionGetShortcutOverlay());3602 shortcut_controller_->SetEnabled(optionGetShortcutOverlay());
3597 break;3603 break;
3604 case UnityshellOptions::LowGraphicsMode:
3605 if (optionGetLowGraphicsMode())
3606 BackgroundEffectHelper::blur_type = BLUR_NONE;
3607 else
3608 BackgroundEffectHelper::blur_type = (unity::BlurType)optionGetDashBlurExperimental();
3609
3610 unity::Settings::Instance().SetLowGfxMode(optionGetLowGraphicsMode());
3611 break;
3598 case UnityshellOptions::DecayRate:3612 case UnityshellOptions::DecayRate:
3599 launcher_options->edge_decay_rate = optionGetDecayRate() * 100;3613 launcher_options->edge_decay_rate = optionGetDecayRate() * 100;
3600 break;3614 break;
36013615
=== modified file 'plugins/unityshell/unityshell.xml.in'
--- plugins/unityshell/unityshell.xml.in 2014-04-07 03:21:46 +0000
+++ plugins/unityshell/unityshell.xml.in 2015-10-20 18:34:31 +0000
@@ -146,6 +146,12 @@
146 <_long>Enables possibility to display an overlay showing available mouse and keyboard shortcuts.</_long>146 <_long>Enables possibility to display an overlay showing available mouse and keyboard shortcuts.</_long>
147 <default>true</default>147 <default>true</default>
148 </option>148 </option>
149
150 <option name="low_graphics_mode" type="bool">
151 <_short>Enable Low Graphics Mode</_short>
152 <_long>Enables low graphics mode regardless of hardware in the system</_long>
153 <default>false</default>
154 </option>
149 </group>155 </group>
150156
151 <group>157 <group>
152158
=== modified file 'unity-shared/BGHash.cpp'
--- unity-shared/BGHash.cpp 2015-03-11 20:54:31 +0000
+++ unity-shared/BGHash.cpp 2015-10-20 18:34:31 +0000
@@ -116,8 +116,11 @@
116 .SetDuration(skip_animation ? 0 : TRANSITION_DURATION)116 .SetDuration(skip_animation ? 0 : TRANSITION_DURATION)
117 .Start();117 .Start();
118118
119 // This will make sure that the animation starts even if the screen is idle.119 if (nux::WindowThread* wt = nux::GetWindowThread())
120 nux::GetWindowThread()->RequestRedraw();120 {
121 // This will make sure that the animation starts even if the screen is idle.
122 wt->RequestRedraw();
123 }
121}124}
122125
123void BGHash::OnTransitionUpdated(nux::Color const& new_color)126void BGHash::OnTransitionUpdated(nux::Color const& new_color)
124127
=== modified file 'unity-shared/CompizUtils.cpp'
--- unity-shared/CompizUtils.cpp 2014-12-16 19:35:06 +0000
+++ unity-shared/CompizUtils.cpp 2015-10-20 18:34:31 +0000
@@ -190,9 +190,6 @@
190 if (win->wmType() & (CompWindowTypeDockMask | CompWindowTypeDesktopMask))190 if (win->wmType() & (CompWindowTypeDockMask | CompWindowTypeDesktopMask))
191 return elements;191 return elements;
192192
193 if (win->inShowDesktopMode())
194 return elements;
195
196 auto const& region = win->region();193 auto const& region = win->region();
197 bool rectangular = (region.numRects() == 1);194 bool rectangular = (region.numRects() == 1);
198 bool alpha = win->alpha();195 bool alpha = win->alpha();
199196
=== modified file 'unity-shared/OverlayRenderer.cpp'
--- unity-shared/OverlayRenderer.cpp 2014-07-24 14:14:47 +0000
+++ unity-shared/OverlayRenderer.cpp 2015-10-20 18:34:31 +0000
@@ -116,6 +116,8 @@
116{116{
117 parent->scale = Settings::Instance().em()->DPIScale();117 parent->scale = Settings::Instance().em()->DPIScale();
118 parent->scale.changed.connect(sigc::hide(sigc::mem_fun(this, &OverlayRendererImpl::LoadScaledTextures)));118 parent->scale.changed.connect(sigc::hide(sigc::mem_fun(this, &OverlayRendererImpl::LoadScaledTextures)));
119 Settings::Instance().low_gfx_changed.connect(sigc::mem_fun(this, &OverlayRendererImpl::UpdateTextures));
120
119 UpdateTextures();121 UpdateTextures();
120 LoadScaledTextures();122 LoadScaledTextures();
121}123}
122124
=== modified file 'unity-shared/OverlayScrollView.cpp'
--- unity-shared/OverlayScrollView.cpp 2014-08-06 14:09:30 +0000
+++ unity-shared/OverlayScrollView.cpp 2015-10-20 18:34:31 +0000
@@ -50,7 +50,11 @@
50 scale.changed.connect([this] (double scale) {50 scale.changed.connect([this] (double scale) {
51 m_MouseWheelScrollSize = MOUSE_WHEEL_SCROLL_SIZE.CP(scale);51 m_MouseWheelScrollSize = MOUSE_WHEEL_SCROLL_SIZE.CP(scale);
52 });52 });
53
54 page_direction.connect([scrollbar] (ScrollDir dir) {
55 scrollbar->PerformPageNavigation(dir);
56 });
53}57}
5458
55} // dash namespace59} // dash namespace
56} // unity namespace
57\ No newline at end of file60\ No newline at end of file
61} // unity namespace
5862
=== modified file 'unity-shared/OverlayScrollView.h'
--- unity-shared/OverlayScrollView.h 2014-08-06 14:09:30 +0000
+++ unity-shared/OverlayScrollView.h 2015-10-20 18:34:31 +0000
@@ -21,6 +21,7 @@
21#define _UNITY_SCROLL_VIEW_H_21#define _UNITY_SCROLL_VIEW_H_
2222
23#include <Nux/Nux.h>23#include <Nux/Nux.h>
24#include "PlacesOverlayVScrollBar.h"
2425
25namespace unity26namespace unity
26{27{
@@ -33,6 +34,7 @@
33 ScrollView(NUX_FILE_LINE_PROTO);34 ScrollView(NUX_FILE_LINE_PROTO);
3435
35 nux::RWProperty<double> scale;36 nux::RWProperty<double> scale;
37 sigc::signal<void, ScrollDir> page_direction;
3638
37 using nux::ScrollView::SetVScrollBar;39 using nux::ScrollView::SetVScrollBar;
38};40};
3941
=== modified file 'unity-shared/OverlayWindowButtons.cpp'
--- unity-shared/OverlayWindowButtons.cpp 2014-02-26 20:26:01 +0000
+++ unity-shared/OverlayWindowButtons.cpp 2015-10-20 18:34:31 +0000
@@ -36,9 +36,9 @@
36 : nux::BaseWindow("OverlayWindowButtons")36 : nux::BaseWindow("OverlayWindowButtons")
37 , window_buttons_(new WindowButtons())37 , window_buttons_(new WindowButtons())
38{38{
39 window_buttons_->queue_draw.connect([this] (nux::Layout* /*layout*/) {39 auto queue_draw = sigc::hide(sigc::mem_fun(this, &OverlayWindowButtons::QueueDraw));
40 QueueDraw();40 window_buttons_->queue_draw.connect(queue_draw);
41 });41 window_buttons_->child_queue_draw.connect(queue_draw);
4242
43 AddChild(window_buttons_.GetPointer());43 AddChild(window_buttons_.GetPointer());
44 UpdateGeometry();44 UpdateGeometry();
4545
=== modified file 'unity-shared/PlacesOverlayVScrollBar.cpp'
--- unity-shared/PlacesOverlayVScrollBar.cpp 2014-08-06 14:12:12 +0000
+++ unity-shared/PlacesOverlayVScrollBar.cpp 2015-10-20 18:34:31 +0000
@@ -121,6 +121,11 @@
121 animation_.SetFinishValue(stop);121 animation_.SetFinishValue(stop);
122}122}
123123
124void PlacesOverlayVScrollBar::PerformPageNavigation(ScrollDir dir)
125{
126 StartScrollAnimation(dir, _slider->GetBaseHeight());
127}
128
124void PlacesOverlayVScrollBar::StartScrollAnimation(ScrollDir dir, int stop)129void PlacesOverlayVScrollBar::StartScrollAnimation(ScrollDir dir, int stop)
125{130{
126 if (animation_.CurrentState() == nux::animation::Animation::State::Stopped)131 if (animation_.CurrentState() == nux::animation::Animation::State::Stopped)
127132
=== modified file 'unity-shared/PlacesOverlayVScrollBar.h'
--- unity-shared/PlacesOverlayVScrollBar.h 2014-08-06 14:12:12 +0000
+++ unity-shared/PlacesOverlayVScrollBar.h 2015-10-20 18:34:31 +0000
@@ -34,22 +34,24 @@
34namespace dash34namespace dash
35{35{
3636
37enum class ScrollDir : unsigned int
38{
39 UP,
40 DOWN,
41};
42
37class PlacesOverlayVScrollBar: public PlacesVScrollBar43class PlacesOverlayVScrollBar: public PlacesVScrollBar
38{44{
39public:45public:
40 PlacesOverlayVScrollBar(NUX_FILE_LINE_PROTO);46 PlacesOverlayVScrollBar(NUX_FILE_LINE_PROTO);
41 virtual ~PlacesOverlayVScrollBar() {}47 virtual ~PlacesOverlayVScrollBar() {}
4248
49 void PerformPageNavigation(ScrollDir dir);
50
43protected:51protected:
44 void Draw(nux::GraphicsEngine& graphics_engine, bool force_draw);52 void Draw(nux::GraphicsEngine& graphics_engine, bool force_draw);
4553
46private:54private:
47 enum class ScrollDir : unsigned int
48 {
49 UP,
50 DOWN,
51 };
52
53 void OnTrackGeometryChanged(nux::Area* area, nux::Geometry& geo);55 void OnTrackGeometryChanged(nux::Area* area, nux::Geometry& geo);
54 void OnVisibilityChanged(nux::Area* area, bool visible);56 void OnVisibilityChanged(nux::Area* area, bool visible);
55 void OnSensitivityChanged(nux::Area* area, bool sensitive);57 void OnSensitivityChanged(nux::Area* area, bool sensitive);
5658
=== modified file 'unity-shared/PluginAdapter.cpp'
--- unity-shared/PluginAdapter.cpp 2014-12-16 19:27:36 +0000
+++ unity-shared/PluginAdapter.cpp 2015-10-20 18:34:31 +0000
@@ -627,7 +627,7 @@
627 if (window->defaultViewport() == screen_vp &&627 if (window->defaultViewport() == screen_vp &&
628 window->isViewable() && window->isMapped() &&628 window->isViewable() && window->isMapped() &&
629 !window->minimized() && !window->inShowDesktopMode() &&629 !window->minimized() && !window->inShowDesktopMode() &&
630 !(window->state() & CompWindowStateAboveMask) &&630 !((window->state() & CompWindowStateAboveMask) && !window->focused()) &&
631 !(window->type() & CompWindowTypeSplashMask) &&631 !(window->type() & CompWindowTypeSplashMask) &&
632 !(window->type() & CompWindowTypeDockMask) &&632 !(window->type() & CompWindowTypeDockMask) &&
633 !window->overrideRedirect() &&633 !window->overrideRedirect() &&
@@ -772,7 +772,10 @@
772{772{
773 CompWindow* window = m_Screen->findWindow(window_id);773 CompWindow* window = m_Screen->findWindow(window_id);
774 if (window && (window->actions() & CompWindowActionMinimizeMask))774 if (window && (window->actions() & CompWindowActionMinimizeMask))
775 {
775 window->unminimize();776 window->unminimize();
777 window->show();
778 }
776}779}
777780
778void PluginAdapter::Shade(Window window_id)781void PluginAdapter::Shade(Window window_id)
@@ -953,6 +956,7 @@
953 if (forced_unminimize)956 if (forced_unminimize)
954 {957 {
955 top_window->unminimize();958 top_window->unminimize();
959 top_window->show();
956 }960 }
957961
958 top_window->raise();962 top_window->raise();
959963
=== modified file 'unity-shared/SearchBar.cpp'
--- unity-shared/SearchBar.cpp 2014-12-15 19:06:58 +0000
+++ unity-shared/SearchBar.cpp 2015-10-20 18:34:31 +0000
@@ -141,6 +141,9 @@
141 : View(NUX_FILE_LINE_PARAM)141 : View(NUX_FILE_LINE_PARAM)
142 , showing_filters(false)142 , showing_filters(false)
143 , can_refine_search(false)143 , can_refine_search(false)
144 , im_active([this] { return pango_entry_->im_active(); })
145 , im_preedit([this] { return pango_entry_->im_preedit(); })
146 , in_live_search([this] { return live_search_timeout_ && live_search_timeout_->IsRunning(); })
144 , live_search_wait(DEFAULT_LIVE_SEARCH_TIMEOUT)147 , live_search_wait(DEFAULT_LIVE_SEARCH_TIMEOUT)
145 , scale(DEFAULT_SCALE)148 , scale(DEFAULT_SCALE)
146 , show_filter_hint_(show_filter_hint)149 , show_filter_hint_(show_filter_hint)
@@ -179,11 +182,11 @@
179 pango_entry_->mouse_down.connect(sigc::mem_fun(this, &SearchBar::OnMouseButtonDown));182 pango_entry_->mouse_down.connect(sigc::mem_fun(this, &SearchBar::OnMouseButtonDown));
180 pango_entry_->end_key_focus.connect(sigc::mem_fun(this, &SearchBar::OnEndKeyFocus));183 pango_entry_->end_key_focus.connect(sigc::mem_fun(this, &SearchBar::OnEndKeyFocus));
181 pango_entry_->key_up.connect([this] (unsigned int, unsigned long, unsigned long) {184 pango_entry_->key_up.connect([this] (unsigned int, unsigned long, unsigned long) {
182 if (get_im_preedit())185 if (im_preedit())
183 {186 {
184 hint_->SetVisible(false);187 hint_->SetVisible(false);
185 hint_->QueueDraw();188 hint_->QueueDraw();
186 }189 }
187 });190 });
188191
189 layered_layout_ = new nux::LayeredLayout();192 layered_layout_ = new nux::LayeredLayout();
@@ -263,10 +266,8 @@
263 OnFontChanged();266 OnFontChanged();
264267
265 search_hint.changed.connect([this](std::string const& s) { OnSearchHintChanged(); });268 search_hint.changed.connect([this](std::string const& s) { OnSearchHintChanged(); });
266 search_string.SetGetterFunction(sigc::mem_fun(this, &SearchBar::get_search_string));269 search_string.SetGetterFunction([this] { return pango_entry_->GetText(); });
267 search_string.SetSetterFunction(sigc::mem_fun(this, &SearchBar::set_search_string));270 search_string.SetSetterFunction(sigc::mem_fun(this, &SearchBar::set_search_string));
268 im_active.SetGetterFunction(sigc::mem_fun(this, &SearchBar::get_im_active));
269 im_preedit.SetGetterFunction(sigc::mem_fun(this, &SearchBar::get_im_preedit));
270 showing_filters.changed.connect(sigc::mem_fun(this, &SearchBar::OnShowingFiltersChanged));271 showing_filters.changed.connect(sigc::mem_fun(this, &SearchBar::OnShowingFiltersChanged));
271 scale.changed.connect(sigc::mem_fun(this, &SearchBar::UpdateScale));272 scale.changed.connect(sigc::mem_fun(this, &SearchBar::UpdateScale));
272 Settings::Instance().font_scaling.changed.connect(sigc::hide(sigc::mem_fun(this, &SearchBar::UpdateSearchBarSize)));273 Settings::Instance().font_scaling.changed.connect(sigc::hide(sigc::mem_fun(this, &SearchBar::UpdateSearchBarSize)));
@@ -633,11 +634,6 @@
633 return expander_view_;634 return expander_view_;
634}635}
635636
636std::string SearchBar::get_search_string() const
637{
638 return pango_entry_->GetText();
639}
640
641bool SearchBar::set_search_string(std::string const& string)637bool SearchBar::set_search_string(std::string const& string)
642{638{
643 pango_entry_->SetText(string.c_str());639 pango_entry_->SetText(string.c_str());
@@ -649,16 +645,6 @@
649 return true;645 return true;
650}646}
651647
652bool SearchBar::get_im_active() const
653{
654 return pango_entry_->im_active();
655}
656
657bool SearchBar::get_im_preedit() const
658{
659 return pango_entry_->im_preedit();
660}
661
662//648//
663// Highlight649// Highlight
664//650//
665651
=== modified file 'unity-shared/SearchBar.h'
--- unity-shared/SearchBar.h 2014-12-08 22:02:13 +0000
+++ unity-shared/SearchBar.h 2015-10-20 18:34:31 +0000
@@ -63,6 +63,7 @@
63 nux::Property<bool> can_refine_search;63 nux::Property<bool> can_refine_search;
64 nux::ROProperty<bool> im_active;64 nux::ROProperty<bool> im_active;
65 nux::ROProperty<bool> im_preedit;65 nux::ROProperty<bool> im_preedit;
66 nux::ROProperty<bool> in_live_search;
66 nux::Property<unsigned> live_search_wait;67 nux::Property<unsigned> live_search_wait;
67 nux::Property<double> scale;68 nux::Property<double> scale;
6869
@@ -88,10 +89,7 @@
88 bool OnLiveSearchTimeout();89 bool OnLiveSearchTimeout();
89 bool OnSpinnerStartCb();90 bool OnSpinnerStartCb();
9091
91 std::string get_search_string() const;
92 bool set_search_string(std::string const& string);92 bool set_search_string(std::string const& string);
93 bool get_im_active() const;
94 bool get_im_preedit() const;
95 bool show_filter_hint_;93 bool show_filter_hint_;
9694
97 std::string GetName() const;95 std::string GetName() const;
9896
=== modified file 'unity-shared/UnitySettings.cpp'
--- unity-shared/UnitySettings.cpp 2015-03-12 00:57:05 +0000
+++ unity-shared/UnitySettings.cpp 2015-10-20 18:34:31 +0000
@@ -371,7 +371,12 @@
371371
372void Settings::SetLowGfxMode(const bool low_gfx)372void Settings::SetLowGfxMode(const bool low_gfx)
373{373{
374 pimpl->lowGfx_ = low_gfx;374 if (pimpl->lowGfx_ != low_gfx)
375 {
376 pimpl->lowGfx_ = low_gfx;
377
378 low_gfx_changed.emit();
379 }
375}380}
376381
377EMConverter::Ptr const& Settings::em(int monitor) const382EMConverter::Ptr const& Settings::em(int monitor) const
378383
=== modified file 'unity-shared/UnitySettings.h'
--- unity-shared/UnitySettings.h 2014-03-20 05:03:55 +0000
+++ unity-shared/UnitySettings.h 2015-10-20 18:34:31 +0000
@@ -57,6 +57,7 @@
57 nux::Property<double> font_scaling;57 nux::Property<double> font_scaling;
5858
59 sigc::signal<void> dpi_changed;59 sigc::signal<void> dpi_changed;
60 sigc::signal<void> low_gfx_changed;
6061
61private:62private:
62 class Impl;63 class Impl;
6364
=== modified file 'unity-shared/WindowButtons.cpp'
--- unity-shared/WindowButtons.cpp 2014-02-28 17:41:25 +0000
+++ unity-shared/WindowButtons.cpp 2015-10-20 18:34:31 +0000
@@ -64,6 +64,7 @@
64 if (new_state != visual_state_)64 if (new_state != visual_state_)
65 {65 {
66 visual_state_ = new_state;66 visual_state_ = new_state;
67 visual_state_change.emit(this);
67 QueueDraw();68 QueueDraw();
68 }69 }
69}70}

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: