Wireshark-bugs: [Wireshark-bugs] [Bug 8440] capture_if_dlg: Dumpcap not terminated when main win
Date: Tue, 05 Mar 2013 20:42:59 +0000

Comment # 2 on bug 8440 from
(In reply to comment #1)
> Related to bug 1419?

Indirectly in that a fix for that bug would also have handled this case.


I'm still doing the research, but the issue in this case seems to be the
following:


The capture_if dialog window is doing: 

    dlg_window_new("...");  /* transient_for top_level */
    gtk_window_set_destroy_with_parent (GTK_WINDOW(cap_if_w), TRUE);



*However*, dlg_window_new() has:

    /*
     * On Windows, making the dialogs transient to top_level behaves strangely.
     * It is not possible any more to bring the top level window to front
easily.
     * So we don't do this on Windows.
     */
#ifndef _WIN32
    if (top_level) {
        gtk_window_set_transient_for(GTK_WINDOW(win), GTK_WINDOW(top_level));
    }
#endif /*_WIN32*/


So: on Windows the call to 'destroy_with_parent' in this case is effectively a
no-op (since there's no parent);

Thus on Windows, if the main (parent) windows is destroyed, the capture_if_dlg
'destroy' callback (which kills dumpcap) is never called thus leaving dumpcap
active.

I have to dig deeper (looking at the commit for the dsl-winow_new() #ifndef
code and at the associated bug reports & _dev messages) to better understand
all of this.


You are receiving this mail because:
  • You are watching all bug changes.