Merge lp:~bregma/unity/7.2.1 into lp:unity/7.2

Proposed by Stephen M. Webb
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 3795
Proposed branch: lp:~bregma/unity/7.2.1
Merge into: lp:unity/7.2
Diff against target: 3275 lines (+2231/-373)
31 files modified
AUTHORS (+6/-1)
CMakeLists.txt (+1/-1)
ChangeLog (+1159/-0)
dash/DashController.cpp (+30/-25)
dash/DashController.h (+3/-5)
dash/DashView.cpp (+2/-2)
dash/ResultRendererTile.cpp (+1/-1)
debian/changelog (+41/-0)
debian/rules (+9/-5)
launcher/LauncherController.cpp (+0/-12)
lockscreen/CMakeLists.txt (+2/-0)
lockscreen/LockScreenAbstractShield.h (+5/-1)
lockscreen/LockScreenAcceleratorController.cpp (+146/-0)
lockscreen/LockScreenAcceleratorController.h (+46/-0)
lockscreen/LockScreenAccelerators.cpp (+528/-0)
lockscreen/LockScreenAccelerators.h (+94/-0)
lockscreen/LockScreenController.cpp (+14/-1)
lockscreen/LockScreenController.h (+4/-1)
lockscreen/LockScreenPanel.cpp (+4/-237)
lockscreen/LockScreenPanel.h (+2/-50)
lockscreen/LockScreenShield.cpp (+23/-6)
lockscreen/LockScreenShield.h (+2/-1)
lockscreen/LockScreenShieldFactory.cpp (+2/-2)
lockscreen/LockScreenShieldFactory.h (+2/-2)
lockscreen/UserPromptView.cpp (+2/-0)
plugins/unityshell/src/unityshell.cpp (+45/-10)
plugins/unityshell/src/unityshell.h (+1/-0)
tests/data/external.gschema.xml (+21/-0)
tests/test_lockscreen_controller.cpp (+3/-2)
unity-shared/DebugDBusInterface.cpp (+24/-4)
unity-shared/PluginAdapter.cpp (+9/-4)
To merge this branch: bzr merge lp:~bregma/unity/7.2.1
Reviewer Review Type Date Requested Status
Brandon Schaefer (community) Approve
Review via email: mp+219420@code.launchpad.net

Commit message

released upstream micro-release 7.2.1

Description of the change

Upstream micro-release 7.2.1 containing the following SRU fixes.

