hide_on_close hides every closed window

Found a bug in "Everything"? report it here
Post Reply
vsub
Posts: 432
Joined: Sat Nov 12, 2011 11:51 am

hide_on_close hides every closed window

Post by vsub »

And you can restore only one of them

1.Set that option to 1
2.Open few windows and close them all
3.Try to restore the window.

Only the latest will be restored and the rest will stay hidden forever until you exit everything

I am not sure what will be the best solution for this if you want to use that feature
therube
Posts: 4580
Joined: Thu Sep 03, 2009 6:48 pm

Re: hide_on_close hides every closed window

Post by therube »

(Without looking or confirming the bug...)

See what WinLister will do (to restore hidden windows).
vsub
Posts: 432
Joined: Sat Nov 12, 2011 11:51 am

Re: hide_on_close hides every closed window

Post by vsub »

There is no need for that,Process Hacker shows me all of the windows a program have(including hidden windows)and I can restore them but the point is,everything hides every window you try to close if hide_on_close hides is enabled

I tried that program anyway but as I expected,it show all of the hidden windows but was unable to close them

WM_CLOSE or closing the window in any way you can think of will trigger the "hide the window on close"
Attachments
Clipboard-1.jpg
Clipboard-1.jpg (100.29 KiB) Viewed 14026 times
therube
Posts: 4580
Joined: Thu Sep 03, 2009 6:48 pm

Re: hide_on_close hides every closed window

Post by therube »

Process Hacker
Under context-menu, Miscellaneous, Windows.
Thanks. Never knew that.
therube
Posts: 4580
Joined: Thu Sep 03, 2009 6:48 pm

Re: hide_on_close hides every closed window

Post by therube »

So, hide_on_close=1 hides windows when you "close" a window (rather then closing it).
So any "closed" aka hidden windows remain in memory, using memory - until Everything is actually closed (Quit).

So if you open Everything, open 99 more Everything windows, then close those windows 99, all 99 actually hang around (just not seen).
And if one typically never Quit's Everything, that can add up.

On my end, if I open ~100 windows, Everything uses ~1 GB of RAM.
If I "close" 99 of those Windows, still ~1 GB of RAM.

If I then [actually] close those 99, RAM drops down to ~140 MB.



(Everything will open 100 windows in a snap, just hold down Ctrl+N.
I find Winlister much easier to manipulate 99 of them, in bulk.)

When the search window is hidden, Everything will use the same CPU / RAM resources as if there was a search window still open.
viewtopic.php?p=18249#p18249


So it looks like hide_on_close was meant to cover particular situations, like, Not clearing results upon closing window, but by maintaining 98 additional windows, that would seem like an unintended consequence, kind of like a bug ;-).

Now if the intent were to be able to hide & then restore those other 98, then it's working as expected - except for the restore part.
vsub
Posts: 432
Joined: Sat Nov 12, 2011 11:51 am

Re: hide_on_close hides every closed window

Post by vsub »

If you also set "allow_multiple_windows_from_tray" to 1 which creates a new window when you click on the tray icon(this is how I bring Everything),you will make endless amount of windows because every one of them you close it actually becomes hidden not closed

Maybe a solution will be to keep only one window.

For example:
One window is visible and there is no hidden windows,closing the window will hide it

If one window is open but there is a hidden one,clicking on the tray icon(if allow_multiple_windows_from_tray is not enabled)or show search window will bring the hidden one

If there is one window hidden and one window visible,closing the visible will close\kill\destroy(whatever is the right word)the hidden window and make the active window hidden

...or maybe add a menu in the everything window that contains a list of all windows
therube
Posts: 4580
Joined: Thu Sep 03, 2009 6:48 pm

Re: hide_on_close hides every closed window

Post by therube »

void
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

Re: hide_on_close hides every closed window

Post by void »

Thanks for the bug report.
This is an oversight. The hide on close option was added with having only one visible window in mind.
Everything was never "unhiding" a hidden window when creating a new window.

I've fixed the issue in Everything 1.4.1.947.
This fix, when creating a new window, will "unhide" any hidden window before creating a new window.

I've also added an ini option max_hidden_windows, set this to 0 to allow unlimited hidden windows (default), or set this to the maximum number of hidden windows. When closing a window, and this limit is reached, the window will be closed instead of hidden. This might be useful if you only want one hidden window.

To set the maximum hidden windows to 1:
  • In Everything, type in the following search and press ENTER:
    /max_hidden_windows=1
NotNull
Posts: 5167
Joined: Wed May 24, 2017 9:22 pm

Re: hide_on_close hides every closed window

Post by NotNull »

Is there a way to actually close an Everything window - instead of hiding it - when hide_on_close=1 ?
void
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

Re: hide_on_close hides every closed window

Post by void »

Currently, no.

Maybe a window manager is needed here.
The Window manager could list all the Everything search windows.

A window can be activated, hidden, unhidden or closed.

...added to my TODO list.
NotNull
Posts: 5167
Joined: Wed May 24, 2017 9:22 pm

Re: hide_on_close hides every closed window

Post by NotNull »

void wrote: Mon May 04, 2020 12:37 am Maybe a window manager is needed here.
Seems a bit overkill, especially with the max_hidden_windows setting.

Maybe a SHIFT-close to really close the window?
void
Developer
Posts: 15096
Joined: Fri Oct 16, 2009 11:31 pm

Re: hide_on_close hides every closed window

Post by void »

Shift+Close could work, I'll consider adding an option to do this.
Maybe a shift_close_action ini option to either:
  • invert the hide_on_close setting
  • close the window
  • hide the window
  • use the hide_on_close setting
Thanks for the suggestion.
Post Reply