Merge lp:~mterry/appmenu-gtk/watch-menubar-parents into lp:appmenu-gtk/0.4
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Ted Gould | ||||
Approved revision: | 126 | ||||
Merged at revision: | 126 | ||||
Proposed branch: | lp:~mterry/appmenu-gtk/watch-menubar-parents | ||||
Merge into: | lp:appmenu-gtk/0.4 | ||||
Diff against target: |
161 lines (+61/-47) 1 file modified
src/bridge.c (+61/-47) |
||||
To merge this branch: | bzr merge lp:~mterry/appmenu-gtk/watch-menubar-parents | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ted Gould (community) | Approve | ||
Review via email: mp+52706@code.launchpad.net |
Description of the change
This watches menubars for reparenting, so that if they get swapped in and out, like they do for shotwell, we notice and rebuild.
Some notes:
* I also got rid of a couple of variables (append and after_startup) that weren't used
* I guarded the connect for toplevel_notify_cb so it only gets connected if toplevel isn't a window and only once (not a big deal, since when run, it disconnects all other connected instances, but cleanliness is next to something or other)
* I didn't bother handling the case of a menubar disappearing and not immediately being replaced by another. In this hopefully-rare case, we'd need to be able to find the old window context (so we'd need to save a pointer to the old parented toplevel) and set its root to NULL.