Merge lp:~sjakthol/unity/fix-1288789 into lp:unity

Proposed by Sami Jaktholm
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 3783
Proposed branch: lp:~sjakthol/unity/fix-1288789
Merge into: lp:unity
Diff against target: 17 lines (+3/-3)
1 file modified
plugins/unityshell/src/unityshell.cpp (+3/-3)
To merge this branch: bzr merge lp:~sjakthol/unity/fix-1288789
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+215403@code.launchpad.net

Commit message

Scale: Correctly detect the activation of a scale and set scale_just_activated_
to true properly.

Description of the change

If Super+W was pressed and Super was released faster than super_tap_duration, showLauncherKeyTerminate would terminate scale because scale_just_activated_ was never set to true due to timing issue. scale_just_activated_ would've been set to true in handleCompizEvent if PluginAdapter knew scale was active. However the grab event PluginAdapter relies on arrives a little bit later than handleCompizEvent is called for scale activation.

Instead of asking plugin adapter about scale state this branch uses the value provided by the event itself.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Cool, thank you very much!

The fix is fine, and it works very well!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/unityshell/src/unityshell.cpp'
2--- plugins/unityshell/src/unityshell.cpp 2014-04-10 17:43:34 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2014-04-11 13:13:17 +0000
4@@ -1984,10 +1984,10 @@
5 ubus_manager_.SendMessage(UBUS_OVERLAY_CLOSE_REQUEST);
6 }
7
8- if (adapter.IsScaleActive() && g_strcmp0(plugin, "scale") == 0 &&
9- super_keypressed_)
10+ if (super_keypressed_ && g_strcmp0(plugin, "scale") == 0 &&
11+ g_strcmp0(event, "activate") == 0)
12 {
13- scale_just_activated_ = true;
14+ scale_just_activated_ = CompOption::getBoolOptionNamed(option, "active");
15 }
16
17 screen->handleCompizEvent(plugin, event, option);