Merge lp:~gue5t/midori/exec-windowclose into lp:midori
Status: | Merged |
---|---|
Approved by: | Cris Dywan |
Approved revision: | 7094 |
Merged at revision: | 7103 |
Proposed branch: | lp:~gue5t/midori/exec-windowclose |
Merge into: | lp:midori |
Diff against target: |
44 lines (+12/-6) 2 files modified
midori/midori-browser.c (+6/-0) midori/midori-frontend.c (+6/-6) |
To merge this branch: | bzr merge lp:~gue5t/midori/exec-windowclose |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Cris Dywan | Approve | ||
Review via email: mp+283730@code.launchpad.net |
Commit message
Fix warnings when starting with --execute WindowClose
Description of the change
Right now, starting Midori with "--execute WindowClose" causes a number of assertion failures (more if run with -p):
$ midori -p -e WindowClose
(midori4:21698): Gdk-CRITICAL **: IA__gdk_event_free: assertion 'event != NULL' failed
** (midori4:21698): CRITICAL **: midori_
** (midori4:21698): CRITICAL **: midori_
** (midori4:21698): CRITICAL **: midori_
(midori4:21698): GLib-GObject-
(midori4:21698): GLib-GObject-
(midori4:21698): GLib-GObject-
(midori4:21698): GLib-GObject-
^C
This fixes the assertion failures, but it does not fix the fact that the Midori process does not exit when started with "--execute WindowClose" *and* -p. After this patch the execute command works perfectly without -p and quietly sits there with -p.
The problem was twofold: we were inadvertently passing a NULL GdkEvent when emitting the delete_event signal, and in private mode we were running commands before enabling "built-in" extensions. This constructs a GdkEvent to fix the former and reorders things to a more sane sequence of events to fix the latter.
That actually makes a lot of sense (although it's a weird use case).