Merge lp://qastaging/~bitshifternz/unity/fix-for-bug-769781 into lp://qastaging/unity

Proposed by Cameron Hart
Status: Merged
Merged at revision: 1195
Proposed branch: lp://qastaging/~bitshifternz/unity/fix-for-bug-769781
Merge into: lp://qastaging/unity
Diff against target: 44 lines (+6/-7)
1 file modified
src/PluginAdapter.cpp (+6/-7)
To merge this branch: bzr merge lp://qastaging/~bitshifternz/unity/fix-for-bug-769781
Reviewer Review Type Date Requested Status
Sam Spilsbury (community) Approve
Review via email: mp+58893@code.qastaging.launchpad.net

Description of the change

Checks the max size hint on the window before attempting to maximize. Also fixes memory leak.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

> Checks the max size hint on the window before attempting to maximize.

Looks reasonable to me, but I don't hold any weight just now :-)

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Approve, however being pedantic here, line 18 has weird indentation, you might want to fix that :)

Also, just for super-super-correctness, you might want to do the check against the window size minus the decorations geometry. So for that you'd have (screen_width - window->border ().left () - window->border ().right () > size_hints.max_width) ... if that makes any sense.

review: Approve
Revision history for this message
Cameron Hart (bitshifternz) wrote :

Cheers, I don't know what happened with that indentation. I'll fold in your other suggestion.

> Approve, however being pedantic here, line 18 has weird indentation, you might
> want to fix that :)
>
> Also, just for super-super-correctness, you might want to do the check against
> the window size minus the decorations geometry. So for that you'd have
> (screen_width - window->border ().left () - window->border ().right () >
> size_hints.max_width) ... if that makes any sense.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.