Merge lp:~mterry/indicator-appmenu/ignore-non-window-views into lp:indicator-appmenu/0.3
Proposed by
Michael Terry
Status: | Merged |
---|---|
Merged at revision: | 92 |
Proposed branch: | lp:~mterry/indicator-appmenu/ignore-non-window-views |
Merge into: | lp:indicator-appmenu/0.3 |
Diff against target: |
35 lines (+8/-8) 1 file modified
src/indicator-appmenu.c (+8/-8) |
To merge this branch: | bzr merge lp:~mterry/indicator-appmenu/ignore-non-window-views |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ted Gould (community) | Approve | ||
Review via email: mp+47420@code.launchpad.net |
Description of the change
On view-opened or view-closed signals, the view is not guaranteed to be a window (may be an app). The current code was throwing critical warnings when it encountered an app, so this just sanitizes the input a bit better.
To post a comment you must log in.
review approve
On Tue, 2011-01-25 at 16:44 +0000, Michael Terry wrote: applet- developers) /code.launchpad .net/~mterry/ indicator- appmenu/ ignore- non-window- views/+ merge/47420 appmenu. c' appmenu. c 2011-01-14 04:44:29 +0000 appmenu. c 2011-01-25 16:43:53 +0000 WINDOW( view)) { get_window_ type(window) != BAMF_WINDOW_ DESKTOP) { WINDOW( view)) { get_window_ type(window) != BAMF_WINDOW_ DESKTOP) {
> Michael Terry has proposed merging lp:~mterry/indicator-appmenu/ignore-non-window-views into lp:indicator-appmenu.
>
> Requested reviews:
> Indicator Applet Developers (indicator-
>
> For more details, see:
> https:/
>
> On view-opened or view-closed signals, the view is not guaranteed to be a window (may be an app). The current code was throwing critical warnings when it encountered an app, so this just sanitizes the input a bit better.
> differences between files attachment (review-diff.txt)
> === modified file 'src/indicator-
> --- src/indicator-
> +++ src/indicator-
> @@ -740,11 +740,11 @@
> static void
> new_window (BamfMatcher * matcher, BamfView * view, gpointer user_data)
> {
> + if (view == NULL || !BAMF_IS_
> + return;
> + }
> +
> BamfWindow * window = BAMF_WINDOW(view);
> - if (window == NULL) {
> - return;
> - }
> -
> if (bamf_window_
> return;
> }
> @@ -772,11 +772,11 @@
> static void
> old_window (BamfMatcher * matcher, BamfView * view, gpointer user_data)
> {
> + if (view == NULL || !BAMF_IS_
> + return;
> + }
> +
> BamfWindow * window = BAMF_WINDOW(view);
> - if (window == NULL) {
> - return;
> - }
> -
> if (bamf_window_
> return;
> }
>