Merge lp://staging/~davidmhewitt/wingpanel/fix-focus into lp://staging/~wingpanel-devs/wingpanel/trunk
Status: | Merged |
---|---|
Approved by: | Danielle Foré |
Approved revision: | 175 |
Merged at revision: | 176 |
Proposed branch: | lp://staging/~davidmhewitt/wingpanel/fix-focus |
Merge into: | lp://staging/~wingpanel-devs/wingpanel/trunk |
Diff against target: |
40 lines (+1/-11) 2 files modified
src/Services/PopoverManager.vala (+0/-10) src/Widgets/IndicatorEntry.vala (+1/-1) |
To merge this branch: | bzr merge lp://staging/~davidmhewitt/wingpanel/fix-focus |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Danielle Foré | Approve | ||
Review via email: mp+320544@code.staging.launchpad.net |
Commit message
IndicatorEntry.
* Prevent middle click events on indicators from being propagated to anywhere but the indicator itself.
PopoverManager.
* Don't call set_expanded when mousing in/out of wingpanel, only necessary when opening/closing the popover
Description of the change
There were two problems here that prevented a dialog opened by middle-clicking an indicator from getting focus.
The first was that the set_expanded method was called when the mouse moved in and out of the bound of wingpanel. As far as I can tell, this should only be called when a popover is opened as it looks like it expands/contracts the area that the popover should fit into. Calling it when the mouse left wingpanel was causing wingpanel to activate the window that was activated when the mouse entered wingpanel.
Because the middle click happened between these two events, the wrong window was being focused.
The second issue was that middle click events were also being propagated elsewhere instead of just to the indicator, I believe this was causing gala to give focus to the indicator itself rather than the dialog, meaning you had to click once in the dialog to focus it and then again to perform your action.
I've tested this quite comprehensively and haven't noticed any difference in the way anything works, so I think it is safe to merge this code. However, it would be good to know the reasoning for why it was developed this way in the first place.
A branch of the session indicator that spawns a dialog on middle-clicking the indicator can be found here for testing: https:/
Hi, the expand on enter was necessary because of some timing thing inside gtk. Often when a popover expanded right after the window expand, it opened to the top and the popover could not be seen right. Maybe they changed the timing stuff, dunno I have not monitored the development lately.