Merge lp:~vanvugt/unity/fix-742664-trunk into lp:unity
Status: | Merged |
---|---|
Approved by: | Neil J. Patel |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1325 |
Proposed branch: | lp:~vanvugt/unity/fix-742664-trunk |
Merge into: | lp:unity |
Diff against target: |
289 lines (+46/-89) 8 files modified
UnityCore/DBusIndicators.cpp (+0/-7) UnityCore/Indicators.h (+0/-8) plugins/unityshell/src/PanelIndicatorObjectEntryView.cpp (+9/-5) plugins/unityshell/src/PanelView.cpp (+36/-2) plugins/unityshell/src/PanelView.h (+1/-0) services/panel-main.c (+0/-32) services/panel-service.c (+0/-31) services/panel-service.h (+0/-4) |
To merge this branch: | bzr merge lp:~vanvugt/unity/fix-742664-trunk |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Neil J. Patel (community) | Approve | ||
Andrea Azzarone (community) | Needs Fixing | ||
Review via email: mp+69751@code.launchpad.net |
Description of the change
Make panel menus more responsive, less laggy, when scrubbing. Removed logic that used to send pointer motion events over dbus. (LP: #742664)
Currently unity-panel-service receives all pointer motion (scrubbing) events and sends them ALL to unity(compiz) via dbus. unity(compiz) then decides which indicator/menu this is and sends a message back to unity-panel-service telling it which menu to display. Once the menu is visible unity-panel-service sends another message back to unity(compiz) so it can then display the panel menu background. So that's 3 interprocess communication stages for every motion event. Not to mention the fact that it's responding to every single motion event which is known to be bad practice in GUI design.
This proposal reduces the number of interprocess communication stages between pointer movement and the panel repainting from 3 to 0 (but still 1 for the menu to draw). So the end result is that indicators and panel menus feel much more responsive and always draw where the mouse pointer actually is.
Disclaimer: I developed and tested this fix on nattywith unity 3. I have only hand-ported it to unity-4 and made sure it builds in oneiric. So there has been no functional testing on oneiric yet, only natty.
Review: Need Fixing
87 +static
88 +gboolean
89 +track_menu_pointer (gpointer data)
Should be
static gboolean track_menu_ pointer( gpointer data).
91 + PanelView *self = (PanelView*)data;
Please avoid C cast.
93 + gdk_display_ get_pointer (gdk_display_ get_default (), NULL, &x, &y, NULL);
Please no space between the function name and the open parenthesis.
_menu_view- >AllMenusClosed ();
The same applies here.
Please note that I have reviewed only the style roughly.