Menu

#197 Using built-in right click "extract here" leaves icons in WindowMaker

v1.0_(example)
closed-fixed
nobody
None
5
2015-01-12
2014-10-26
Micha
No

Debian GNU/Linux "Jessie" x64
WindowMaker 0.95.5
Xfe 1.37

Archiver is default "xarchiver".

Issue:
When using the right-click context menu on an archive and selecting one of the "Extract" options, after pressing the "Close" button on the output window, an icon remains in WindowMaker. One for every time the operation is performed.
All icons are removed when Xfe is closed.

Expected:
Additional archive operation WindowMaker icon closes when output window is closed.

I can't find left-over processes using ps, so this is purely cosmetic. Presumably whatever logic is behind the "Close" button isn't cleaning up all the resources.

Enhancement suggestion:
Add an option to automatically close the output window after the operation completes. And/or have a minimal output window which shows a progress bar instead of listing the extracted files.

Discussion

  • Micha

    Micha - 2014-10-26

    Ok, had a quick look at the source code, and basically it seems that "delete this" is not executed when the Close button is pressed. Perhaps "onWatchProcess()" does not get called anymore after the window is hidden? (I don't know the fox toolkit).

    The following patch fixes (or at least works-around) the issue:

    --- xfe-1.37.orig/src/CommandWindow.cpp
    +++ xfe-1.37/src/CommandWindow.cpp
    @@ -278,7 +278,7 @@ long CommandWindow::onCmdClose(FXObject*
            closed=TRUE;
    
            // If cancel was previously pressed, the object can delete itself
    
    -       if (killed)
    +//     if (killed)
                    delete this;
         return 1;
     }
    

    ... ok, yes, you don't add a new chore if the child has finished. So after "END OF COMMAND" is added to the output buffer, onWatchProcess() will never be called again, so the entire first section of that function ( if(close) ) is superfluous.

    So the bug is not just cosmetic, but leaking a dialog every time a CommandWindow is used.

     

    Last edit: Micha 2014-10-26
  • Micha

    Micha - 2014-10-26

    Also, from http://www.fox-toolkit.org/timers.html:

    Repeatedly resetting the chore callback will mean that your application will
    never yield the CPU, because there will always be a chore ready to execute
    prior to blocking for event input. This practice is therefore not recommended!

    So it might be worthwhile to rethink your CommandWindow implementation to use timers instead?

     
  • Roland Baudin

    Roland Baudin - 2015-01-12
    • status: open --> closed-fixed
     
  • Roland Baudin

    Roland Baudin - 2015-01-12

    This is fixed in Xfe 1.40.
    Thanks for the bug report.
    RB

     

Log in to post a comment.

MongoDB Logo MongoDB