#1312749: German translation: password wrong text is too long and destroys layout
#1251193: Language issue from the unity lense screen
#1313280: Fullscreen window set to "Always on Top" in single-monitor will hide the lockscreen
#1221673: compiz crashed with SIGSEGV in CompAction::initiate()
#1307748: xpathselect attribute matching doesn't match anything other than object Ids
#1317276: Unity 7 GCC ICE on ARM64
#1291461: Lockscreen: keyboard layout switching shortcuts not working

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'AUTHORS'
2--- AUTHORS 2014-03-31 18:00:13 +0000
3+++ AUTHORS 2014-05-13 20:01:30 +0000
4@@ -13,6 +13,7 @@
5 Alex Launi <alex.launi@canonical.com>
6 Alex Launi <alex.launi@canonical.com>, Allan LeSage <allanlesage@gmail.com>
7 Alex Launi <alex.launi@canonical.com>, Thomi Richards <thomi.richards@canonical.com>
8+ Alfred Neumayer <dev.beidl@gmail.com>
9 Andrea Azzarone
10 Andrea Azzarone <azzaronea@gmail.com>
11 Andrea Cimitan <andrea.cimitan@canonical.com>
12@@ -44,8 +45,8 @@
13 Christopher Lee <chris.lee@canonical.com>, Thomi Richards <thomi.richards@canonical.com>
14 Christopher Lee <veebers@gmail.com>
15 Christopher Townsend <christopher.townsend@canonical.com>
16+ Chris Townsend <christopher.townsend@canonical.com>
17 Chris Townsend <Christopher.Townsend@canonical.com>
18- Chris Townsend <christopher.townsend@canonical.com>
19 CI bot <ps-jenkins@lists.canonical.com>
20 Daniel d'Andrada <daniel.dandrada@canonical.com>
21 Daniel van Vugt <vanvugt@gmail.com>
22@@ -86,6 +87,7 @@
23 Jay Taoko <jay.taoko@canonical.com>, Mirco Müller <mirco.mueller@ubuntu.com>
24 Jay Taoko <jay.taoko@canonical.com>, Robert Carr <racarr@canonical.com>
25 Jeremy Bicha <jbicha@ubuntu.com>
26+ Jinkyu Yi <jincreator@jincreator.net>
27 jokerdino@bvm128.zdom.org
28 Jussi Pakkanen <jussi.pakkanen@canonical.com>
29 Ken VanDine <ken.vandine@canonical.com>
30@@ -100,6 +102,7 @@
31 Luke Yelavich <luke.yelavich@canonical.com>
32 Manuel de la Pena <manuel@canonical.com>
33 Manuel de la Pena <manuel@canonical.com>, Nick Dedekind <nicholas.dedekind@gmail.com>, Pawel Stolowski <pawel.stolowski@canonical.com>, Michal Hruby <michal.mhr@gmail.com>, Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com>, Marco Trevisan (Treviño) <mail@3v1n0.net>, Automatic PS uploader <ps-jenkins@lists.canonical.com>, Chris Townsend <christopher.townsend@canonical.com>, Andrea Azzarone <azzaronea@gmail.com>
34+ Marc Deslauriers <marc.deslauriers@ubuntu.com>
35 Marco Biscaro <marcobiscaro2112@gmail.com>
36 Marco Biscaro <marcobiscaro2112@gmail.com>, Rick Spencer <rick.spencer@canonical.com>
37 Marco Mariani <dfly720@gmail.com>, Thomi Richards <thomi.richards@canonical.com>
38@@ -108,6 +111,7 @@
39 Marco Trevisan <marco.trevisan@canonical.com>
40 Marco Trevisan (Treviño) <mail@3v1n0.net>
41 Marco Trevisan (Treviño) <mail@3v1n0.net>, 3v1n0 <mail@3v1n0.net>
42+ Marco Trevisan (Treviño) <mail@3v1n0.net>, Andrea Azzarone <azzaronea@gmail.com>
43 Marco Trevisan (Treviño) <mail@3v1n0.net>, Andrea Cimitan <andrea.cimitan@canonical.com>
44 Marco Trevisan (Treviño) <mail@3v1n0.net>, Brandon Schaefer <brandon.schaefer@canonical.com>
45 Marco Trevisan (Treviño) <mail@3v1n0.net>, Brandon Schaefer <brandontschaefer@gmail.com>, Tim Penhey <tim.penhey@canonical.com>
46@@ -168,6 +172,7 @@
47 Rodrigo Moya <rodrigo.moya@canonical.com>
48 Romain Perier <rperier@ubuntu.com>
49 Ryan Lortie <desrt@desrt.ca>
50+ Sami Jaktholm <sjakthol@outlook.com>
51 Sam Spilsbury <sam.spilsbury@canonical.com>
52 Sam Spilsbury <sam.spilsbury@canonical.com>, Andrea Azzarone <azzaronea@gmail.com>
53 Sam Spilsbury <sam.spilsbury@canonical.com>, Daniel van Vugt <vanvugt@gmail.com>
54
55=== modified file 'CMakeLists.txt'
56--- CMakeLists.txt 2014-03-31 18:00:13 +0000
57+++ CMakeLists.txt 2014-05-13 20:01:30 +0000
58@@ -10,7 +10,7 @@
59 set (PROJECT_NAME "unity")
60 set (UNITY_MAJOR 7)
61 set (UNITY_MINOR 2)
62-set (UNITY_MICRO 0)
63+set (UNITY_MICRO 1)
64 set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}")
65 set (UNITY_API_VERSION "6.0")
66 set (UNITY_COMPONENTS_VERSION "6")
67
68=== modified file 'ChangeLog'
69--- ChangeLog 2014-03-31 18:00:13 +0000
70+++ ChangeLog 2014-05-13 20:01:30 +0000
71@@ -1,3 +1,1162 @@
72+2014-05-13 Stephen M. Webb <stephen.webb@canonical.com>
73+
74+ debian/changelog: updated with additional lockscreen changes
75+
76+2014-05-13 Stephen M. Webb <stephen.webb@canonical.com>
77+
78+ added changelog for #1317276
79+
80+2014-05-13 Stephen M. Webb <stephen.webb@canonical.com>
81+
82+ disabled precompiled headers on arm64 Ubuntu package builds
83+
84+2014-05-12 Stephen M. Webb <stephen.webb@canonical.com>
85+
86+ disabled precompiled headers for arm64 arch, it seems to cause random ICEs
87+
88+2014-05-13 Stephen M. Webb <stephen.webb@canonical.com>
89+
90+ lockscreen/LockScreenAccelerators.h: added required header for std:vector definition
91+
92+2014-05-12 Stephen M. Webb <stephen.webb@canonical.com>
93+
94+ added missing header for std::vector definition
95+
96+2014-05-13 Stephen M. Webb <stephen.webb@canonical.com>
97+
98+ added changelog for #1312749
99+
100+2014-05-13 Brandon Schaefer <brandontschaefer@gmail.com>
101+
102+ Set the max width, so our static text wraps. So we don't end up rendering text out of the view area.
103+
104+2014-04-25 Jonas Schwabe
105+
106+ * Set the max width, so the static text wraps (and doesn't go out of the view!)
107+
108+2014-05-13 Stephen M. Webb <stephen.webb@canonical.com>
109+
110+ added changelog for #1307748
111+
112+2014-05-13 Marco Trevisan (Treviño) <mail@3v1n0.net>
113+
114+ DebugDBusInterface: match properties if they are in the AP array form [<type>, <value>]
115+
116+2014-04-24 Marco Trevisan (Treviño) <mail@3v1n0.net>
117+
118+ DebugDBusInterface: GetPropertyValue should return a proper value only if we've a valid array
119+
120+ Improve debugging messages and fix leaks.
121+
122+2014-04-16 Marco Trevisan (Treviño) <mail@3v1n0.net>
123+
124+ DebugDBusInterface: match properties if they are in the AP array form [<type>, <value>]
125+
126+2014-05-13 Stephen M. Webb <stephen.webb@canonical.com>
127+
128+ added changelog for #1221673
129+
130+2014-05-13 Marco Trevisan (Treviño) <mail@3v1n0.net>
131+
132+ PluginAdapter: make sure we don't try to call an invalid initiate/terminate callback function
133+
134+2014-04-30 Marco Trevisan (Treviño) <mail@3v1n0.net>
135+
136+ PluginAdapter: make sure we don't try to call an invalid initiate/terminate callback function
137+
138+2014-05-13 Stephen M. Webb <stephen.webb@canonical.com>
139+
140+ added changelog for #1313280
141+
142+2014-05-13 Marco Trevisan (Treviño) <mail@3v1n0.net>
143+
144+ UnityScreen: always paint the lockscreen above, just add menu and onboard as exceptions
145+
146+ Some code cleanup, factorizing similar code.
147+
148+2014-05-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
149+
150+ Mergin with trunk
151+
152+2014-04-29 Marco Trevisan (Treviño) <mail@3v1n0.net>
153+
154+ Merging with lp:~3v1n0/unity/lockscreen-keys-disable
155+
156+2014-04-25 Marco Trevisan (Treviño) <mail@3v1n0.net>
157+
158+ UnityScreen: Get the Hud initialization event if unity is locked
159+
160+2014-04-25 Marco Trevisan (Treviño) <mail@3v1n0.net>
161+
162+ UnityScreen: if the screen is grabbed when showing the Hud, wait for ungrab for a couple of seconds
163+
164+2014-04-25 Marco Trevisan (Treviño) <mail@3v1n0.net>
165+
166+ UnityScreen: don't try to show Dash/Hud if the screen is grabbed
167+
168+ Also move the dash opening out from LauncherController, and get rid of UBus
169+ as first initialization source, that can only slow things down here.
170+
171+2014-04-25 Marco Trevisan (Treviño) <mail@3v1n0.net>
172+
173+ DashController: return a bool in ShowDash, wait for ungrab for 2 seconds maximum
174+
175+ Now if the screen is grabbed, we just wait a couple of seconds the ungrab-event.
176+ If that happens in such timeframe then we show the dash, otherwise we ignore the request.
177+
178+ Also return a bool weather we've shown the dash or not.
179+
180+2014-04-24 Marco Trevisan (Treviño) <mail@3v1n0.net>
181+
182+ UnityScreen: notify grab also when the screen is not grabbed but we got a NotifyWhileGrabbed event
183+
184+2014-05-13 Stephen M. Webb <stephen.webb@canonical.com>
185+
186+ added changelog for #1251193
187+
188+2014-05-13 Jinkyu Yi <jincreator@jincreator.net>
189+
190+ Dash: Fix problem at checking blacklisted unicode range
191+
192+2014-05-04 Jinkyu Yi <jincreator@jincreator.net>
193+
194+ Dash: Fix problem at checking blacklisted unicode range. Fixes: 1251193
195+
196+2014-05-13 Stephen M. Webb <stephen.webb@canonical.com>
197+
198+ added changelog for #1291461
199+
200+2014-05-13 William Hua <william.hua@canonical.com>
201+
202+ added proper support for modifier-only shortcuts on the lock screen
203+
204+2014-04-30 William Hua <william.hua@canonical.com>
205+
206+ Treat Meta modifier as Alt.
207+
208+2014-04-30 William Hua <william.hua@canonical.com>
209+
210+ Minor revisions.
211+
212+2014-04-29 William Hua <william.hua@canonical.com>
213+
214+ Destroy accelerator controller between locks.
215+
216+2014-04-29 William Hua <william.hua@canonical.com>
217+
218+ Remove gotos.
219+
220+2014-04-18 William Hua <william.hua@canonical.com>
221+
222+ Make a separate controller just for accelerators.
223+
224+2014-04-18 William Hua <william.hua@canonical.com>
225+
226+ Rip everything out and start anew.
227+
228+2014-04-15 William Hua <william.hua@canonical.com>
229+
230+ Add proper support for modifier-only shortcuts on the lock screen.
231+
232+2014-05-02 Marc Deslauriers <marc.deslauriers@ubuntu.com>
233+
234+ debian/changelog: sync with distro
235+
236+2014-05-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
237+
238+ PanelService: emit an invalid EntryActivated signal if the menu hasn't actually been shown
239+
240+ In addition, if the menu is not visible after the first popup call, try to show a menu
241+ without keyboard focus. This will make possible to see menus also when there's a key-grab
242+ (although they will be without keyboard support).
243+
244+ Finally, reset the menu state, if that failed.
245+
246+2014-04-29 Marco Trevisan (Treviño) <mail@3v1n0.net>
247+
248+ LockScreenPanel: if a menu is opened, and the screen is not grabbed, give the grab back to the Shield.
249+
250+2014-04-29 Marco Trevisan (Treviño) <mail@3v1n0.net>
251+
252+ PanelService: cleanup the menu popup code, avoid unnecessary calls to gtk_widget_is_visible
253+
254+2014-04-29 Marco Trevisan (Treviño) <mail@3v1n0.net>
255+
256+ PanelService: if the menu is not visible, try to show a menu without keyboard focus
257+
258+ This will make possible to see menus also when there's a key-grab.
259+
260+2014-04-29 Marco Trevisan (Treviño) <mail@3v1n0.net>
261+
262+ PanelService: emit an invalid EntryActivated signal if the menu has not actually been shown
263+
264+ And also reset the menu state, if that failed
265+
266+2014-05-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
267+
268+ UnityScreen: toggle activation of all the unity compiz actions when locking the screen
269+
270+ Also, make sure that the lockscreen views are treated as "always-on-front" windows by nux
271+ (and this applies to both visibility and events).
272+
273+2014-04-30 Marco Trevisan (Treviño) <mail@3v1n0.net>
274+
275+ TestSessionController: verify correctly the new Hide method
276+
277+2014-04-30 Marco Trevisan (Treviño) <mail@3v1n0.net>
278+
279+ LockScreenController: set the primary shield as the always on front window when another basewindow hides
280+
281+ That window might have set itself as the always on front window, so we should restore our role
282+
283+2014-04-30 Marco Trevisan (Treviño) <mail@3v1n0.net>
284+
285+ SessionController: set the dialog as the nux always on front view
286+
287+2014-04-30 Marco Trevisan (Treviño) <mail@3v1n0.net>
288+
289+ SessionController: delete the views when hidden, we don't need to keep them around
290+
291+2014-04-30 Marco Trevisan (Treviño) <mail@3v1n0.net>
292+
293+ UnityScreen: make sure we reset all the unity views before locking
294+
295+2014-04-30 Marco Trevisan (Treviño) <mail@3v1n0.net>
296+
297+ UnityScreen: also send the terminate action to Alt pressure on lock
298+
299+2014-04-30 Marco Trevisan (Treviño) <mail@3v1n0.net>
300+
301+ UnityScreen: toggle all the unity (and thus the Gnome) key bindings when locking
302+
303+2014-04-29 Marco Trevisan (Treviño) <mail@3v1n0.net>
304+
305+ LockScreenShield: don't try to regrab again if we've been just requested to ungrab
306+
307+2014-04-29 Marco Trevisan (Treviño) <mail@3v1n0.net>
308+
309+ LockScreenShield: wait for the next ungrab-event if we can't grab when panel is not active anymore
310+
311+2014-04-29 Marco Trevisan (Treviño) <mail@3v1n0.net>
312+
313+ UnityScreen: toggle activation of all the unity compiz actions when locking the screen
314+
315+2014-04-29 Marco Trevisan (Treviño) <mail@3v1n0.net>
316+
317+ LockScreenController: set the blank window or the primary shield as the always-on-front window
318+
319+ In this way nux won't draw anything above it, nor will pass events to the underneath windows
320+
321+2014-04-23 CI bot <ps-jenkins@lists.canonical.com>
322+
323+ Releasing 7.2.0+14.04.20140423-0ubuntu1
324+
325+2014-04-23 Chris Townsend <christopher.townsend@canonical.com>
326+
327+ When setting the STARTING quirk for Application Launcher icons, only do it for the monitor specified in the passed in args. Fixes: 1291362
328+
329+2014-04-21 Chris Townsend <christopher.townsend@canonical.com>
330+
331+ When setting the STARTING quirk for Application Launcher icons, only do it for the monitor specified in the passed in args.
332+
333+2014-04-23 Andrea Azzarone <azzaronea@gmail.com>
334+
335+ Close dash/hud/etc. on signal locked too. Fixes: 1308850
336+
337+2014-04-17 Andrea Azzarone <azzaronea@gmail.com>
338+
339+ Use prompt_lock_requested signal.
340+
341+2014-04-17 Andrea Azzarone <azzaronea@gmail.com>
342+
343+ Close dash/hud/etc. on signal locked too.
344+
345+2014-04-17 Andrea Azzarone <azzaronea@gmail.com>
346+
347+ Close dash/hud/etc. on signal locked too.
348+
349+2014-04-16 CI bot <ps-jenkins@lists.canonical.com>
350+
351+ Releasing 7.2.0+14.04.20140416-0ubuntu1
352+
353+2014-04-16 Andrea Azzarone <azzaronea@gmail.com>
354+
355+ Do not allow to activate twice the same entry! Fixes: 1308572
356+
357+2014-04-16 Andrea Azzarone <azzaronea@gmail.com>
358+
359+ Minor change.
360+
361+2014-04-16 Andrea Azzarone <azzaronea@gmail.com>
362+
363+ Fix ident.
364+
365+2014-04-16 Andrea Azzarone <azzaronea@gmail.com>
366+
367+ Do not allow to activate two times the same entry!
368+
369+2014-04-16 Marco Trevisan (Treviño) <mail@3v1n0.net>
370+
371+ UnityScreen: save a locked.stamp file when locking/unlocking, to relock on startup
372+
373+ This makes unity to relocks if it was locked before crashing... Fixes: 1308572
374+
375+2014-04-17 Marco Trevisan (Treviño) <mail@3v1n0.net>
376+
377+ UnityScreen: Save lock file stamp in $XDG_RUNTIME_DIR, cleanup it on destroy
378+
379+2014-04-17 Marco Trevisan (Treviño) <mail@3v1n0.net>
380+
381+ DesktopUtilities: add GetUserRuntimeDirectory to fetch $XDG_RUNTIME_DIR
382+
383+2014-04-16 Marco Trevisan (Treviño) <mail@3v1n0.net>
384+
385+ UnityScreen: save a locked.stamp file when locking/unlocking, to relock on startup
386+
387+2014-04-16 Marco Trevisan (Treviño) <mail@3v1n0.net>
388+
389+ DesktopUtilities: add GetCacheDirectory, to fetch and create an unity cache dir
390+
391+2014-04-14 CI bot <ps-jenkins@lists.canonical.com>
392+
393+ Releasing 7.2.0+14.04.20140414.1-0ubuntu1
394+
395+2014-04-14 Marco Trevisan (Treviño) <mail@3v1n0.net>
396+
397+
398+ CompizUtils: only shadow-decorate alpha windows that have full decorations as well
399+
400+ Since alpha windows might have custom shapes, it's safer not to shadow-decorate them
401+ unless they don't provide, for sure, a full decoration.
402+
403+ This fixes, between the others, the unity force-quit dialog. Fixes: 1281825, 1307524
404+
405+2014-04-14 Marco Trevisan (Treviño) <mail@3v1n0.net>
406+
407+ CompizUtils: only shadow-decorate alpha windows that have full decorations as well
408+
409+ Since alpha windows might have custom shapes, it's safer not to shadow-decorate them
410+ unless they don't provide, for sure, a full decoration.
411+
412+ This fixes, between the others, the unity force-quit dialog.
413+
414+2014-04-14 Sami Jaktholm <sjakthol@outlook.com>
415+
416+ Scale: Correctly detect the activation of a scale and set scale_just_activated_
417+ to true properly. Fixes: 1288789
418+
419+2014-04-11 Sami Jaktholm <sjakthol@outlook.com>
420+
421+ Scale: Correctly detect the activation of a scale and set scale_just_activated_
422+ to true properly.
423+
424+2014-04-14 Alfred Neumayer <dev.beidl@gmail.com>
425+
426+ Security issue: Gestures on the lock screen allow to peek inside running applications.
427+ As with keyboard input, gestures should be blocked while the screen is locked. Fixes: 1303041, 1306973
428+
429+2014-04-14 Alfred Neumayer <dev.beidl@gmail.com>
430+
431+ Stop hiding the launchers parent window for now as it breaks urgent icon wiggling and hint shadow.
432+
433+2014-04-13 Alfred Neumayer <dev.beidl@gmail.com>
434+
435+ Don't queue up drawing if the gestures are ignored.
436+
437+2014-04-12 Alfred Neumayer <dev.beidl@gmail.com>
438+
439+ Make the lockscreen_controller accessible to other classes and don't allow 4 finger gestures in the lock screen.
440+
441+2014-04-12 Alfred Neumayer <dev.beidl@gmail.com>
442+
443+ Should not even try to show the switcher if the screen is locked.
444+
445+2014-04-12 Alfred Neumayer <dev.beidl@gmail.com>
446+
447+ Forgot a variable
448+
449+2014-04-12 Alfred Neumayer <dev.beidl@gmail.com>
450+
451+ Also, don't hide the launcher window if expo or scale are active.
452+
453+2014-04-12 Alfred Neumayer <dev.beidl@gmail.com>
454+
455+ Really shouldn't hide the launcher window if the dash is open.
456+
457+2014-04-11 CI bot <ps-jenkins@lists.canonical.com>
458+
459+ Releasing 7.2.0+14.04.20140411-0ubuntu1
460+
461+2014-04-11 Sami Jaktholm <sjakthol@outlook.com>
462+
463+ Lockscreen: Give proper grabs to the shield before releasing blank_window_. Fixes: 1306417
464+
465+2014-04-11 Sami Jaktholm <sjakthol@outlook.com>
466+
467+ Lockscreen: Give proper grabs to the shield before releasing blank_window_.
468+
469+2014-04-10 CI bot <ps-jenkins@lists.canonical.com>
470+
471+ Releasing 7.2.0+14.04.20140410.1-0ubuntu1
472+
473+2014-04-10 William Hua <william.hua@canonical.com>
474+
475+ Enable sound buttons and input source switching under lock screen.
476+
477+2014-04-11 William Hua <william.hua@canonical.com>
478+
479+ Clean up.
480+
481+2014-04-11 William Hua <william.hua@canonical.com>
482+
483+ Fix merge errors.
484+
485+2014-04-11 William Hua <william.hua@canonical.com>
486+
487+ Minor changes.
488+
489+2014-04-11 William Hua <william.hua@canonical.com>
490+
491+ Merge trunk.
492+
493+2014-04-11 William Hua <william.hua@canonical.com>
494+
495+ Enable sound and input source shortcuts on lock screen.
496+
497+2014-04-10 CI bot <ps-jenkins@lists.canonical.com>
498+
499+ LockScreen: add ability to show without fading in on some system calls
500+
501+ Also, if locking is not enabled, calling Lock causes the screensaver to be initiated.
502+ Many cleanups and misc fixes. Fixes: 1292575, 1305194
503+
504+2014-04-10 Eleni Maria Stea <elenimaria.stea@canonical.com>
505+
506+ It fixes the quicklist menu appearance. Fixes: 1298859
507+
508+2014-04-09 Eleni Maria Stea <elenimaria.stea@canonical.com>
509+
510+ fixed quicklist scaling
511+
512+2014-04-10 Brandon Schaefer <brandontschaefer@gmail.com>
513+
514+ When we detect caps lock, or caps lock is pressed, render a warning icon to show its on. Fixes: 1291737
515+
516+2014-04-09 Brandon Schaefer <brandontschaefer@gmail.com>
517+
518+ * Make sure we update the caps lock detector when we change primary sheilds
519+
520+2014-04-01 Brandon Schaefer <brandontschaefer@gmail.com>
521+
522+ * Get rid of magic numbers, have to get the width of the cached
523+ spin icon width, so we can place the warning icon in the right spot
524+
525+2014-04-01 Brandon Schaefer <brandontschaefer@gmail.com>
526+
527+ * Check if caps is on each time we make a new Prompt, as it can change
528+ when authenticating, and we need to know.
529+
530+2014-04-01 Brandon Schaefer <brandontschaefer@gmail.com>
531+
532+ * Detect if caps lock is on, and check if caps lock is pressed.
533+ If so, then render a warning icon.
534+
535+2014-04-10 Alfred Neumayer <dev.beidl@gmail.com>
536+
537+ If the dash has not been opened before, a 4 finger tap will result in a dash with no selected scope.
538+ Instead, set up the window and view of the dash by sending DASH_ABOUT_TO_SHOW (same happens when hovering the mouse pointer over the BFB icon)
539+ and open the home scope. Fixes: 1303468
540+
541+2014-04-10 Alfred Neumayer <dev.beidl@gmail.com>
542+
543+ UnityGestureTarget.cpp: Remove spaces
544+
545+2014-04-10 Alfred Neumayer <dev.beidl@gmail.com>
546+
547+ 4 finger tap: Set up the dash window and its view, show the home scope afterwards.
548+
549+2014-04-10 Alfred Neumayer <dev.beidl@gmail.com>
550+
551+ Launcher: Show and hide the launcher window OnDragUpdate() to fix the gesture animations Fixes: 1303141
552+
553+2014-04-10 Alfred Neumayer <dev.beidl@gmail.com>
554+
555+ Only hide/unhide launcher window if autohide mode is on.
556+
557+2014-04-10 Alfred Neumayer <dev.beidl@gmail.com>
558+
559+ Actually, Hide/Un-Hide launcher window in OnDragUpdate.
560+
561+2014-04-10 Alfred Neumayer <dev.beidl@gmail.com>
562+
563+ Un-hide launcher window when dragging out using 4 finger gesture: https://bugs.launchpad.net/unity/+bug/1303141
564+
565+2014-04-10 Alfred Neumayer <dev.beidl@gmail.com>
566+
567+ Alt-Tab has always respected the alt-tab-bias-viewport setting, but the 3-finger gesture to switch between windows has not, even though it does the same thing.
568+ They should behave the same way depending on the CCSM setting. Fixes: 1303060
569+
570+2014-04-07 Alfred Neumayer <dev.beidl@gmail.com>
571+
572+ Make 3 finger window switch gesture respect the alt-tab-bias-viewport setting by moving the check to SetUpAndShowSwitcher.
573+
574+2014-04-10 Sami Jaktholm <sjakthol@outlook.com>
575+
576+ Shortcuts: Listen and react to view close requests. Fixes: 1297842
577+
578+2014-04-05 Sami Jaktholm <sjakthol@outlook.com>
579+
580+ Shortcuts: Listen and react to view close requests.
581+
582+2014-04-10 Marco Trevisan (Treviño) <mail@3v1n0.net>
583+
584+ DecorationsGrabEdge, PanelMenuView: perform proper WM action on clicks, based on user settings Fixes: 1283849
585+
586+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
587+
588+ PanelMenuView: use generic actions based on WM settings for double,middle and right clicks
589+
590+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
591+
592+ WindowManager: add methods to {Horizontally,Vertically}Maximize a window
593+
594+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
595+
596+ WindowManager: add window shading methods
597+
598+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
599+
600+ DecorationsGrabEdge: perform proper WM action on clicks, based on user settings
601+
602+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
603+
604+ DecorationStyle: add WindowManagerAction to get WM click options
605+
606+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
607+
608+ Merging with lp:~3v1n0/unity/right-left-click-maximize-fix
609+
610+2014-04-10 CI bot <ps-jenkins@lists.canonical.com>
611+
612+ Releasing 7.2.0+14.04.20140410-0ubuntu1
613+
614+2014-04-10 CI bot <ps-jenkins@lists.canonical.com>
615+
616+ Session: Don't lock the screen if screen locking is disabled by
617+ org.gnome.desktop.lockdown disable-lock-screen. Fixes: 1292154
618+
619+2014-04-10 CI bot <ps-jenkins@lists.canonical.com>
620+
621+ ScreenSaverDBusManager: start/stop gnome-screensaver if we don't/do handle the locking
622+
623+ This allows to just use the fallback gnome-screensaver lockscreen if we need to use it. Fixes: 1303712
624+
625+2014-04-10 CI bot <ps-jenkins@lists.canonical.com>
626+
627+ GnomeSessionManager: impelement gnome session dbus interface and a fader to blank the screen Fixes: 1291088, 1292041, 1292078, 1292446, 1292451
628+
629+2014-04-10 Marco Trevisan (Treviño) <mail@3v1n0.net>
630+
631+ LockScreen: add ability to show without fading in on some system calls
632+
633+ Also, if locking is not enabled, calling Lock causes the screensaver to be initiated.
634+ Many cleanups and misc fixes. Fixes: 1292575, 1305194
635+
636+2014-04-10 Marco Trevisan (Treviño) <mail@3v1n0.net>
637+
638+ LockScreenController: fire screensaver_post_lock_timeout_ when the view is fully visible
639+
640+2014-04-10 Marco Trevisan (Treviño) <mail@3v1n0.net>
641+
642+ GnomeSessionManager: if it's impossible to lock a session, start the screensaver on lock
643+
644+ This is what most of apps expect, and thus we do that. Although it's not really that coherent.
645+
646+2014-04-10 Marco Trevisan (Treviño) <mail@3v1n0.net>
647+
648+ SessionManager: add ScreenSaver{Activate,Deactivate} and relevant signals and export them
649+
650+ Update LockScreenController and dbus apis to match this
651+
652+2014-04-10 Marco Trevisan (Treviño) <mail@3v1n0.net>
653+
654+ LockScreenController: remove some racy code, avoid to emit multiple signals
655+
656+ And fix pre-lock blank window
657+
658+2014-04-10 Marco Trevisan (Treviño) <mail@3v1n0.net>
659+
660+ LockScreenController: increase the lockscreen timeout wait to be bigger to a frame duration
661+
662+2014-04-10 Marco Trevisan (Treviño) <mail@3v1n0.net>
663+
664+ SessionDBusManager: export PromptLock method on the dbus
665+
666+2014-04-10 Marco Trevisan (Treviño) <mail@3v1n0.net>
667+
668+ BackgroundSettings: don't create new panel style instances, use the actual instance
669+
670+2014-04-10 Marco Trevisan (Treviño) <mail@3v1n0.net>
671+
672+ ScreenSaverDBusManager: get rid of the old active_ bool variable, that caused undefined behavior
673+
674+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
675+
676+ LockScreenController: even more cleanup, move blank window grabbing to own function
677+
678+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
679+
680+ UnityWindow: we need to paint also the decorations of the windows, when in lock-mode
681+
682+ Othewise their texture won't be rebuilt and this will lead to wrong textures.
683+ Also, we don't need to damage the screen when lock opacity changes as it's done by nux.
684+
685+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
686+
687+ LockScreenController: also hide BlankWindow on mouse and keyboard down events
688+
689+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
690+
691+ LockScreenController: show a blank window unless we don't have the lockscreen ready on prompt requests
692+
693+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
694+
695+ SessionDBusManager: add support for "PromptLock"
696+
697+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
698+
699+ GnomeSessionManager: use prompt lockscreen on logind lock requests
700+
701+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
702+
703+ LockScreenController: add support to PromptLockScreen
704+
705+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
706+
707+ SessionManager: add PromptLockScreen method and signal, to require a fast lock (with no fading)
708+
709+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
710+
711+ Merging with lp:~sjakthol/unity/fix-1292154
712+
713+2014-04-06 Sami Jaktholm <sjakthol@outlook.com>
714+
715+ Don't cache the value and watch for changes. Check the setting every time instead.
716+
717+2014-04-06 Sami Jaktholm <sjakthol@outlook.com>
718+
719+ Session: Don't lock the screen if screen locking is disabled by
720+ org.gnome.desktop.lockdown disable-lock-screen.
721+
722+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
723+
724+ Merging with parent
725+
726+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
727+
728+ LockScreenController: make sure whe hide the blank window on unlock
729+
730+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
731+
732+ Merging with lp:~laney/unity/g-s-replace
733+
734+ Remves the ugly killall
735+
736+2014-04-09 Iain Lane <iain@orangesquash.org.uk>
737+
738+ Take over as the owner of the gnome-screensaver interface, if necessary.
739+
740+2014-04-09 Iain Lane <iain@orangesquash.org.uk>
741+
742+ Allow skipping of the tests with DEB_BUILD_OPTIONS=nocheck
743+
744+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
745+
746+ Merging with parent branch
747+
748+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
749+
750+ LockScreenController: add ShowBlankWindow method
751+
752+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
753+
754+ UnityShell: ops, remove wrong change
755+
756+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
757+
758+ Merging with parent branch
759+
760+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
761+
762+ LockScreenController: start the screensaver after few seconds that the user has locked his session, if there's no more interaction
763+
764+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
765+
766+ LockScreenShield: emit a signal when we receive a keyboard input
767+
768+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
769+
770+ LockScreenController: immediately start the screensaver on SetActive dbus call
771+
772+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
773+
774+ ScreenSaverDBusManager: add request_activate signal that is emitted on remote activation request
775+
776+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
777+
778+ LockScreenController: some cleanup, and HideBlankWindow on simulate user activity
779+
780+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
781+
782+ LockScreenController: keep track of dbus_manager and reset screensaver on simulate-user activity
783+
784+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
785+
786+ ScreenSaverDBusManager: implement SimulateUserActivity
787+
788+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
789+
790+ ScreenSaverDBusManager: use a nux property for active state
791+
792+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
793+
794+ LockScreenController: don't animate when locking the screen on suspend or screensaver
795+
796+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
797+
798+ LockScreenController: we can lock the screen if the GS setting is disabled
799+
800+ Also rename the setting to be more understandable
801+
802+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
803+
804+ Merging with parent branch
805+
806+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
807+
808+ LockScreenController: always call LockScreen of SessionManager as it has some checks
809+
810+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
811+
812+ UnityScreen: damage the screen when the lockscreen opacity changes
813+
814+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
815+
816+ LockScreenController: use a ROProperty for opacity
817+
818+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
819+
820+ LockScreenController: only try to lock if locking is enabled
821+
822+2014-04-08 Marco Trevisan (Treviño) <mail@3v1n0.net>
823+
824+ LockScreenController: use timeout seconds for lock delay
825+
826+2014-04-08 Marco Trevisan (Treviño) <mail@3v1n0.net>
827+
828+ LockScreenController: only use one window to blank the screen, it's not needed to have one per monitor
829+
830+2014-04-08 Marco Trevisan (Treviño) <mail@3v1n0.net>
831+
832+ LockScreenController: move OnPresenceStatusChanged into a function
833+
834+2014-04-08 Marco Trevisan (Treviño) <mail@3v1n0.net>
835+
836+ LockScreenController: lock the screen on suspend if ubuntu is configured to do so
837+
838+2014-04-08 Marco Trevisan (Treviño) <mail@3v1n0.net>
839+
840+ Uscreen: emit suspending signal on PrepareForSleep
841+
842+2014-04-08 Marco Trevisan (Treviño) <mail@3v1n0.net>
843+
844+ LockScreenController: use direction to set the animation value
845+
846+2014-04-09 Marco Trevisan (Treviño) <mail@3v1n0.net>
847+
848+ ExternalGschema: add missing external settings
849+
850+2014-04-08 Marco Trevisan (Treviño) <mail@3v1n0.net>
851+
852+ LockScreenSettings: also use legacy lockscreen if screen reader is enabled
853+
854+2014-04-08 Marco Trevisan (Treviño) <mail@3v1n0.net>
855+
856+ ScreenSaverDBusManager: add some comments
857+
858+2014-04-08 Marco Trevisan (Treviño) <mail@3v1n0.net>
859+
860+ ScreenSaverDBusManager: use async calls
861+
862+2014-04-08 Marco Trevisan (Treviño) <mail@3v1n0.net>
863+
864+ LockScreenController: call gnome-screensaver to lock the screen if we use a legacy lockscreen
865+
866+2014-04-08 Marco Trevisan (Treviño) <mail@3v1n0.net>
867+
868+ ScreenSaverDBusManager: start/stop gnome-screensaver if we don't/do handle the locking
869+
870+2014-04-08 Marco Trevisan (Treviño) <mail@3v1n0.net>
871+
872+ LockScreenSettings: add use_fallback option, that is on if OSK is active
873+
874+ This is to workaround on screen keyboard issues
875+
876+2014-04-07 Marco Trevisan (Treviño) <mail@3v1n0.net>
877+
878+ Add GS schemas to external list
879+
880+2014-04-07 Marco Trevisan (Treviño) <mail@3v1n0.net>
881+
882+ GnomeSessionManager: use enum class PresenceStatus instead of magic numbers
883+
884+2014-04-07 Andrea Azzarone <azzaronea@gmail.com>
885+
886+ Merge trunk.
887+
888+2014-04-07 Andrea Azzarone <azzaronea@gmail.com>
889+
890+ Remove magic numbers.
891+
892+2014-04-07 Andrea Azzarone <azzaronea@gmail.com>
893+
894+ Do not implement SimulateUserActivity.
895+
896+2014-04-07 Andrea Azzarone <azzaronea@gmail.com>
897+
898+ Update tests.
899+
900+2014-04-07 Andrea Azzarone <azzaronea@gmail.com>
901+
902+ Start cleaning lockscreen code.
903+
904+2014-04-06 Andrea Azzarone <azzaronea@gmail.com>
905+
906+ Fix. Code style is still WIP.
907+
908+2014-04-04 Andrea Azzarone <azzaronea@gmail.com>
909+
910+ Lock the screen after a delay.
911+
912+2014-04-02 Andrea Azzarone <azzaronea@gmail.com>
913+
914+ Add the first settings.
915+
916+2014-04-02 Andrea Azzarone <azzaronea@gmail.com>
917+
918+ Initial commit to implement g-s dbus interface in unity.
919+
920+2014-04-04 CI bot <ps-jenkins@lists.canonical.com>
921+
922+ Releasing 7.2.0+14.04.20140404-0ubuntu1
923+
924+2014-04-04 Marco Trevisan (Treviño) <mail@3v1n0.net>
925+
926+ ForceQuitDialog: add a new "sheet style" dialog that is shown when a window hangs
927+
928+ Listen to compiz toolkit events and prompt a dialog that allows to force-quit an
929+ hanging application. Fixes: 698031, 1299061, 1299080
930+
931+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
932+
933+ ForceQuitDialog: make sure that the dialog is not deletable by WM
934+
935+ For this to be safe we need also to ignore the delete events
936+
937+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
938+
939+ POTFILES: include DecorationsForceQuitDialog.cpp
940+
941+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
942+
943+ DecoratedWindow: let's do one line things!
944+
945+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
946+
947+ ForceQuitDialog: make sure we hide the dialog before we killed the parent window
948+
949+ It must be hidden before than the parent, in case the window is not really killed,
950+ it will be shown anyway later.
951+
952+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
953+
954+ ForceQuitDialog: avoid warnings on close, due to finalized close button
955+
956+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
957+
958+ DecorationsForceQuitDialog: emit close_request signal on close and "Wait" button
959+
960+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
961+
962+ DecorationsForceQuitDialog: add close_request signal and destroy window when it gets called
963+
964+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
965+
966+ DecoratedWindow: add missing call to UpdateForceQuitDialogPosition
967+
968+ Maybe it was removed due to a shelved change...
969+
970+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
971+
972+ DecorationsForceQuitDialog: implement actual window killing by using both XKillClient and kill -9
973+
974+ Yeah, now
975+
976+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
977+
978+ DecorationsForceQuitDialog: use proper class names (mostly for theming)
979+
980+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
981+
982+ DecorationsForceQuitDialog: use themed button textures
983+
984+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
985+
986+ DecorationsForceQuitDialog: set the dialog pid/hostname to match the ones of the parent window
987+
988+ In this way we don't confuse BAMF about the ownership of the dialog.
989+
990+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
991+
992+ ForceQuitDialog: use the same window class of the real parent window
993+
994+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
995+
996+ ForceQuitDialog: keep the dialog centered on parent window when its geometry changes
997+
998+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
999+
1000+ DecorationsManager.cpp: show a forcequit dialog when we get a toolkitActionForceQuitDialog ClientMessage
1001+
1002+ These events are triggered directly by compiz, so we only have to catch them!
1003+
1004+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
1005+
1006+ DecoratedWindow: add ShowForceQuitDialog method to show a forcequit dialog on given window
1007+
1008+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
1009+
1010+ DecorationsForceQuitDialog: set dialog X time to match the one of the close event
1011+
1012+ In this way we correctly handle the focus-stealing prevention
1013+
1014+2014-04-01 Marco Trevisan (Treviño) <mail@3v1n0.net>
1015+
1016+ ForceQuitDialog: set shape area to ignore input events outside the actual dialog
1017+
1018+2014-04-01 Marco Trevisan (Treviño) <mail@3v1n0.net>
1019+
1020+ DecorationsForceQuitDialog: set parent window as its actual parent X-side, and center on it
1021+
1022+2014-04-01 Marco Trevisan (Treviño) <mail@3v1n0.net>
1023+
1024+ ForceQuitDialog: fix label strings
1025+
1026+2014-03-28 Marco Trevisan (Treviño) <mail@3v1n0.net>
1027+
1028+ Merge with trunk
1029+
1030+2014-03-27 Marco Trevisan (Treviño) <mail@3v1n0.net>
1031+
1032+ DecorationsForceQuitDialog: obey to style for shadows
1033+
1034+2014-03-27 Marco Trevisan (Treviño) <mail@3v1n0.net>
1035+
1036+ DecorationsForceQuitDialog: add first basic gtk implementation of the force-quit dialog
1037+
1038+2014-04-04 Chris Townsend <christopher.townsend@canonical.com>
1039+
1040+ Fix issue where windows that are in Show Desktop mode are selected for spread have a blank preview. This fix will Fade Out the window for Spread and Fade In the window again when Spread exits if that window is not chosen. Fixes: 1104236
1041+
1042+2014-04-04 Chris Townsend <christopher.townsend@canonical.com>
1043+
1044+ Fix issue where windows that are in Show Desktop mode are selected for spread have a blank preview. This fix will Fade Out the window for Spread and Fade In the window again when Spread exits if that window is not chosen.
1045+
1046+2014-04-03 CI bot <ps-jenkins@lists.canonical.com>
1047+
1048+ Releasing 7.2.0+14.04.20140403-0ubuntu1
1049+
1050+2014-04-03 Marco Trevisan (Treviño) <mail@3v1n0.net>
1051+
1052+ DecorationsGrabEdge: Only perform tookit actions on right-click Fixes: 1301459
1053+
1054+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
1055+
1056+ DecorationsGrabEdge: Only perform tookit actions on right-click
1057+
1058+2014-04-03 Marco Trevisan (Treviño) <mail@3v1n0.net>
1059+
1060+ UnityScreen: reset decoration::DataPool on destruction, otherwise we won't have a valid screen ptr Fixes: 1291243
1061+
1062+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
1063+
1064+ UnityScreen: reset decoration::DataPool on destruction, otherwise we won't have screen ptr valid
1065+
1066+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
1067+
1068+ DecorationsDataPool: add static Reset method that allows to reset our textures
1069+
1070+2014-04-03 Marco Trevisan (Treviño) <mail@3v1n0.net>
1071+
1072+ ApplicationLauncherIcon: recompute pips when the screen geometry changes Fixes: 1024101
1073+
1074+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
1075+
1076+ ApplicationLauncherIcon: recompute pips when the screen geometry changes
1077+
1078+2014-04-03 Marco Trevisan (Treviño) <mail@3v1n0.net>
1079+
1080+ Launcher: hide the launcher window when in auto-hide mode if it's not presented Fixes: 1301394
1081+
1082+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
1083+
1084+ Launcher: hide the launcher window when in auto-hide mode if it's not presented
1085+
1086+2014-04-03 Stephen M. Webb <stephen.webb@canonical.com>
1087+
1088+ remove libsyncindicator from services/panel-service.c
1089+
1090+2014-04-02 Stephen M. Webb <stephen.webb@canonical.com>
1091+
1092+ remove libsyncindicator.so (lp: #1300916)
1093+
1094+2014-04-03 Dimitri John Ledkov <dimitri.ledkov@canonical.com>
1095+
1096+ Drop U1 default shortcuts & indicator-sync recommendation. (LP: #1300916) Fixes: 1300916
1097+
1098+2014-04-02 Dimitri John Ledkov <dimitri.ledkov@canonical.com>
1099+
1100+ Drop U1 default shortcuts & indicator-sync recommendation. (LP: #1300916)
1101+
1102+2014-04-02 CI bot <ps-jenkins@lists.canonical.com>
1103+
1104+ Releasing 7.2.0+14.04.20140402-0ubuntu1
1105+
1106+2014-04-02 Stephen M. Webb <stephen.webb@canonical.com>
1107+
1108+ bump to release 7.2.0
1109+
1110+2014-04-01 Stephen M. Webb <stephen.webb@canonical.com>
1111+
1112+ debian/control: fix some style warnings in package description
1113+
1114+2014-04-01 Stephen M. Webb <stephen.webb@canonical.com>
1115+
1116+ debian/changelog: fix syntax to silence a lintian warning
1117+
1118+2014-04-01 Stephen M. Webb <stephen.webb@canonical.com>
1119+
1120+ debian/control(Standards-Version): bump to 3.9.5 (no changes)
1121+
1122+2014-03-31 Stephen M. Webb <stephen.webb@canonical.com>
1123+
1124+ release 7.2.0
1125+
1126+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
1127+
1128+ SpreadFilter: use launcher width, scale on HiDPI, match also application names
1129+
1130+ Launcher Width is now considered in setting the offset of the scale filter (fixes
1131+ padding when launcher is in autohide mode).
1132+ The search bar is correctly scaled when in HiDPI mode.
1133+ We use ApplicationManager and thus BAMF to match windows by their name or app name. Fixes: 1281297, 1282001, 1300763, 1300842
1134+
1135+2014-04-01 Marco Trevisan (Treviño) <mail@3v1n0.net>
1136+
1137+ SpreadFilter: use casefold instead that tolower as it's meant for equalty checks as we do here
1138+
1139+2014-04-01 Marco Trevisan (Treviño) <mail@3v1n0.net>
1140+
1141+ SpreadFilter: implement our own to_lower_copy that works with utf8
1142+
1143+2014-04-01 Marco Trevisan (Treviño) <mail@3v1n0.net>
1144+
1145+ UnityScreen: match the scaled windows based on the SpreadFilter matches
1146+
1147+2014-04-01 Marco Trevisan (Treviño) <mail@3v1n0.net>
1148+
1149+ SpreadFilter: compute a list of filtered windows using both window and application name
1150+
1151+2014-04-01 Marco Trevisan (Treviño) <mail@3v1n0.net>
1152+
1153+ SpreadFilter: take in consideration the launcher width when setting the spread offset
1154+
1155+2014-04-01 Marco Trevisan (Treviño) <mail@3v1n0.net>
1156+
1157+ SpreadFilter :Scale the internal searchbar to match DPI settings
1158+
1159+2014-04-01 Marco Trevisan (Treviño) <mail@3v1n0.net>
1160+
1161+ SearchBar: fix crash when trying to update the show filter scale in a filterless-search bar
1162+
1163+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
1164+
1165+ PanelMenuView: use panel style context for painting the panel title Fixes: 1296866
1166+
1167+2014-03-31 Marco Trevisan (Treviño) <mail@3v1n0.net>
1168+
1169+ PanelMenuView: add "panel-title" class to the panel style context when drawing title
1170+
1171+2014-03-31 Marco Trevisan (Treviño) <mail@3v1n0.net>
1172+
1173+ PanelStyle: return a Style context with different widget path in GetStyleContext based on type
1174+
1175+2014-03-31 Marco Trevisan (Treviño) <mail@3v1n0.net>
1176+
1177+ PanelMenuView: use panel style context for painting the panel title
1178+
1179+2014-03-31 Marco Trevisan (Treviño) <mail@3v1n0.net>
1180+
1181+ DecorationStyle: allow to use a different style context in DrawTitle
1182+
1183+ Panel will need to use a different one
1184+
1185+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
1186+
1187+ Panel, Decorations: draw the background under the text glyphs before the text itself Fixes: 723167
1188+
1189+2014-03-31 Marco Trevisan (Treviño) <mail@3v1n0.net>
1190+
1191+ UnitySettings: never allow values minor or equal to 0 as UI scale
1192+
1193+2014-03-31 Marco Trevisan (Treviño) <mail@3v1n0.net>
1194+
1195+ DecorationsMenuEntry: draw background under text glyphs
1196+
1197+2014-03-31 Marco Trevisan (Treviño) <mail@3v1n0.net>
1198+
1199+ DecorationsTitle: draw background under text glyphs
1200+
1201+2014-03-31 Marco Trevisan (Treviño) <mail@3v1n0.net>
1202+
1203+ DecorationStyle: draw text glyphs background on menu items
1204+
1205+2014-03-31 Marco Trevisan (Treviño) <mail@3v1n0.net>
1206+
1207+ PanelMenuView: draw the background under the text glyphs
1208+
1209+2014-03-31 Marco Trevisan (Treviño) <mail@3v1n0.net>
1210+
1211+ DecorationStyle: add support for drawing the text background under the glyphs
1212+
1213+2014-03-31 Marco Trevisan (Treviño) <mail@3v1n0.net>
1214+
1215+ PanelIndicatorEntryView: draw the background under the text glyphs
1216+
1217+2014-04-02 Marco Trevisan (Treviño) <mail@3v1n0.net>
1218+
1219+ CompizUtils: only shadow-decorate alpha windows that have full decorations as well
1220+
1221+ Since alpha windows might have custom shapes, it's safer not to shadow-decorate them
1222+ unless they don't provide, for sure, a full decoration. Fixes: 1281825
1223+
1224+2014-03-29 Marco Trevisan (Treviño) <mail@3v1n0.net>
1225+
1226+ CompizUtils: only shadow-decorate alpha windows that have full decorations as well
1227+
1228+ Since alpha windows might have custom shapes, it's safer not to shadow-decorate them
1229+ unless they don't provide, for sure, a full decoration.
1230+
1231 2014-03-28 CI bot <ps-jenkins@lists.canonical.com>
1232
1233 Releasing 7.1.2+14.04.20140328.1-0ubuntu1
1234
1235=== modified file 'dash/DashController.cpp'
1236--- dash/DashController.cpp 2014-03-21 05:23:42 +0000
1237+++ dash/DashController.cpp 2014-05-13 20:01:30 +0000
1238@@ -66,7 +66,6 @@
1239 , create_window_(create_window)
1240 , monitor_(0)
1241 , visible_(false)
1242- , need_show_(false)
1243 , dbus_server_(dbus::BUS_NAME)
1244 , ensure_timeout_(PRELOAD_TIMEOUT_LENGTH)
1245 , timeline_animator_(90)
1246@@ -262,20 +261,14 @@
1247 HideDash();
1248 }
1249
1250-void Controller::OnScreenUngrabbed()
1251+void Controller::OnExternalShowDash(GVariant* variant)
1252 {
1253- LOG_DEBUG(logger) << "On Screen Ungrabbed called";
1254- if (need_show_)
1255- {
1256- EnsureDash();
1257+ EnsureDash();
1258+
1259+ if (!visible_)
1260 ShowDash();
1261- }
1262-}
1263-
1264-void Controller::OnExternalShowDash(GVariant* variant)
1265-{
1266- EnsureDash();
1267- visible_ ? HideDash() : ShowDash();
1268+ else
1269+ HideDash();
1270 }
1271
1272 void Controller::OnExternalHideDash(GVariant* variant)
1273@@ -283,31 +276,44 @@
1274 HideDash();
1275 }
1276
1277-void Controller::ShowDash()
1278+bool Controller::ShowDash()
1279 {
1280- EnsureDash();
1281+ // Don't want to show at the wrong time
1282+ if (visible_)
1283+ return false;
1284+
1285 WindowManager& wm = WindowManager::Default();
1286- // Don't want to show at the wrong time
1287- if (visible_ || wm.IsExpoActive() || wm.IsScaleActive())
1288- return;
1289+
1290+ if (wm.IsExpoActive())
1291+ wm.TerminateExpo();
1292
1293 // We often need to wait for the mouse/keyboard to be available while a plugin
1294 // is finishing it's animations/cleaning up. In these cases, we patiently wait
1295 // for the screen to be available again before honouring the request.
1296 if (wm.IsScreenGrabbed())
1297 {
1298- screen_ungrabbed_slot_ = wm.screen_ungrabbed.connect(sigc::mem_fun(this, &Controller::OnScreenUngrabbed));
1299- need_show_ = true;
1300- return;
1301+ screen_ungrabbed_slot_ = wm.screen_ungrabbed.connect([this] {
1302+ grab_wait_.reset();
1303+ ShowDash();
1304+ });
1305+
1306+ // Let's wait ungrab event for maximum a couple of seconds...
1307+ grab_wait_.reset(new glib::TimeoutSeconds(2, [this] {
1308+ screen_ungrabbed_slot_->disconnect();
1309+ return false;
1310+ }));
1311+
1312+ return false;
1313 }
1314
1315+ EnsureDash();
1316 monitor_ = GetIdealMonitor();
1317+ screen_ungrabbed_slot_->disconnect();
1318 int launcher_width = unity::Settings::Instance().LauncherWidth(monitor_);
1319 view_->SetMonitorOffset(launcher_width, panel::Style::Instance().PanelHeight(monitor_));
1320 view_->AboutToShow(monitor_);
1321 FocusWindow();
1322
1323- need_show_ = false;
1324 visible_ = true;
1325
1326 StartShowHideTimeline();
1327@@ -316,6 +322,7 @@
1328
1329 GVariant* info = g_variant_new(UBUS_OVERLAY_FORMAT_STRING, "dash", TRUE, monitor_, view_content_geo.width, view_content_geo.height);
1330 ubus_manager_.SendMessage(UBUS_OVERLAY_SHOWN, info);
1331+ return true;
1332 }
1333
1334 void Controller::FocusWindow()
1335@@ -347,8 +354,6 @@
1336 if (!visible_)
1337 return;
1338
1339- screen_ungrabbed_slot_->disconnect();
1340-
1341 EnsureDash();
1342
1343 view_->AboutToHide();
1344@@ -394,7 +399,7 @@
1345 view_->OnActivateRequest(variant);
1346 }
1347
1348-gboolean Controller::CheckShortcutActivation(const char* key_string)
1349+bool Controller::CheckShortcutActivation(const char* key_string)
1350 {
1351 if (!key_string)
1352 return false;
1353
1354=== modified file 'dash/DashController.h'
1355--- dash/DashController.h 2014-03-21 05:23:42 +0000
1356+++ dash/DashController.h 2014-05-13 20:01:30 +0000
1357@@ -51,7 +51,7 @@
1358
1359 nux::BaseWindow* window() const;
1360
1361- gboolean CheckShortcutActivation(const char* key_string);
1362+ bool CheckShortcutActivation(const char* key_string);
1363 std::vector<char> GetAllShortcuts();
1364
1365 nux::Property<bool> use_primary;
1366@@ -60,7 +60,7 @@
1367
1368 void HideDash();
1369 void QuicklyHideDash();
1370- void ShowDash();
1371+ bool ShowDash();
1372
1373 void ReFocusKeyInput();
1374
1375@@ -86,7 +86,6 @@
1376 void Relayout(bool check_monitor =false);
1377
1378 void OnMouseDownOutsideWindow(int x, int y, unsigned long bflags, unsigned long kflags);
1379- void OnScreenUngrabbed();
1380 void OnExternalShowDash(GVariant* variant);
1381 void OnExternalHideDash(GVariant* variant);
1382 void OnActivateRequest(GVariant* variant);
1383@@ -103,14 +102,13 @@
1384 nux::ObjectPtr<ResizingBaseWindow> window_;
1385 nux::ObjectPtr<DashView> view_;
1386 int monitor_;
1387-
1388 bool visible_;
1389- bool need_show_;
1390
1391 connection::Wrapper screen_ungrabbed_slot_;
1392 connection::Wrapper form_factor_changed_;
1393 glib::DBusServer dbus_server_;
1394 glib::TimeoutSeconds ensure_timeout_;
1395+ glib::Source::UniquePtr grab_wait_;
1396 nux::animation::AnimateValue<double> timeline_animator_;
1397 UBusManager ubus_manager_;
1398 };
1399
1400=== modified file 'dash/DashView.cpp'
1401--- dash/DashView.cpp 2014-03-21 23:08:47 +0000
1402+++ dash/DashView.cpp 2014-05-13 20:01:30 +0000
1403@@ -1457,8 +1457,8 @@
1404 {
1405 for (Scope::Ptr scope: scopes_->GetScopes())
1406 {
1407- std::string shortcut = scope->shortcut;
1408- if(shortcut.size() > 0)
1409+ std::string const& shortcut = scope->shortcut;
1410+ if (!shortcut.empty())
1411 result.push_back(shortcut.at(0));
1412 }
1413 }
1414
1415=== modified file 'dash/ResultRendererTile.cpp'
1416--- dash/ResultRendererTile.cpp 2014-03-20 05:05:21 +0000
1417+++ dash/ResultRendererTile.cpp 2014-05-13 20:01:30 +0000
1418@@ -424,7 +424,7 @@
1419 bool IsBlacklistedChar(gunichar uni_c)
1420 {
1421 if ((uni_c >= 0x1000 && uni_c <= 0x109F) ||
1422- (uni_c >= 0xAA60 && uni_c >= 0xAA7B))
1423+ (uni_c >= 0xAA60 && uni_c <= 0xAA7B))
1424 {
1425 return true;
1426 }
1427
1428=== modified file 'debian/changelog'
1429--- debian/changelog 2014-05-02 14:46:24 +0000
1430+++ debian/changelog 2014-05-13 20:01:30 +0000
1431@@ -1,3 +1,44 @@
1432+unity (7.2.1-0ubuntu1) UNRELEASED; urgency=medium
1433+
1434+ [ Brandon Schaefer ]
1435+ * Set the max width, so our static text wraps. So we don't end up
1436+ rendering text out of the view area. (LP: #1312749)
1437+
1438+ [ Jnkyu Yi ]
1439+ * fixed range of blacklisted Unicode characters (lp: #1251193)
1440+
1441+ [ Marco Trevisan (Treviño) ]
1442+ * UnityScreen: toggle activation of all the unity compiz actions when
1443+ locking the screen Also, make sure that the lockscreen views are
1444+ treated as "always-on-front" windows by nux (and this applies to
1445+ both visibility and events).
1446+ * PanelService: emit an invalid EntryActivated signal if the menu
1447+ hasn't actually been shown In addition, if the menu is not visible
1448+ after the first popup call, try to show a menu without keyboard
1449+ focus. This will make possible to see menus also when there's a key-
1450+ grab (although they will be without keyboard support). Finally,
1451+ reset the menu state, if that failed.
1452+ * UnityScreen: always paint the lockscreen above, just add menu and
1453+ onboard as exceptions Some code cleanup, factorizing similar code.
1454+ (LP: #1313280)
1455+ * PluginAdapter: make sure we don't try to call an invalid
1456+ initiate/terminate callback function (LP: #1221673)
1457+ * DebugDBusInterface: match properties if they are in the AP array
1458+ form [<type>, <value>] (LP: #1307748)
1459+
1460+ [ Stephen M. Webb ]
1461+ * lockscreen/LockScreenAccelerators.h: added required header for
1462+ std:vector definition (fixes FTBFS in Ubuntu)
1463+ * disabled precompiled headers on arm64 Ubuntu package builds
1464+ (lp: #1317276)
1465+ * bump upstream release to 7.2.1
1466+
1467+ [ William Hua ]
1468+ * added proper support for modifier-only shortcuts on the lock screen
1469+ (lp: #1291461)
1470+
1471+ -- Stephen M. Webb <stephen.webb@bregmasoft.ca> Tue, 13 May 2014 13:15:21 -0400
1472+
1473 unity (7.2.0+14.04.20140423-0ubuntu1.2) trusty-security; urgency=medium
1474
1475 * SECURITY UPDATE: more lock screen bypass issues, and regression with
1476
1477=== modified file 'debian/rules'
1478--- debian/rules 2014-04-09 12:38:25 +0000
1479+++ debian/rules 2014-05-13 20:01:30 +0000
1480@@ -23,13 +23,17 @@
1481
1482 SCOPES_RECOMMENDS := $(shell perl debian/scopes-recommends-generator /usr/share/unity/client-scopes.json)
1483
1484+cmake_base_options := -DUSE_GSETTINGS=TRUE -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_PACKAGING_ENABLED=TRUE -DCOMPIZ_PLUGIN_INSTALL_TYPE=package
1485+ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
1486+ cmake_gl_options := -DBUILD_GLES=TRUE -DDISABLE_MAINTAINER_CFLAGS=ON
1487+endif
1488+ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), arm64))
1489+ cmake_pch_options := -Duse_pch=OFF
1490+endif
1491+
1492
1493 override_dh_auto_configure:
1494-ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(gles2_architectures)))
1495- dh_auto_configure -- -DUSE_GSETTINGS=TRUE -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_PACKAGING_ENABLED=TRUE -DCOMPIZ_PLUGIN_INSTALL_TYPE=package -DBUILD_GLES=TRUE -DDISABLE_MAINTAINER_CFLAGS=ON
1496-else
1497- dh_auto_configure -- -DUSE_GSETTINGS=TRUE -DCOMPIZ_BUILD_WITH_RPATH=FALSE -DCOMPIZ_PACKAGING_ENABLED=TRUE -DCOMPIZ_PLUGIN_INSTALL_TYPE=package
1498-endif
1499+ dh_auto_configure -- $(cmake_base_options) $(cmake_gl_options) $(cmake_pch_options)
1500
1501 override_dh_install:
1502 # install autopilot tests
1503
1504=== modified file 'launcher/LauncherController.cpp'
1505--- launcher/LauncherController.cpp 2014-03-20 00:11:08 +0000
1506+++ launcher/LauncherController.cpp 2014-05-13 20:01:30 +0000
1507@@ -1199,18 +1199,6 @@
1508 void Controller::HandleLauncherKeyRelease(bool was_tap, int when)
1509 {
1510 int tap_duration = when - pimpl->launcher_key_press_time_;
1511- WindowManager& wm = WindowManager::Default();
1512-
1513- if (tap_duration < options()->super_tap_duration && was_tap &&
1514- !wm.IsTopWindowFullscreenOnMonitorWithMouse())
1515- {
1516- LOG_DEBUG(logger) << "Quick tap, sending activation request.";
1517- pimpl->SendHomeActivationRequest();
1518- }
1519- else
1520- {
1521- LOG_DEBUG(logger) << "Tap too long: " << tap_duration;
1522- }
1523
1524 pimpl->sources_.Remove(local::LABELS_TIMEOUT);
1525 pimpl->sources_.Remove(local::KEYPRESS_TIMEOUT);
1526
1527=== modified file 'lockscreen/CMakeLists.txt'
1528--- lockscreen/CMakeLists.txt 2014-04-02 13:40:28 +0000
1529+++ lockscreen/CMakeLists.txt 2014-05-13 20:01:30 +0000
1530@@ -24,6 +24,8 @@
1531 LockScreenShield.cpp
1532 LockScreenShieldFactory.cpp
1533 LockScreenPanel.cpp
1534+ LockScreenAcceleratorController.cpp
1535+ LockScreenAccelerators.cpp
1536 ScreenSaverDBusManager.cpp
1537 UserAuthenticatorPam.cpp
1538 UserPromptView.cpp
1539
1540=== modified file 'lockscreen/LockScreenAbstractShield.h'
1541--- lockscreen/LockScreenAbstractShield.h 2014-04-10 17:43:13 +0000
1542+++ lockscreen/LockScreenAbstractShield.h 2014-05-13 20:01:30 +0000
1543@@ -25,6 +25,7 @@
1544 #include <UnityCore/Indicators.h>
1545
1546 #include "unity-shared/MockableBaseWindow.h"
1547+#include "LockScreenAccelerators.h"
1548
1549 namespace unity
1550 {
1551@@ -34,12 +35,13 @@
1552 class AbstractShield : public MockableBaseWindow
1553 {
1554 public:
1555- AbstractShield(session::Manager::Ptr const& session, indicator::Indicators::Ptr const& indicators, int monitor_num, bool is_primary)
1556+ AbstractShield(session::Manager::Ptr const& session, indicator::Indicators::Ptr const& indicators, Accelerators::Ptr const& accelerators, int monitor_num, bool is_primary)
1557 : MockableBaseWindow("Unity Lockscreen")
1558 , primary(is_primary)
1559 , monitor(monitor_num)
1560 , session_manager_(session)
1561 , indicators_(indicators)
1562+ , accelerators_(accelerators)
1563 {}
1564
1565 nux::Property<bool> primary;
1566@@ -48,6 +50,7 @@
1567 using MockableBaseWindow::RemoveLayout;
1568 virtual bool IsIndicatorOpen() const = 0;
1569 virtual void CheckCapsLockPrompt() = 0;
1570+ virtual void ActivatePanel() = 0;
1571
1572 sigc::signal<void, int, int> grab_motion;
1573 sigc::signal<void, unsigned long, unsigned long> grab_key;
1574@@ -55,6 +58,7 @@
1575 protected:
1576 session::Manager::Ptr session_manager_;
1577 indicator::Indicators::Ptr indicators_;
1578+ Accelerators::Ptr accelerators_;
1579 };
1580
1581 } // lockscreen
1582
1583=== added file 'lockscreen/LockScreenAcceleratorController.cpp'
1584--- lockscreen/LockScreenAcceleratorController.cpp 1970-01-01 00:00:00 +0000
1585+++ lockscreen/LockScreenAcceleratorController.cpp 2014-05-13 20:01:30 +0000
1586@@ -0,0 +1,146 @@
1587+// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
1588+/*
1589+ * Copyright (C) 2014 Canonical Ltd
1590+ *
1591+ * This program is free software: you can redistribute it and/or modify
1592+ * it under the terms of the GNU General Public License version 3 as
1593+ * published by the Free Software Foundation.
1594+ *
1595+ * This program is distributed in the hope that it will be useful,
1596+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1597+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1598+ * GNU General Public License for more details.
1599+ *
1600+ * You should have received a copy of the GNU General Public License
1601+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1602+ *
1603+ * Authored by: William Hua <william.hua@canonical.com>
1604+ */
1605+
1606+#include "LockScreenAcceleratorController.h"
1607+
1608+#include <UnityCore/GLibDBusProxy.h>
1609+
1610+namespace unity
1611+{
1612+namespace lockscreen
1613+{
1614+
1615+namespace
1616+{
1617+const char* const MEDIA_KEYS_SCHEMA = "org.gnome.settings-daemon.plugins.media-keys";
1618+const char* const MEDIA_KEYS_KEY_VOLUME_MUTE = "volume-mute";
1619+const char* const MEDIA_KEYS_KEY_VOLUME_DOWN = "volume-down";
1620+const char* const MEDIA_KEYS_KEY_VOLUME_UP = "volume-up";
1621+const char* const INPUT_SWITCH_SCHEMA = "org.gnome.desktop.wm.keybindings";
1622+const char* const INPUT_SWITCH_KEY_PREVIOUS_SOURCE = "switch-input-source-backward";
1623+const char* const INPUT_SWITCH_KEY_NEXT_SOURCE = "switch-input-source";
1624+
1625+const char* const INDICATOR_INTERFACE_ACTIONS = "org.gtk.Actions";
1626+const char* const INDICATOR_METHOD_ACTIVATE = "Activate";
1627+const char* const INDICATOR_SOUND_BUS_NAME = "com.canonical.indicator.sound";
1628+const char* const INDICATOR_SOUND_OBJECT_PATH = "/com/canonical/indicator/sound";
1629+const char* const INDICATOR_SOUND_ACTION_MUTE = "mute";
1630+const char* const INDICATOR_SOUND_ACTION_SCROLL = "scroll";
1631+const char* const INDICATOR_KEYBOARD_BUS_NAME = "com.canonical.indicator.keyboard";
1632+const char* const INDICATOR_KEYBOARD_OBJECT_PATH = "/com/canonical/indicator/keyboard";
1633+const char* const INDICATOR_KEYBOARD_ACTION_SCROLL = "locked_scroll";
1634+
1635+void ActivateIndicator(std::string const& bus_name,
1636+ std::string const& object_path,
1637+ std::string const& action_name,
1638+ glib::Variant const& parameters = glib::Variant())
1639+{
1640+ GVariantBuilder builder;
1641+
1642+ g_variant_builder_init(&builder, G_VARIANT_TYPE("(sava{sv})"));
1643+ g_variant_builder_add(&builder, "s", action_name.c_str());
1644+
1645+ if (parameters)
1646+ g_variant_builder_add_parsed(&builder, "[%v]", static_cast<GVariant*>(parameters));
1647+ else
1648+ g_variant_builder_add_parsed(&builder, "@av []");
1649+
1650+ g_variant_builder_add_parsed(&builder, "@a{sv} []");
1651+
1652+ auto proxy = std::make_shared<glib::DBusProxy>(bus_name, object_path, INDICATOR_INTERFACE_ACTIONS);
1653+ proxy->CallBegin(INDICATOR_METHOD_ACTIVATE, g_variant_builder_end(&builder), [proxy] (GVariant*, glib::Error const&) {});
1654+}
1655+
1656+void MuteIndicatorSound()
1657+{
1658+ ActivateIndicator(INDICATOR_SOUND_BUS_NAME,
1659+ INDICATOR_SOUND_OBJECT_PATH,
1660+ INDICATOR_SOUND_ACTION_MUTE);
1661+}
1662+
1663+void ScrollIndicatorSound(int offset)
1664+{
1665+ ActivateIndicator(INDICATOR_SOUND_BUS_NAME,
1666+ INDICATOR_SOUND_OBJECT_PATH,
1667+ INDICATOR_SOUND_ACTION_SCROLL,
1668+ g_variant_new_int32(offset));
1669+}
1670+
1671+void ScrollIndicatorKeyboard(int offset)
1672+{
1673+ ActivateIndicator(INDICATOR_KEYBOARD_BUS_NAME,
1674+ INDICATOR_KEYBOARD_OBJECT_PATH,
1675+ INDICATOR_KEYBOARD_ACTION_SCROLL,
1676+ g_variant_new_int32(-offset));
1677+}
1678+} // namespace
1679+
1680+AcceleratorController::AcceleratorController()
1681+ : accelerators_(new Accelerators)
1682+{
1683+ auto settings = glib::Object<GSettings>(g_settings_new(MEDIA_KEYS_SCHEMA));
1684+
1685+ auto accelerator = std::make_shared<Accelerator>(glib::String(g_settings_get_string(settings, MEDIA_KEYS_KEY_VOLUME_MUTE)));
1686+ accelerator->activated.connect(std::function<void ()>(MuteIndicatorSound));
1687+ accelerators_->Add(accelerator);
1688+
1689+ accelerator = std::make_shared<Accelerator>(glib::String(g_settings_get_string(settings, MEDIA_KEYS_KEY_VOLUME_DOWN)));
1690+ accelerator->activated.connect(std::bind(ScrollIndicatorSound, -1));
1691+ accelerators_->Add(accelerator);
1692+
1693+ accelerator = std::make_shared<Accelerator>(glib::String(g_settings_get_string(settings, MEDIA_KEYS_KEY_VOLUME_UP)));
1694+ accelerator->activated.connect(std::bind(ScrollIndicatorSound, +1));
1695+ accelerators_->Add(accelerator);
1696+
1697+ settings = glib::Object<GSettings>(g_settings_new(INPUT_SWITCH_SCHEMA));
1698+
1699+ auto variant = glib::Variant(g_settings_get_value(settings, INPUT_SWITCH_KEY_PREVIOUS_SOURCE), glib::StealRef());
1700+
1701+ if (g_variant_n_children(variant) > 0)
1702+ {
1703+ const gchar* string;
1704+
1705+ g_variant_get_child(variant, 0, "&s", &string);
1706+
1707+ accelerator = std::make_shared<Accelerator>(string);
1708+ accelerator->activated.connect(std::bind(ScrollIndicatorKeyboard, -1));
1709+ accelerators_->Add(accelerator);
1710+ }
1711+
1712+ variant = glib::Variant(g_settings_get_value(settings, INPUT_SWITCH_KEY_NEXT_SOURCE), glib::StealRef());
1713+
1714+ if (g_variant_n_children(variant) > 0)
1715+ {
1716+ const gchar* string;
1717+
1718+ g_variant_get_child(variant, 0, "&s", &string);
1719+
1720+ accelerator = std::make_shared<Accelerator>(string);
1721+ accelerator->activated.connect(std::bind(ScrollIndicatorKeyboard, +1));
1722+ accelerators_->Add(accelerator);
1723+ }
1724+}
1725+
1726+Accelerators::Ptr const& AcceleratorController::GetAccelerators() const
1727+{
1728+ return accelerators_;
1729+}
1730+
1731+} // lockscreen namespace
1732+} // unity namespace
1733
1734=== added file 'lockscreen/LockScreenAcceleratorController.h'
1735--- lockscreen/LockScreenAcceleratorController.h 1970-01-01 00:00:00 +0000
1736+++ lockscreen/LockScreenAcceleratorController.h 2014-05-13 20:01:30 +0000
1737@@ -0,0 +1,46 @@
1738+// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
1739+/*
1740+ * Copyright (C) 2014 Canonical Ltd
1741+ *
1742+ * This program is free software: you can redistribute it and/or modify
1743+ * it under the terms of the GNU General Public License version 3 as
1744+ * published by the Free Software Foundation.
1745+ *
1746+ * This program is distributed in the hope that it will be useful,
1747+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1748+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1749+ * GNU General Public License for more details.
1750+ *
1751+ * You should have received a copy of the GNU General Public License
1752+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1753+ *
1754+ * Authored by: William Hua <william.hua@canonical.com>
1755+ */
1756+
1757+#ifndef UNITY_LOCKSCREEN_ACCELERATOR_CONTROLLER
1758+#define UNITY_LOCKSCREEN_ACCELERATOR_CONTROLLER
1759+
1760+#include "LockScreenAccelerators.h"
1761+
1762+namespace unity
1763+{
1764+namespace lockscreen
1765+{
1766+
1767+class AcceleratorController
1768+{
1769+public:
1770+ typedef std::shared_ptr<AcceleratorController> Ptr;
1771+
1772+ AcceleratorController();
1773+
1774+ Accelerators::Ptr const& GetAccelerators() const;
1775+
1776+private:
1777+ Accelerators::Ptr accelerators_;
1778+};
1779+
1780+} // lockscreen namespace
1781+} // unity namespace
1782+
1783+#endif // UNITY_LOCKSCREEN_ACCELERATOR_CONTROLLER
1784
1785=== added file 'lockscreen/LockScreenAccelerators.cpp'
1786--- lockscreen/LockScreenAccelerators.cpp 1970-01-01 00:00:00 +0000
1787+++ lockscreen/LockScreenAccelerators.cpp 2014-05-13 20:01:30 +0000
1788@@ -0,0 +1,528 @@
1789+// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
1790+/*
1791+ * Copyright (C) 2014 Canonical Ltd
1792+ *
1793+ * This program is free software: you can redistribute it and/or modify
1794+ * it under the terms of the GNU General Public License version 3 as
1795+ * published by the Free Software Foundation.
1796+ *
1797+ * This program is distributed in the hope that it will be useful,
1798+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1799+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1800+ * GNU General Public License for more details.
1801+ *
1802+ * You should have received a copy of the GNU General Public License
1803+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1804+ *
1805+ * Authored by: William Hua <william.hua@canonical.com>
1806+ */
1807+
1808+#include "LockScreenAccelerators.h"
1809+
1810+#include <NuxGraphics/Events.h>
1811+#include <gtk/gtk.h>
1812+
1813+namespace unity
1814+{
1815+namespace lockscreen
1816+{
1817+
1818+enum class PressedState : unsigned int
1819+{
1820+ NothingPressed = 0x00,
1821+ LeftShiftPressed = 0x01,
1822+ LeftControlPressed = 0x02,
1823+ LeftAltPressed = 0x04,
1824+ LeftSuperPressed = 0x08,
1825+ RightShiftPressed = 0x10,
1826+ RightControlPressed = 0x20,
1827+ RightAltPressed = 0x40,
1828+ RightSuperPressed = 0x80
1829+};
1830+
1831+PressedState operator~(PressedState const& first)
1832+{
1833+ return static_cast<PressedState>(~static_cast<unsigned int>(first));
1834+}
1835+
1836+PressedState operator&(PressedState const& first, PressedState const& second)
1837+{
1838+ return static_cast<PressedState>(static_cast<unsigned int>(first) & static_cast<unsigned int>(second));
1839+}
1840+
1841+PressedState operator|(PressedState const& first, PressedState const& second)
1842+{
1843+ return static_cast<PressedState>(static_cast<unsigned int>(first) | static_cast<unsigned int>(second));
1844+}
1845+
1846+PressedState& operator&=(PressedState& first, PressedState const& second)
1847+{
1848+ return first = first & second;
1849+}
1850+
1851+PressedState& operator|=(PressedState& first, PressedState const& second)
1852+{
1853+ return first = first | second;
1854+}
1855+
1856+namespace
1857+{
1858+unsigned int KeysymToModifier(unsigned int keysym)
1859+{
1860+ switch (keysym)
1861+ {
1862+ case GDK_KEY_Shift_L:
1863+ case GDK_KEY_Shift_R:
1864+ return nux::KEY_MODIFIER_SHIFT;
1865+ case GDK_KEY_Control_L:
1866+ case GDK_KEY_Control_R:
1867+ return nux::KEY_MODIFIER_CTRL;
1868+ case GDK_KEY_Meta_L:
1869+ case GDK_KEY_Meta_R:
1870+ case GDK_KEY_Alt_L:
1871+ case GDK_KEY_Alt_R:
1872+ return nux::KEY_MODIFIER_ALT;
1873+ case GDK_KEY_Super_L:
1874+ case GDK_KEY_Super_R:
1875+ return nux::KEY_MODIFIER_SUPER;
1876+ }
1877+
1878+ return 0;
1879+}
1880+
1881+PressedState KeysymToPressedState(unsigned int keysym)
1882+{
1883+ switch (keysym)
1884+ {
1885+ case GDK_KEY_Shift_L:
1886+ return PressedState::LeftShiftPressed;
1887+ case GDK_KEY_Shift_R:
1888+ return PressedState::RightShiftPressed;
1889+ case GDK_KEY_Control_L:
1890+ return PressedState::LeftControlPressed;
1891+ case GDK_KEY_Control_R:
1892+ return PressedState::RightControlPressed;
1893+ case GDK_KEY_Meta_L:
1894+ case GDK_KEY_Alt_L:
1895+ return PressedState::LeftAltPressed;
1896+ case GDK_KEY_Meta_R:
1897+ case GDK_KEY_Alt_R:
1898+ return PressedState::RightAltPressed;
1899+ case GDK_KEY_Super_L:
1900+ return PressedState::LeftSuperPressed;
1901+ case GDK_KEY_Super_R:
1902+ return PressedState::RightSuperPressed;
1903+ }
1904+
1905+ return PressedState::NothingPressed;
1906+}
1907+
1908+unsigned int KeysymToMirrorKeysym(unsigned int keysym)
1909+{
1910+ switch (keysym)
1911+ {
1912+ case GDK_KEY_Shift_L:
1913+ return GDK_KEY_Shift_R;
1914+ case GDK_KEY_Shift_R:
1915+ return GDK_KEY_Shift_L;
1916+ case GDK_KEY_Control_L:
1917+ return GDK_KEY_Control_R;
1918+ case GDK_KEY_Control_R:
1919+ return GDK_KEY_Control_L;
1920+ case GDK_KEY_Meta_L:
1921+ return GDK_KEY_Meta_R;
1922+ case GDK_KEY_Meta_R:
1923+ return GDK_KEY_Meta_L;
1924+ case GDK_KEY_Alt_L:
1925+ return GDK_KEY_Alt_R;
1926+ case GDK_KEY_Alt_R:
1927+ return GDK_KEY_Alt_L;
1928+ case GDK_KEY_Super_L:
1929+ return GDK_KEY_Super_R;
1930+ case GDK_KEY_Super_R:
1931+ return GDK_KEY_Super_L;
1932+ }
1933+
1934+ return 0;
1935+}
1936+} // namespace
1937+
1938+Accelerator::Accelerator(unsigned int keysym,
1939+ unsigned int keycode,
1940+ unsigned int modifiers)
1941+ : keysym_(keysym)
1942+ , keycode_(keycode)
1943+ , modifiers_(modifiers)
1944+ , active_(true)
1945+ , activated_(false)
1946+{
1947+}
1948+
1949+Accelerator::Accelerator(std::string const& string)
1950+ : keysym_(0)
1951+ , keycode_(0)
1952+ , modifiers_(0)
1953+ , active_(true)
1954+ , activated_(false)
1955+{
1956+ guint keysym;
1957+ guint* keycodes;
1958+ GdkModifierType modifiers;
1959+
1960+ gtk_accelerator_parse_with_keycode(string.c_str(), &keysym, &keycodes, &modifiers);
1961+
1962+ /* gtk_accelerator_parse_with_keycode() might fail if the key is not in the
1963+ * default key map. gtk_accelerator_parse() might succeed in this case. */
1964+ if (keysym == 0 && keycodes == NULL && modifiers == 0)
1965+ gtk_accelerator_parse(string.c_str(), &keysym, &modifiers);
1966+
1967+ keysym_ = keysym;
1968+
1969+ if (keycodes != NULL)
1970+ {
1971+ keycode_ = keycodes[0];
1972+ g_free(keycodes);
1973+ }
1974+
1975+ if (modifiers & GDK_SHIFT_MASK)
1976+ modifiers_ |= nux::KEY_MODIFIER_SHIFT;
1977+ if (modifiers & GDK_CONTROL_MASK)
1978+ modifiers_ |= nux::KEY_MODIFIER_CTRL;
1979+ if ((modifiers & GDK_MOD1_MASK) || (modifiers & GDK_META_MASK))
1980+ modifiers_ |= nux::KEY_MODIFIER_ALT;
1981+ if (modifiers & GDK_SUPER_MASK)
1982+ modifiers_ |= nux::KEY_MODIFIER_SUPER;
1983+}
1984+
1985+bool Accelerator::operator==(Accelerator const& accelerator) const
1986+{
1987+ return keysym_ == accelerator.keysym_
1988+ && keycode_ == accelerator.keycode_
1989+ && modifiers_ == accelerator.modifiers_;
1990+}
1991+
1992+bool Accelerator::KeyPressActivate()
1993+{
1994+ activated.emit();
1995+ activated_ = true;
1996+
1997+ return true;
1998+}
1999+
2000+bool Accelerator::KeyReleaseActivate()
2001+{
2002+ activated.emit();
2003+ activated_ = false;
2004+
2005+ return true;
2006+}
2007+
2008+bool Accelerator::HandleKeyPress(unsigned int keysym,
2009+ unsigned int modifiers,
2010+ PressedState pressed_state)
2011+{
2012+ auto is_modifier_only = keysym_ == 0 && keycode_ == 0 && modifiers_ != 0;
2013+ auto is_modifier_keysym = KeysymToModifier(keysym_);
2014+ auto modifier = KeysymToModifier(keysym);
2015+
2016+ if (modifiers == 0)
2017+ {
2018+ /* We're pressing a key when no other key is pressed. We can reset this
2019+ * accelerator back to its original enabled state. */
2020+ active_ = true;
2021+ activated_ = false;
2022+ }
2023+
2024+ if (!active_)
2025+ return false;
2026+
2027+ /* We need to cancel modifier-only accelerators in some cases. For example,
2028+ * we should cancel a Ctrl+Alt accelerator if Ctrl+Alt+T is pressed. */
2029+ if (is_modifier_only || is_modifier_keysym)
2030+ {
2031+ if (!modifier)
2032+ {
2033+ /* We pressed a non-modifier key for a modifier-only accelerator. */
2034+ active_ = false;
2035+ return false;
2036+ }
2037+ else if (keysym != keysym_ && (modifiers_ & modifier) == 0)
2038+ {
2039+ /* We pressed a modifier key that isn't the keysym and isn't one of the
2040+ * modifiers. */
2041+ active_ = false;
2042+ return false;
2043+ }
2044+ }
2045+ else if (!modifier)
2046+ {
2047+ /* We expect a non-modifier key to activate and one was pressed. */
2048+ if (modifiers == modifiers_)
2049+ {
2050+ /* The modifiers match. Check if the keysyms match. */
2051+ if (keysym == keysym_)
2052+ return KeyPressActivate();
2053+ else
2054+ {
2055+ /* Otherwise, check if the keycodes match. Maybe the accelerator
2056+ * specifies a particular key code, or the keyboard layout changed. For
2057+ * example, if the accelerator is Ctrl+A and the user switches from a
2058+ * QWERTY to an AZERTY layout, we should accept Ctrl+Q so the user can
2059+ * cycle through the entire list of keyboard layouts. */
2060+
2061+ GdkKeymapKey* key;
2062+ gint keys;
2063+
2064+ if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), keysym, &key, &keys))
2065+ {
2066+ for (auto i = 0; i < keys; i++)
2067+ {
2068+ if (key[i].keycode == keycode_)
2069+ {
2070+ g_free(key);
2071+
2072+ return KeyPressActivate();
2073+ }
2074+ }
2075+
2076+ g_free(key);
2077+ }
2078+ }
2079+ }
2080+ }
2081+
2082+ return false;
2083+}
2084+
2085+bool Accelerator::HandleKeyRelease(unsigned int keysym,
2086+ unsigned int modifiers,
2087+ PressedState pressed_state)
2088+{
2089+ auto is_modifier_only = keysym_ == 0 && keycode_ == 0 && modifiers_ != 0;
2090+ auto is_modifier_keysym = KeysymToModifier(keysym_);
2091+ auto modifier = KeysymToModifier(keysym);
2092+
2093+ /* Don't activate on key release if we were activated on a key press. */
2094+ if (!active_ || activated_)
2095+ return false;
2096+
2097+ /* Check if the keysyms match. */
2098+ if (keysym == keysym_)
2099+ {
2100+ if (KeysymToModifier(keysym) == 0)
2101+ {
2102+ /* We released a non-modifier key. */
2103+ if (modifiers == modifiers_)
2104+ return KeyReleaseActivate();
2105+ }
2106+ else
2107+ {
2108+ /* We released a modifier key. */
2109+ auto mirror_keysym = KeysymToMirrorKeysym(keysym);
2110+ auto is_mirror_pressed = (pressed_state & KeysymToPressedState(mirror_keysym)) != PressedState::NothingPressed;
2111+
2112+ /* Ctrl+Shift_R is different from Ctrl+Shift+Shift_R, so we must detect
2113+ * if the mirror key was pressed or not. */
2114+ if (is_mirror_pressed)
2115+ {
2116+ /* The mirrored modifier is pressed. */
2117+ if (modifiers == modifiers_)
2118+ return KeyReleaseActivate();
2119+ }
2120+ else
2121+ {
2122+ /* The mirrored modifier wasn't pressed. Compare modifiers without it. */
2123+ if ((modifiers & ~KeysymToModifier(mirror_keysym)) == modifiers_)
2124+ return KeyReleaseActivate();
2125+ }
2126+ }
2127+ }
2128+
2129+ if (is_modifier_only || is_modifier_keysym)
2130+ {
2131+ if (modifier)
2132+ {
2133+ /* We released a modifier key for a modifier-only accelerator. */
2134+
2135+ if (is_modifier_only)
2136+ {
2137+ /* The accelerator has no keysym or keycode. */
2138+
2139+ /* TODO: Normally we would activate here, but compiz is intercepting
2140+ * this case and handling it. This is bad because now we can't do
2141+ * anything here. Otherwise we'll do the same action twice. */
2142+ if (modifiers == modifiers_)
2143+ return false;
2144+ }
2145+ else
2146+ {
2147+ /* The accelerator has a modifier keysym. */
2148+ auto is_keysym_pressed = (pressed_state & KeysymToPressedState(keysym_)) != PressedState::NothingPressed;
2149+
2150+ if (is_keysym_pressed)
2151+ {
2152+ auto mirror_keysym = KeysymToMirrorKeysym(keysym_);
2153+ auto is_mirror_pressed = (pressed_state & KeysymToPressedState(mirror_keysym)) != PressedState::NothingPressed;
2154+
2155+ /* Ctrl+Shift_R is different from Ctrl+Shift+Shift_R, so we must detect
2156+ * if the mirror key was pressed or not. */
2157+ if (is_mirror_pressed)
2158+ {
2159+ /* The mirrored modifier is pressed. */
2160+ if (modifiers == modifiers_)
2161+ return KeyReleaseActivate();
2162+ }
2163+ else
2164+ {
2165+ /* The mirrored modifier wasn't pressed. Compare modifiers without it. */
2166+ if ((modifiers & ~KeysymToModifier(mirror_keysym)) == modifiers_)
2167+ return KeyReleaseActivate();
2168+ }
2169+ }
2170+ }
2171+ }
2172+ }
2173+ else if (keycode_ != 0 && modifiers == modifiers_)
2174+ {
2175+ /* Otherwise, check if the keycodes match. Maybe the accelerator
2176+ * specifies a particular key code, or the keyboard layout changed. For
2177+ * example, if the accelerator is Ctrl+A and the user switches from a
2178+ * QWERTY to an AZERTY layout, we should accept Ctrl+Q so the user can
2179+ * cycle through the entire list of keyboard layouts. */
2180+
2181+ GdkKeymapKey* key;
2182+ gint keys;
2183+
2184+ if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), keysym, &key, &keys))
2185+ {
2186+ for (auto i = 0; i < keys; i++)
2187+ {
2188+ if (key[i].keycode == keycode_)
2189+ {
2190+ g_free(key);
2191+
2192+ return KeyReleaseActivate();
2193+ }
2194+ }
2195+
2196+ g_free(key);
2197+ }
2198+ }
2199+
2200+ return false;
2201+}
2202+
2203+Accelerators::Accelerators()
2204+ : pressed_state_(PressedState::NothingPressed)
2205+{
2206+}
2207+
2208+void Accelerators::Clear()
2209+{
2210+ accelerators_.clear();
2211+}
2212+
2213+void Accelerators::Add(Accelerator::Ptr const& accelerator)
2214+{
2215+ accelerators_.push_back(accelerator);
2216+}
2217+
2218+void Accelerators::Remove(Accelerator::Ptr const& accelerator)
2219+{
2220+ accelerators_.erase(std::remove(accelerators_.begin(), accelerators_.end(), accelerator), accelerators_.end());
2221+}
2222+
2223+bool Accelerators::HandleKeyPress(unsigned int keysym,
2224+ unsigned int modifiers)
2225+{
2226+ modifiers &= nux::KEY_MODIFIER_SHIFT
2227+ | nux::KEY_MODIFIER_CTRL
2228+ | nux::KEY_MODIFIER_ALT
2229+ | nux::KEY_MODIFIER_SUPER;
2230+
2231+ switch (keysym)
2232+ {
2233+ case GDK_KEY_Shift_L:
2234+ pressed_state_ |= PressedState::LeftShiftPressed;
2235+ break;
2236+ case GDK_KEY_Shift_R:
2237+ pressed_state_ |= PressedState::RightShiftPressed;
2238+ break;
2239+ case GDK_KEY_Control_L:
2240+ pressed_state_ |= PressedState::LeftControlPressed;
2241+ break;
2242+ case GDK_KEY_Control_R:
2243+ pressed_state_ |= PressedState::RightControlPressed;
2244+ break;
2245+ case GDK_KEY_Meta_L:
2246+ case GDK_KEY_Alt_L:
2247+ pressed_state_ |= PressedState::LeftAltPressed;
2248+ break;
2249+ case GDK_KEY_Meta_R:
2250+ case GDK_KEY_Alt_R:
2251+ pressed_state_ |= PressedState::RightAltPressed;
2252+ break;
2253+ case GDK_KEY_Super_L:
2254+ pressed_state_ |= PressedState::LeftSuperPressed;
2255+ break;
2256+ case GDK_KEY_Super_R:
2257+ pressed_state_ |= PressedState::RightSuperPressed;
2258+ break;
2259+ }
2260+
2261+ auto handled = false;
2262+
2263+ for (auto& accelerator : accelerators_)
2264+ handled = accelerator->HandleKeyPress(keysym, modifiers, pressed_state_) || handled;
2265+
2266+ return handled;
2267+}
2268+
2269+bool Accelerators::HandleKeyRelease(unsigned int keysym,
2270+ unsigned int modifiers)
2271+{
2272+ modifiers &= nux::KEY_MODIFIER_SHIFT
2273+ | nux::KEY_MODIFIER_CTRL
2274+ | nux::KEY_MODIFIER_ALT
2275+ | nux::KEY_MODIFIER_SUPER;
2276+
2277+ auto handled = false;
2278+
2279+ for (auto& accelerator : accelerators_)
2280+ handled = accelerator->HandleKeyRelease(keysym, modifiers, pressed_state_) || handled;
2281+
2282+ switch (keysym)
2283+ {
2284+ case GDK_KEY_Shift_L:
2285+ pressed_state_ &= ~PressedState::LeftShiftPressed;
2286+ break;
2287+ case GDK_KEY_Shift_R:
2288+ pressed_state_ &= ~PressedState::RightShiftPressed;
2289+ break;
2290+ case GDK_KEY_Control_L:
2291+ pressed_state_ &= ~PressedState::LeftControlPressed;
2292+ break;
2293+ case GDK_KEY_Control_R:
2294+ pressed_state_ &= ~PressedState::RightControlPressed;
2295+ break;
2296+ case GDK_KEY_Meta_L:
2297+ case GDK_KEY_Alt_L:
2298+ pressed_state_ &= ~PressedState::LeftAltPressed;
2299+ break;
2300+ case GDK_KEY_Meta_R:
2301+ case GDK_KEY_Alt_R:
2302+ pressed_state_ &= ~PressedState::RightAltPressed;
2303+ break;
2304+ case GDK_KEY_Super_L:
2305+ pressed_state_ &= ~PressedState::LeftSuperPressed;
2306+ break;
2307+ case GDK_KEY_Super_R:
2308+ pressed_state_ &= ~PressedState::RightSuperPressed;
2309+ break;
2310+ }
2311+
2312+ return handled;
2313+}
2314+
2315+} // lockscreen namespace
2316+} // unity namespace
2317
2318=== added file 'lockscreen/LockScreenAccelerators.h'
2319--- lockscreen/LockScreenAccelerators.h 1970-01-01 00:00:00 +0000
2320+++ lockscreen/LockScreenAccelerators.h 2014-05-13 20:01:30 +0000
2321@@ -0,0 +1,94 @@
2322+// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2323+/*
2324+ * Copyright (C) 2014 Canonical Ltd
2325+ *
2326+ * This program is free software: you can redistribute it and/or modify
2327+ * it under the terms of the GNU General Public License version 3 as
2328+ * published by the Free Software Foundation.
2329+ *
2330+ * This program is distributed in the hope that it will be useful,
2331+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2332+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2333+ * GNU General Public License for more details.
2334+ *
2335+ * You should have received a copy of the GNU General Public License
2336+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2337+ *
2338+ * Authored by: William Hua <william.hua@canonical.com>
2339+ */
2340+
2341+#ifndef UNITY_LOCKSCREEN_ACCELERATORS
2342+#define UNITY_LOCKSCREEN_ACCELERATORS
2343+
2344+#include <memory>
2345+#include <sigc++/signal.h>
2346+#include <vector>
2347+
2348+
2349+namespace unity
2350+{
2351+namespace lockscreen
2352+{
2353+
2354+enum class PressedState : unsigned int;
2355+
2356+class Accelerator
2357+{
2358+public:
2359+ typedef std::shared_ptr<Accelerator> Ptr;
2360+
2361+ Accelerator(unsigned int keysym, unsigned int keycode, unsigned int modifiers);
2362+ explicit Accelerator(std::string const& string);
2363+
2364+ bool operator==(Accelerator const& accelerator) const;
2365+
2366+ sigc::signal<void> activated;
2367+
2368+private:
2369+ bool KeyPressActivate();
2370+ bool KeyReleaseActivate();
2371+
2372+ bool HandleKeyPress(unsigned int keysym,
2373+ unsigned int modifiers,
2374+ PressedState pressed_state);
2375+ bool HandleKeyRelease(unsigned int keysym,
2376+ unsigned int modifiers,
2377+ PressedState pressed_state);
2378+
2379+ unsigned int keysym_;
2380+ unsigned int keycode_;
2381+ unsigned int modifiers_;
2382+
2383+ bool active_;
2384+ bool activated_;
2385+
2386+ friend class Accelerators;
2387+};
2388+
2389+class Accelerators
2390+{
2391+public:
2392+ typedef std::shared_ptr<Accelerators> Ptr;
2393+
2394+ Accelerators();
2395+
2396+ void Clear();
2397+
2398+ void Add(Accelerator::Ptr const& accelerator);
2399+ void Remove(Accelerator::Ptr const& accelerator);
2400+
2401+ bool HandleKeyPress(unsigned int keysym,
2402+ unsigned int modifiers);
2403+ bool HandleKeyRelease(unsigned int keysym,
2404+ unsigned int modifiers);
2405+
2406+private:
2407+ std::vector<Accelerator::Ptr> accelerators_;
2408+
2409+ PressedState pressed_state_;
2410+};
2411+
2412+} // lockscreen namespace
2413+} // unity namespace
2414+
2415+#endif // UNITY_LOCKSCREEN_ACCELERATORS
2416
2417=== modified file 'lockscreen/LockScreenController.cpp'
2418--- lockscreen/LockScreenController.cpp 2014-04-30 15:01:34 +0000
2419+++ lockscreen/LockScreenController.cpp 2014-05-13 20:01:30 +0000
2420@@ -113,6 +113,7 @@
2421 shields_.clear();
2422
2423 upstart_wrapper_->Emit("desktop-unlock");
2424+ accelerator_controller_.reset();
2425 indicators_.reset();
2426 }
2427 else if (!prompt_activation_)
2428@@ -147,6 +148,12 @@
2429 });
2430 }
2431
2432+void Controller::ActivatePanel()
2433+{
2434+ if (primary_shield_.IsValid())
2435+ primary_shield_->ActivatePanel();
2436+}
2437+
2438 void Controller::ResetPostLockScreenSaver()
2439 {
2440 screensaver_post_lock_timeout_.reset();
2441@@ -193,7 +200,7 @@
2442
2443 if (i >= shields_size)
2444 {
2445- shield = shield_factory_->CreateShield(session_manager_, indicators_, i, i == primary);
2446+ shield = shield_factory_->CreateShield(session_manager_, indicators_, accelerator_controller_->GetAccelerators(), i, i == primary);
2447 is_new = true;
2448 }
2449
2450@@ -397,6 +404,12 @@
2451 indicators_ = std::make_shared<indicator::LockScreenDBusIndicators>();
2452 upstart_wrapper_->Emit("desktop-lock");
2453
2454+ accelerator_controller_ = std::make_shared<AcceleratorController>();
2455+ auto activate_key = WindowManager::Default().activate_indicators_key();
2456+ auto accelerator = std::make_shared<Accelerator>(activate_key.second, 0, activate_key.first);
2457+ accelerator->activated.connect(std::bind(std::mem_fn(&Controller::ActivatePanel), this));
2458+ accelerator_controller_->GetAccelerators()->Add(accelerator);
2459+
2460 ShowShields();
2461 }
2462
2463
2464=== modified file 'lockscreen/LockScreenController.h'
2465--- lockscreen/LockScreenController.h 2014-04-30 15:01:34 +0000
2466+++ lockscreen/LockScreenController.h 2014-05-13 20:01:30 +0000
2467@@ -25,6 +25,7 @@
2468 #include <UnityCore/GLibSource.h>
2469
2470 #include "LockScreenShieldFactory.h"
2471+#include "LockScreenAcceleratorController.h"
2472 #include "ScreenSaverDBusManager.h"
2473 #include "unity-shared/BackgroundEffectHelper.h"
2474 #include "unity-shared/UpstartWrapper.h"
2475@@ -60,6 +61,7 @@
2476 void BlankWindowGrabEnable(bool grab);
2477 void SimulateActivity();
2478 void ResetPostLockScreenSaver();
2479+ void ActivatePanel();
2480
2481 void OnLockRequested(bool prompt);
2482 void OnUnlockRequested();
2483@@ -74,6 +76,7 @@
2484 DBusManager::Ptr dbus_manager_;
2485 session::Manager::Ptr session_manager_;
2486 indicator::Indicators::Ptr indicators_;
2487+ AcceleratorController::Ptr accelerator_controller_;
2488 UpstartWrapper::Ptr upstart_wrapper_;
2489 ShieldFactoryInterface::Ptr shield_factory_;
2490
2491@@ -99,4 +102,4 @@
2492 }
2493 }
2494
2495-#endif
2496\ No newline at end of file
2497+#endif
2498
2499=== modified file 'lockscreen/LockScreenPanel.cpp'
2500--- lockscreen/LockScreenPanel.cpp 2014-04-29 21:48:50 +0000
2501+++ lockscreen/LockScreenPanel.cpp 2014-05-13 20:01:30 +0000
2502@@ -21,7 +21,6 @@
2503
2504 #include <boost/algorithm/string/trim.hpp>
2505 #include <Nux/HLayout.h>
2506-#include <UnityCore/Variant.h>
2507
2508 #include "LockScreenSettings.h"
2509 #include "panel/PanelIndicatorsView.h"
2510@@ -39,30 +38,6 @@
2511 namespace
2512 {
2513 const RawPixel PADDING = 5_em;
2514-
2515-const std::string MEDIA_KEYS_SCHEMA = "org.gnome.settings-daemon.plugins.media-keys";
2516-const std::string MEDIA_KEYS_VOLUME_MUTE = "volume-mute";
2517-const std::string MEDIA_KEYS_VOLUME_DOWN = "volume-down";
2518-const std::string MEDIA_KEYS_VOLUME_UP = "volume-up";
2519-const std::string INPUT_SWITCH_SCHEMA = "org.gnome.desktop.wm.keybindings";
2520-const std::string INPUT_SWITCH_PREVIOUS = "switch-input-source-backward";
2521-const std::string INPUT_SWITCH_NEXT = "switch-input-source";
2522-
2523-const std::string INDICATOR_KEYBOARD_BUS_NAME = "com.canonical.indicator.keyboard";
2524-const std::string INDICATOR_KEYBOARD_OBJECT_PATH = "/com/canonical/indicator/keyboard";
2525-const std::string INDICATOR_SOUND_BUS_NAME = "com.canonical.indicator.sound";
2526-const std::string INDICATOR_SOUND_OBJECT_PATH = "/com/canonical/indicator/sound";
2527-const std::string INDICATOR_ACTION_INTERFACE = "org.gtk.Actions";
2528-
2529-const std::string INDICATOR_KEYBOARD_ACTION_SCROLL = "locked_scroll";
2530-const std::string INDICATOR_SOUND_ACTION_SCROLL = "scroll";
2531-const std::string INDICATOR_SOUND_ACTION_MUTE = "mute";
2532-
2533-const unsigned int MODIFIERS = nux::KEY_MODIFIER_SHIFT |
2534- nux::KEY_MODIFIER_CAPS_LOCK |
2535- nux::KEY_MODIFIER_CTRL |
2536- nux::KEY_MODIFIER_ALT |
2537- nux::KEY_MODIFIER_SUPER;
2538 }
2539
2540 using namespace indicator;
2541@@ -74,8 +49,6 @@
2542 , monitor(monitor_)
2543 , indicators_(indicators)
2544 , needs_geo_sync_(true)
2545- , media_key_settings_(g_settings_new(MEDIA_KEYS_SCHEMA.c_str()))
2546- , input_switch_settings_(g_settings_new(INPUT_SWITCH_SCHEMA.c_str()))
2547 {
2548 double scale = unity::Settings::Instance().em(monitor)->DPIScale();
2549 auto* layout = new nux::HLayout();
2550@@ -114,11 +87,6 @@
2551 BuildTexture();
2552 QueueRelayout();
2553 });
2554-
2555- ParseAccelerators();
2556-
2557- key_down.connect(sigc::mem_fun(this, &Panel::OnKeyDown));
2558- key_up.connect(sigc::mem_fun(this, &Panel::OnKeyUp));
2559 }
2560
2561 void Panel::BuildTexture()
2562@@ -180,12 +148,6 @@
2563 indicators_view_->ActivateEntry(entry_id, 0);
2564 }
2565
2566-void Panel::ActivateFirst()
2567-{
2568- if (GetInputEventSensitivity())
2569- indicators_view_->ActivateIfSensitive();
2570-}
2571-
2572 void Panel::OnEntryActivated(std::string const& panel, std::string const& entry_id, nux::Rect const&)
2573 {
2574 if (!GetInputEventSensitivity() || (!panel.empty() && panel != GetPanelName()))
2575@@ -254,210 +216,15 @@
2576 }
2577 }
2578
2579-Panel::Accelerator Panel::ParseAcceleratorString(std::string const& string) const
2580-{
2581- guint gtk_key;
2582- GdkModifierType gtk_modifiers;
2583- gtk_accelerator_parse(string.c_str(), &gtk_key, &gtk_modifiers);
2584-
2585- unsigned int nux_key = gtk_key;
2586- unsigned int nux_modifiers = 0;
2587-
2588- if (gtk_modifiers & GDK_SHIFT_MASK)
2589- nux_modifiers |= nux::KEY_MODIFIER_SHIFT;
2590- if (gtk_modifiers & GDK_LOCK_MASK)
2591- nux_modifiers |= nux::KEY_MODIFIER_CAPS_LOCK;
2592- if (gtk_modifiers & GDK_CONTROL_MASK)
2593- nux_modifiers |= nux::KEY_MODIFIER_CTRL;
2594- if (gtk_modifiers & GDK_MOD1_MASK)
2595- nux_modifiers |= nux::KEY_MODIFIER_ALT;
2596- if (gtk_modifiers & GDK_SUPER_MASK)
2597- nux_modifiers |= nux::KEY_MODIFIER_SUPER;
2598-
2599- return std::make_pair(nux_modifiers, nux_key);
2600-}
2601-
2602-void Panel::ParseAccelerators()
2603-{
2604- activate_indicator_ = WindowManager::Default().activate_indicators_key();
2605- volume_mute_ = ParseAcceleratorString(glib::String(g_settings_get_string(media_key_settings_, MEDIA_KEYS_VOLUME_MUTE.c_str())));
2606- volume_down_ = ParseAcceleratorString(glib::String(g_settings_get_string(media_key_settings_, MEDIA_KEYS_VOLUME_DOWN.c_str())));
2607- volume_up_ = ParseAcceleratorString(glib::String(g_settings_get_string(media_key_settings_, MEDIA_KEYS_VOLUME_UP.c_str())));
2608-
2609- auto variant = glib::Variant(g_settings_get_value(input_switch_settings_, INPUT_SWITCH_PREVIOUS.c_str()), glib::StealRef());
2610-
2611- if (g_variant_n_children(variant) > 0)
2612- {
2613- const gchar *accelerator;
2614- g_variant_get_child(variant, 0, "&s", &accelerator);
2615- previous_source_ = ParseAcceleratorString(accelerator);
2616- }
2617- else
2618- previous_source_ = std::make_pair(0, 0);
2619-
2620- variant = glib::Variant(g_settings_get_value(input_switch_settings_, INPUT_SWITCH_NEXT.c_str()), glib::StealRef());
2621-
2622- if (g_variant_n_children(variant) > 0)
2623- {
2624- const gchar *accelerator;
2625- g_variant_get_child(variant, 0, "&s", &accelerator);
2626- next_source_ = ParseAcceleratorString(accelerator);
2627- }
2628- else
2629- next_source_ = std::make_pair(0, 0);
2630-}
2631-
2632-bool Panel::WillHandleKeyEvent(unsigned int event_type, unsigned long key_sym, unsigned long modifiers)
2633-{
2634- auto is_press = event_type == nux::EVENT_KEY_DOWN;
2635-
2636- /* If we're just pressing a key, and no modifiers are pressed, then
2637- * we can start accepting new actions again. */
2638- if (is_press && (modifiers & MODIFIERS) == 0)
2639- last_action_ = std::make_pair(0, 0);
2640-
2641- return IsMatch(is_press, key_sym, modifiers, activate_indicator_) ||
2642- IsMatch(is_press, key_sym, modifiers, volume_mute_) ||
2643- IsMatch(is_press, key_sym, modifiers, volume_down_) ||
2644- IsMatch(is_press, key_sym, modifiers, volume_up_) ||
2645- IsMatch(is_press, key_sym, modifiers, previous_source_) ||
2646- IsMatch(is_press, key_sym, modifiers, next_source_);
2647-}
2648-
2649 bool Panel::InspectKeyEvent(unsigned int event_type, unsigned int keysym, const char*)
2650 {
2651 return true;
2652 }
2653
2654-bool Panel::IsMatch(bool is_press,
2655- unsigned int key_sym,
2656- unsigned int state,
2657- Accelerator const& accelerator) const
2658-{
2659- /* Do the easy check, just compare key codes and modifiers.
2660- * TODO: Check permutations of modifier-only shortcuts. */
2661- return key_sym == accelerator.second && (state & MODIFIERS) == accelerator.first;
2662-}
2663-
2664-void Panel::OnKeyDown(unsigned long event,
2665- unsigned long key_sym,
2666- unsigned long state,
2667- const char* text,
2668- unsigned short repeat)
2669-{
2670- if (IsMatch(true, key_sym, state, activate_indicator_))
2671- {
2672- ActivateFirst();
2673- last_action_ = activate_indicator_;
2674- }
2675- else if (IsMatch(true, key_sym, state, volume_mute_))
2676- {
2677- ActivateSoundAction(INDICATOR_SOUND_ACTION_MUTE);
2678- last_action_ = volume_mute_;
2679- }
2680- else if (IsMatch(true, key_sym, state, volume_down_))
2681- {
2682- ActivateSoundAction(INDICATOR_SOUND_ACTION_SCROLL, g_variant_new_int32(-1));
2683- last_action_ = volume_down_;
2684- }
2685- else if (IsMatch(true, key_sym, state, volume_up_))
2686- {
2687- ActivateSoundAction(INDICATOR_SOUND_ACTION_SCROLL, g_variant_new_int32(+1));
2688- last_action_ = volume_up_;
2689- }
2690- else if (IsMatch(true, key_sym, state, previous_source_))
2691- {
2692- ActivateKeyboardAction(INDICATOR_KEYBOARD_ACTION_SCROLL, g_variant_new_int32(-1));
2693- last_action_ = previous_source_;
2694- }
2695- else if (IsMatch(true, key_sym, state, next_source_))
2696- {
2697- ActivateKeyboardAction(INDICATOR_KEYBOARD_ACTION_SCROLL, g_variant_new_int32(+1));
2698- last_action_ = next_source_;
2699- }
2700-}
2701-
2702-void Panel::OnKeyUp(unsigned int key_sym,
2703- unsigned long key_code,
2704- unsigned long state)
2705-{
2706- /* We only want to act if we didn't activate the action on key
2707- * down. Once we see the key up, we can start accepting actions
2708- * again. */
2709-
2710- if (IsMatch(false, key_sym, state, activate_indicator_))
2711- {
2712- if (last_action_ != activate_indicator_)
2713- ActivateFirst();
2714-
2715- last_action_ = std::make_pair(0, 0);
2716- }
2717- else if (IsMatch(false, key_sym, state, volume_mute_))
2718- {
2719- if (last_action_ != volume_mute_)
2720- ActivateSoundAction(INDICATOR_SOUND_ACTION_MUTE);
2721-
2722- last_action_ = std::make_pair(0, 0);
2723- }
2724- else if (IsMatch(false, key_sym, state, volume_down_))
2725- {
2726- if (last_action_ != volume_down_)
2727- ActivateSoundAction(INDICATOR_SOUND_ACTION_SCROLL, g_variant_new_int32(-1));
2728-
2729- last_action_ = std::make_pair(0, 0);
2730- }
2731- else if (IsMatch(false, key_sym, state, volume_up_))
2732- {
2733- if (last_action_ != volume_up_)
2734- ActivateSoundAction(INDICATOR_SOUND_ACTION_SCROLL, g_variant_new_int32(+1));
2735-
2736- last_action_ = std::make_pair(0, 0);
2737- }
2738- else if (IsMatch(false, key_sym, state, previous_source_))
2739- {
2740- if (last_action_ != previous_source_)
2741- ActivateKeyboardAction(INDICATOR_KEYBOARD_ACTION_SCROLL, g_variant_new_int32(-1));
2742-
2743- last_action_ = std::make_pair(0, 0);
2744- }
2745- else if (IsMatch(false, key_sym, state, next_source_))
2746- {
2747- if (last_action_ != next_source_)
2748- ActivateKeyboardAction(INDICATOR_KEYBOARD_ACTION_SCROLL, g_variant_new_int32(+1));
2749-
2750- last_action_ = std::make_pair(0, 0);
2751- }
2752-}
2753-
2754-void Panel::ActivateIndicatorAction(std::string const& bus_name,
2755- std::string const& object_path,
2756- std::string const& action,
2757- glib::Variant const& parameter) const
2758-{
2759- GVariantBuilder builder;
2760-
2761- g_variant_builder_init(&builder, G_VARIANT_TYPE("(sava{sv})"));
2762- g_variant_builder_add(&builder, "s", action.c_str());
2763-
2764- if (parameter)
2765- g_variant_builder_add_parsed(&builder, "[%v]", (GVariant*) parameter);
2766- else
2767- g_variant_builder_add_parsed(&builder, "@av []");
2768-
2769- g_variant_builder_add_parsed(&builder, "@a{sv} []");
2770-
2771- auto proxy = std::make_shared<glib::DBusProxy>(bus_name, object_path, INDICATOR_ACTION_INTERFACE, G_BUS_TYPE_SESSION);
2772- proxy->CallBegin("Activate", g_variant_builder_end(&builder), [proxy] (GVariant*, glib::Error const&) {});
2773-}
2774-
2775-void Panel::ActivateKeyboardAction(std::string const& action, glib::Variant const& parameter) const
2776-{
2777- ActivateIndicatorAction(INDICATOR_KEYBOARD_BUS_NAME, INDICATOR_KEYBOARD_OBJECT_PATH, action, parameter);
2778-}
2779-
2780-void Panel::ActivateSoundAction(std::string const& action, glib::Variant const& parameter) const
2781-{
2782- ActivateIndicatorAction(INDICATOR_SOUND_BUS_NAME, INDICATOR_SOUND_OBJECT_PATH, action, parameter);
2783+void Panel::ActivatePanel()
2784+{
2785+ if (GetInputEventSensitivity())
2786+ indicators_view_->ActivateIfSensitive();
2787 }
2788
2789 }
2790
2791=== modified file 'lockscreen/LockScreenPanel.h'
2792--- lockscreen/LockScreenPanel.h 2014-04-10 16:23:49 +0000
2793+++ lockscreen/LockScreenPanel.h 2014-05-13 20:01:30 +0000
2794@@ -22,10 +22,8 @@
2795
2796 #include <Nux/Nux.h>
2797 #include <Nux/View.h>
2798-#include <UnityCore/GLibDBusProxy.h>
2799+#include <UnityCore/Indicators.h>
2800 #include <UnityCore/GLibSource.h>
2801-#include <UnityCore/GLibWrapper.h>
2802-#include <UnityCore/Indicators.h>
2803 #include <UnityCore/SessionManager.h>
2804
2805 namespace unity
2806@@ -46,7 +44,7 @@
2807 nux::Property<bool> active;
2808 nux::Property<int> monitor;
2809
2810- bool WillHandleKeyEvent(unsigned int event_type, unsigned long key_sym, unsigned long modifiers);
2811+ void ActivatePanel();
2812
2813 protected:
2814 void Draw(nux::GraphicsEngine& GfxContext, bool force_draw) override;
2815@@ -71,52 +69,6 @@
2816 bool needs_geo_sync_;
2817 nux::Point tracked_pointer_pos_;
2818 glib::Source::UniquePtr track_menu_pointer_timeout_;
2819-
2820- glib::Object<GSettings> media_key_settings_;
2821- glib::Object<GSettings> input_switch_settings_;
2822-
2823- typedef std::pair<unsigned int, unsigned int> Accelerator;
2824- Accelerator ParseAcceleratorString(std::string const& string) const;
2825-
2826- void ParseAccelerators();
2827-
2828- Accelerator activate_indicator_;
2829- Accelerator volume_mute_;
2830- Accelerator volume_down_;
2831- Accelerator volume_up_;
2832- Accelerator previous_source_;
2833- Accelerator next_source_;
2834-
2835- /* We only want to activate the indicator on key press OR key
2836- * release, never both, so we'll need to keep track of the last
2837- * action that occurred. However, holding the keys down should
2838- * allow multiple activations, for example, when the volume
2839- * down button is held down. */
2840- Accelerator last_action_;
2841-
2842- bool IsMatch(bool is_press,
2843- unsigned int key_sym,
2844- unsigned int modifiers,
2845- Accelerator const& accelerator) const;
2846-
2847- void OnKeyDown(unsigned long event,
2848- unsigned long key_sym,
2849- unsigned long state,
2850- const char* text,
2851- unsigned short repeat);
2852-
2853- void OnKeyUp(unsigned int key_sym,
2854- unsigned long key_code,
2855- unsigned long state);
2856-
2857- /* This is just for telling an indicator to do something. */
2858- void ActivateIndicatorAction(std::string const& bus_name,
2859- std::string const& object_path,
2860- std::string const& action,
2861- glib::Variant const& parameter = glib::Variant()) const;
2862-
2863- void ActivateKeyboardAction(std::string const& action, glib::Variant const& parameter = glib::Variant()) const;
2864- void ActivateSoundAction(std::string const& action, glib::Variant const& parameter = glib::Variant()) const;
2865 };
2866
2867 } // lockscreen namespace
2868
2869=== modified file 'lockscreen/LockScreenShield.cpp'
2870--- lockscreen/LockScreenShield.cpp 2014-04-29 17:47:01 +0000
2871+++ lockscreen/LockScreenShield.cpp 2014-05-13 20:01:30 +0000
2872@@ -36,8 +36,8 @@
2873 namespace lockscreen
2874 {
2875
2876-Shield::Shield(session::Manager::Ptr const& session_manager, indicator::Indicators::Ptr const& indicators, int monitor_num, bool is_primary)
2877- : AbstractShield(session_manager, indicators, monitor_num, is_primary)
2878+Shield::Shield(session::Manager::Ptr const& session_manager, indicator::Indicators::Ptr const& indicators, Accelerators::Ptr const& accelerators, int monitor_num, bool is_primary)
2879+ : AbstractShield(session_manager, indicators, accelerators, monitor_num, is_primary)
2880 , bg_settings_(std::make_shared<BackgroundSettings>())
2881 , prompt_view_(nullptr)
2882 , panel_view_(nullptr)
2883@@ -189,14 +189,25 @@
2884 return prompt_view;
2885 }
2886
2887-nux::Area* Shield::FindKeyFocusArea(unsigned etype, unsigned long key_sym, unsigned long modifiers)
2888+nux::Area* Shield::FindKeyFocusArea(unsigned etype, unsigned long keysym, unsigned long modifiers)
2889 {
2890 if (primary)
2891 {
2892- grab_key.emit(modifiers, key_sym);
2893+ grab_key.emit(modifiers, keysym);
2894
2895- if (panel_view_ && panel_view_->WillHandleKeyEvent(etype, key_sym, modifiers))
2896- return panel_view_;
2897+ if (accelerators_)
2898+ {
2899+ if (etype == nux::EVENT_KEY_DOWN)
2900+ {
2901+ if (accelerators_->HandleKeyPress(keysym, modifiers))
2902+ return panel_view_;
2903+ }
2904+ else if (etype == nux::EVENT_KEY_UP)
2905+ {
2906+ if (accelerators_->HandleKeyRelease(keysym, modifiers))
2907+ return panel_view_;
2908+ }
2909+ }
2910
2911 if (prompt_view_)
2912 {
2913@@ -230,5 +241,11 @@
2914 return panel_view_ ? panel_view_->active() : false;
2915 }
2916
2917+void Shield::ActivatePanel()
2918+{
2919+ if (panel_view_)
2920+ panel_view_->ActivatePanel();
2921+}
2922+
2923 }
2924 }
2925
2926=== modified file 'lockscreen/LockScreenShield.h'
2927--- lockscreen/LockScreenShield.h 2014-04-29 01:12:23 +0000
2928+++ lockscreen/LockScreenShield.h 2014-05-13 20:01:30 +0000
2929@@ -36,10 +36,11 @@
2930 class Shield : public AbstractShield
2931 {
2932 public:
2933- Shield(session::Manager::Ptr const&, indicator::Indicators::Ptr const&, int monitor, bool is_primary);
2934+ Shield(session::Manager::Ptr const&, indicator::Indicators::Ptr const&, Accelerators::Ptr const&, int monitor, bool is_primary);
2935
2936 bool IsIndicatorOpen() const override;
2937 void CheckCapsLockPrompt() override;
2938+ void ActivatePanel() override;
2939
2940 protected:
2941 bool AcceptKeyNavFocus() override;
2942
2943=== modified file 'lockscreen/LockScreenShieldFactory.cpp'
2944--- lockscreen/LockScreenShieldFactory.cpp 2014-03-07 18:35:10 +0000
2945+++ lockscreen/LockScreenShieldFactory.cpp 2014-05-13 20:01:30 +0000
2946@@ -25,9 +25,9 @@
2947 namespace lockscreen
2948 {
2949
2950-nux::ObjectPtr<AbstractShield> ShieldFactory::CreateShield(session::Manager::Ptr const& session_manager, indicator::Indicators::Ptr const& indicators, int monitor, bool is_primary)
2951+nux::ObjectPtr<AbstractShield> ShieldFactory::CreateShield(session::Manager::Ptr const& session_manager, indicator::Indicators::Ptr const& indicators, Accelerators::Ptr const& accelerators, int monitor, bool is_primary)
2952 {
2953- return nux::ObjectPtr<Shield>(new Shield(session_manager, indicators, monitor, is_primary));
2954+ return nux::ObjectPtr<Shield>(new Shield(session_manager, indicators, accelerators, monitor, is_primary));
2955 }
2956
2957 }
2958
2959=== modified file 'lockscreen/LockScreenShieldFactory.h'
2960--- lockscreen/LockScreenShieldFactory.h 2014-03-07 18:35:10 +0000
2961+++ lockscreen/LockScreenShieldFactory.h 2014-05-13 20:01:30 +0000
2962@@ -37,12 +37,12 @@
2963
2964 virtual ~ShieldFactoryInterface() = default;
2965
2966- virtual nux::ObjectPtr<AbstractShield> CreateShield(session::Manager::Ptr const&, indicator::Indicators::Ptr const&, int monitor, bool is_primary) = 0;
2967+ virtual nux::ObjectPtr<AbstractShield> CreateShield(session::Manager::Ptr const&, indicator::Indicators::Ptr const&, Accelerators::Ptr const&, int monitor, bool is_primary) = 0;
2968 };
2969
2970 struct ShieldFactory : ShieldFactoryInterface
2971 {
2972- nux::ObjectPtr<AbstractShield> CreateShield(session::Manager::Ptr const&, indicator::Indicators::Ptr const&, int monitor, bool is_primary) override;
2973+ nux::ObjectPtr<AbstractShield> CreateShield(session::Manager::Ptr const&, indicator::Indicators::Ptr const&, Accelerators::Ptr const&, int monitor, bool is_primary) override;
2974 };
2975
2976 }
2977
2978=== modified file 'lockscreen/UserPromptView.cpp'
2979--- lockscreen/UserPromptView.cpp 2014-04-16 21:34:26 +0000
2980+++ lockscreen/UserPromptView.cpp 2014-05-13 20:01:30 +0000
2981@@ -378,10 +378,12 @@
2982
2983 void UserPromptView::AddMessage(std::string const& message, nux::Color const& color)
2984 {
2985+ nux::Geometry const& geo = GetGeometry();
2986 auto* view = new unity::StaticCairoText("");
2987 view->SetFont(Settings::Instance().font_name());
2988 view->SetTextColor(color);
2989 view->SetText(message);
2990+ view->SetMaximumWidth(geo.width);
2991
2992 msg_layout_->AddView(view);
2993
2994
2995=== modified file 'plugins/unityshell/src/unityshell.cpp'
2996--- plugins/unityshell/src/unityshell.cpp 2014-04-30 04:29:00 +0000
2997+++ plugins/unityshell/src/unityshell.cpp 2014-05-13 20:01:30 +0000
2998@@ -143,6 +143,7 @@
2999 const RawPixel SCALE_PADDING = 40_em;
3000 const RawPixel SCALE_SPACING = 20_em;
3001 const std::string RELAYOUT_TIMEOUT = "relayout-timeout";
3002+const std::string HUD_UNGRAB_WAIT = "hud-ungrab-wait";
3003 const std::string FIRST_RUN_STAMP = "first_run.stamp";
3004 const std::string LOCKED_STAMP = "locked.stamp";
3005 } // namespace local
3006@@ -1703,6 +1704,8 @@
3007 wm.OnScreenGrabbed();
3008 else if (event->xfocus.mode == NotifyUngrab)
3009 wm.OnScreenUngrabbed();
3010+ else if (!screen->grabbed() && event->xfocus.mode == NotifyWhileGrabbed)
3011+ wm.OnScreenGrabbed();
3012
3013 if (_key_nav_mode_requested)
3014 {
3015@@ -2062,6 +2065,7 @@
3016 return false;
3017
3018 bool was_tap = state & CompAction::StateTermTapped;
3019+ bool tap_handled = false;
3020 LOG_DEBUG(logger) << "Super released: " << (was_tap ? "tapped" : "released");
3021 int when = options[7].value().i(); // XEvent time in millisec
3022
3023@@ -2090,6 +2094,24 @@
3024 {
3025 QuicklistManager::Default()->Current()->Hide();
3026 }
3027+
3028+ if (!dash_controller_->IsVisible())
3029+ {
3030+ if (!adapter.IsTopWindowFullscreenOnMonitorWithMouse())
3031+ {
3032+ if (dash_controller_->ShowDash())
3033+ {
3034+ tap_handled = true;
3035+ ubus_manager_.SendMessage(UBUS_PLACE_ENTRY_ACTIVATE_REQUEST,
3036+ g_variant_new("(sus)", "home.scope", dash::GOTO_DASH_URI, ""));
3037+ }
3038+ }
3039+ }
3040+ else
3041+ {
3042+ dash_controller_->HideDash();
3043+ tap_handled = true;
3044+ }
3045 }
3046
3047 super_keypressed_ = false;
3048@@ -2103,7 +2125,7 @@
3049 EnableCancelAction(CancelActionTarget::SHORTCUT_HINT, false);
3050
3051 action->setState (action->state() & (unsigned)~(CompAction::StateTermKey));
3052- return true;
3053+ return (was_tap && tap_handled) || !was_tap;
3054 }
3055
3056 bool UnityScreen::showPanelFirstMenuKeyInitiate(CompAction* action,
3057@@ -2471,32 +2493,45 @@
3058 {
3059 if (switcher_controller_->Visible())
3060 {
3061- LOG_ERROR(logger) << "this should never happen";
3062+ LOG_ERROR(logger) << "Switcher is visible when showing HUD: this should never happen";
3063 return false; // early exit if the switcher is open
3064 }
3065
3066- if (PluginAdapter::Default().IsTopWindowFullscreenOnMonitorWithMouse())
3067- {
3068- return false;
3069- }
3070-
3071 if (hud_controller_->IsVisible())
3072 {
3073- ubus_manager_.SendMessage(UBUS_HUD_CLOSE_REQUEST);
3074+ hud_controller_->HideHud();
3075 }
3076 else
3077 {
3078+ auto& wm = WindowManager::Default();
3079+
3080+ if (wm.IsTopWindowFullscreenOnMonitorWithMouse())
3081+ return false;
3082+
3083+ if (wm.IsScreenGrabbed())
3084+ {
3085+ hud_ungrab_slot_ = wm.screen_ungrabbed.connect([this] { ShowHud(); });
3086+
3087+ // Let's wait ungrab event for maximum a couple of seconds...
3088+ sources_.AddTimeoutSeconds(2, [this] {
3089+ hud_ungrab_slot_->disconnect();
3090+ return false;
3091+ }, local::HUD_UNGRAB_WAIT);
3092+
3093+ return false;
3094+ }
3095+
3096 // Handles closing KeyNav (Alt+F1) if the hud is about to show
3097 if (launcher_controller_->KeyNavIsActive())
3098 launcher_controller_->KeyNavTerminate(false);
3099
3100- // If an overlay is open, it must be the dash! Close it!
3101- if (launcher_controller_->IsOverlayOpen())
3102+ if (dash_controller_->IsVisible())
3103 dash_controller_->HideDash();
3104
3105 if (QuicklistManager::Default()->Current())
3106 QuicklistManager::Default()->Current()->Hide();
3107
3108+ hud_ungrab_slot_->disconnect();
3109 hud_controller_->ShowHud();
3110 }
3111
3112
3113=== modified file 'plugins/unityshell/src/unityshell.h'
3114--- plugins/unityshell/src/unityshell.h 2014-04-29 00:22:03 +0000
3115+++ plugins/unityshell/src/unityshell.h 2014-05-13 20:01:30 +0000
3116@@ -421,6 +421,7 @@
3117
3118 UBusManager ubus_manager_;
3119 glib::SourceManager sources_;
3120+ connection::Wrapper hud_ungrab_slot_;
3121
3122 CompRegion buffered_compiz_damage_this_frame_;
3123 CompRegion buffered_compiz_damage_last_frame_;
3124
3125=== modified file 'tests/data/external.gschema.xml'
3126--- tests/data/external.gschema.xml 2014-04-08 22:45:07 +0000
3127+++ tests/data/external.gschema.xml 2014-05-13 20:01:30 +0000
3128@@ -121,4 +121,25 @@
3129 <default>false</default>
3130 </key>
3131 </schema>
3132+
3133+ <schema id="org.gnome.settings-daemon.plugins.media-keys" path="/org/gnome/settings-daemon/plugins/media-keys/">
3134+ <key type="s" name="volume-mute">
3135+ <default>'XF86AudioMute'</default>
3136+ </key>
3137+ <key type="s" name="volume-down">
3138+ <default>'XF86AudioLowerVolume'</default>
3139+ </key>
3140+ <key type="s" name="volume-up">
3141+ <default>'XF86AudioRaiseVolume'</default>
3142+ </key>
3143+ </schema>
3144+
3145+ <schema id="org.gnome.desktop.wm.keybindings" path="/org/gnome/desktop/wm/keybindings/">
3146+ <key type="as" name="switch-input-source-backward">
3147+ <default>["&lt;Shift&gt;&lt;Super&gt;space"]</default>
3148+ </key>
3149+ <key type="as" name="switch-input-source">
3150+ <default>["&lt;Super&gt;space"]</default>
3151+ </key>
3152+ </schema>
3153 </schemalist>
3154
3155=== modified file 'tests/test_lockscreen_controller.cpp'
3156--- tests/test_lockscreen_controller.cpp 2014-04-11 07:26:11 +0000
3157+++ tests/test_lockscreen_controller.cpp 2014-05-13 20:01:30 +0000
3158@@ -52,16 +52,17 @@
3159 struct MockShield : AbstractShield
3160 {
3161 MockShield()
3162- : AbstractShield(nullptr, nullptr, 0, false)
3163+ : AbstractShield(nullptr, nullptr, nullptr, 0, false)
3164 {}
3165
3166 MOCK_CONST_METHOD0(IsIndicatorOpen, bool());
3167 MOCK_METHOD0(CheckCapsLockPrompt, void());
3168+ MOCK_METHOD0(ActivatePanel, void());
3169 };
3170
3171 struct ShieldFactoryMock : ShieldFactoryInterface
3172 {
3173- nux::ObjectPtr<AbstractShield> CreateShield(session::Manager::Ptr const&, indicator::Indicators::Ptr const&, int, bool) override
3174+ nux::ObjectPtr<AbstractShield> CreateShield(session::Manager::Ptr const&, indicator::Indicators::Ptr const&, Accelerators::Ptr const&, int, bool) override
3175 {
3176 return nux::ObjectPtr<AbstractShield>(new MockShield());
3177 }
3178
3179=== modified file 'unity-shared/DebugDBusInterface.cpp'
3180--- unity-shared/DebugDBusInterface.cpp 2014-01-15 16:04:41 +0000
3181+++ unity-shared/DebugDBusInterface.cpp 2014-05-13 20:01:30 +0000
3182@@ -84,7 +84,8 @@
3183 {
3184 if (!g_variant_is_of_type(prop_value, G_VARIANT_TYPE_STRING))
3185 {
3186- LOG_WARNING(logger) << "Unable to match '"<< name << "', it's not a string property.";
3187+ LOG_WARNING(logger) << "Unable to match '"<< name << "', '" <<
3188+ prop_value << "' is not a string property.";
3189 return false;
3190 }
3191
3192@@ -102,7 +103,8 @@
3193 {
3194 if (!g_variant_is_of_type(prop_value, G_VARIANT_TYPE_BOOLEAN))
3195 {
3196- LOG_WARNING(logger) << "Unable to match '"<< name << "', it's not a boolean property.";
3197+ LOG_WARNING(logger) << "Unable to match '"<< name << "', '" <<
3198+ prop_value << "' is not a boolean property.";
3199 return false;
3200 }
3201
3202@@ -138,7 +140,8 @@
3203 case G_VARIANT_CLASS_UINT64:
3204 return static_cast<uint64_t>(value) == prop_value.GetUInt64();
3205 default:
3206- LOG_WARNING(logger) << "Unable to match '"<< name << "' against property of unknown integer type.";
3207+ LOG_WARNING(logger) << "Unable to match '"<< name << "', '" <<
3208+ prop_value << "' is not a known integer property.";
3209 };
3210 }
3211
3212@@ -152,7 +155,24 @@
3213
3214 IntrospectionData introspection;
3215 node_->AddProperties(introspection);
3216- return g_variant_lookup_value(glib::Variant(introspection.Get()), name.c_str(), nullptr);
3217+
3218+ glib::Variant value(g_variant_lookup_value(glib::Variant(introspection.Get()), name.c_str(), nullptr), glib::StealRef());
3219+
3220+ if (!value)
3221+ return nullptr;
3222+
3223+ if (!g_variant_is_of_type(value, G_VARIANT_TYPE_ARRAY) || g_variant_n_children(value) != 2)
3224+ {
3225+ LOG_ERROR(logger) << "Property value for '"<< name << "' should be a 2-sized array, got instead '" << value << "'";
3226+ return nullptr;
3227+ }
3228+
3229+ glib::Variant child(g_variant_get_child_value(value, 1), glib::StealRef());
3230+
3231+ if (g_variant_is_of_type(child, G_VARIANT_TYPE_VARIANT))
3232+ return child.GetVariant();
3233+
3234+ return child;
3235 }
3236
3237 std::vector<xpathselect::Node::Ptr> Children() const
3238
3239=== modified file 'unity-shared/PluginAdapter.cpp'
3240--- unity-shared/PluginAdapter.cpp 2014-04-02 21:42:12 +0000
3241+++ unity-shared/PluginAdapter.cpp 2014-05-13 20:01:30 +0000
3242@@ -248,7 +248,8 @@
3243 argument.push_back(arg);
3244
3245 /* Initiate the selected action with the arguments */
3246- action->initiate()(action, state, argument);
3247+ if (CompAction::CallBack const& initiate_cb = primary_action_->initiate())
3248+ initiate_cb(action, 0, argument);
3249 }
3250
3251 void MultiActionList::InitiateAll(CompOption::Vector const& extra_args, int state) const
3252@@ -291,8 +292,11 @@
3253
3254 if (primary_action_)
3255 {
3256- primary_action_->terminate()(primary_action_, CompAction::StateCancel, argument);
3257- return;
3258+ if (CompAction::CallBack const& terminate_cb = primary_action_->terminate())
3259+ {
3260+ terminate_cb(primary_action_, CompAction::StateCancel, argument);
3261+ return;
3262+ }
3263 }
3264
3265 for (auto const& it : actions_)
3266@@ -304,7 +308,8 @@
3267 CompAction::StateTermEdge |
3268 CompAction::StateTermEdgeDnd))
3269 {
3270- action->terminate()(action, 0, argument);
3271+ if (CompAction::CallBack const& terminate_cb = primary_action_->terminate())
3272+ terminate_cb(action, 0, argument);
3273 }
3274 }
3275 }

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: