Pressing ESC Once Quits (despite setting)

*** Please report new bugs here! ***

Moderators: XnTriq, helmut, xnview, Dreamer

metal450
Posts: 136
Joined: Sun Apr 28, 2019 6:01 am

Pressing ESC Once Quits (despite setting)

Post by metal450 »

XnViewMP 0.93.1 64bit on Win10.

With Settings->Interface->Keyboard->Pressing ESC once quits XnViewMP set to "Never," if I double-click a jpg (to open it in the viewer), then press ESC once...it quits.

Note: the bug doesn't exist in "browser mode," where pressing esc won't exit the software - it only happens in "view mode."
User avatar
xnview
Author of XnView
Posts: 43700
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Pressing ESC Once Quits (despite setting)

Post by xnview »

the problem is that ESC close tab, so what should happened? In browser mode, it returns to browser
Pierre.
metal450
Posts: 136
Joined: Sun Apr 28, 2019 6:01 am

Re: Pressing ESC Once Quits (despite setting)

Post by metal450 »

If the option is set to allow ESC to quit, then it makes sense that it would quit;
If the option is set not to allow ESC to quit, it should just do nothing (aka leave the last tab/viewed-image open). This is how the similar option behaves in IrfanView, for instance.
User avatar
xnview
Author of XnView
Posts: 43700
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Pressing ESC Once Quits (despite setting)

Post by xnview »

i've tried to reproduce, but i can't. Do you use Settings>General>Mode when starting - 'Fullscreen - viewer'?
Pierre.
metal450
Posts: 136
Joined: Sun Apr 28, 2019 6:01 am

Re: Pressing ESC Once Quits (despite setting)

Post by metal450 »

Sorry, I don't understand the question - under Tools -> Settings -> General, I don't see any instance of the word "Mode".
cday
XnThusiast
Posts: 4003
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Pressing ESC Once Quits (despite setting)

Post by cday »

xnview wrote: Mon Aug 26, 2019 3:38 pm I've tried to reproduce, but I can't. Do you use Settings>General>Mode when starting - 'Fullscreen - viewer'?
metal450 wrote: Wed Sep 04, 2019 3:53 am Sorry, I don't understand the question - under Tools -> Settings -> General, I don't see any instance of the word "Mode".

I think the setting referred to is:

Tools > Settings > General -- General tab --Startup -- Mode when starting with a file [Normal, Fullscreen - Viewer, Fullscreen - Browser]
metal450
Posts: 136
Joined: Sun Apr 28, 2019 6:01 am

Re: Pressing ESC Once Quits (despite setting)

Post by metal450 »

Oh duh, sorry I don't know how I missed that. I use mode=Normal.
bitz4
Posts: 37
Joined: Sun Apr 18, 2010 5:03 am

Re: Pressing ESC Once Quits (despite setting)

Post by bitz4 »

I'll join the club.

For me, sometimes I have map images to games, and when switching between game and image I mistakenly press Esc, since in games exiting from menus is usually done with Esc... from in-game map to game: Esc. From image map to game: Alt-tab. But some times unintentionally Esc and I will end up closing the image.

I've done a few tests with the options Interface > Tabs > Closing last tab exits XnViewMP (short CLT) and Interface > Keyboard > Pressing Esc once quits XnViewMP (short PEQ). I've set to Never, thinking it would solve the issue. Boy, it did not!

Anyway, the results were inconsistent and the naming of the options confusing, or having conflicting functionality.

For CLT On and PEQ Never, if I have one (or multiple) image tab, Esc will close all image tabs and on the last one it will close the app. That's the unwanted behavior.
However, if the browser tab is open and focused, it will not respond to Esc, as in it will remain open. Any other image beside it will close on Esc but the browser will not, even if it's the last one. No problem closing it with x on tab or CTRL+W.

For CLT On and PEQ Always, it behaves OK, all close, even the browser tab.
I don't get the inconsistency here, why does the image tab respond, while the browser tab does not respond on Never, but on always they both do respond?

When CLT if Off and PEQ Never, browser does not respond to esc, while an image only turns into an empty state. Normally, following consistency, on Esc the browser should close and show the empty state app, following the rule to not close on closing the last tab.

When CLT if Off and PEQ Always, there are two more inconsistencies. An image opened from windows explorer will close on Esc if it's the only one opened, disregarding CLT Off. If double-clicking the image and opening the browser to that path, so having both browser and image in two tabs, closing both will result in blank state. Even when opening a folder in Browser mode without opening an image first, it will result in the empty state, so the app never closes, except when opening only one image. Even when opening an image, opening the browser to that path, opening another image, now three tabs, closing the browser tab by X, only two image tabs remain, the end result would be blank state. So the only time it behave abnormally is then a single image is opened, it will close the app on Esc.


I propose a solution: renaming Pressing Esc once quits XnViewMP to Pressing Esc closes last tab (short PEL) and having it work as named.
This also implies that both images and browser will be treated the same... as tabs.

The options for this should be: No and Yes
No - the last tab, whatever it might be, will not close on Esc, while any other tabs in focus but the last will be closed
Yes - it will close any tabs, even the last one, even if it's the browser

People who want to close on Esc, even the last tab, will have CLT to On/Checked and PEL to Yes.
People who want to not close the last tab on Esc, that's me, CLT to On/Checked and PEL to No.
People who want to close on Esc, but not the app, resulting in blank state, will have CLT on Off/Unchecked and PEL to Yes.
Finally, people who want to not close the last tab on Esc, nor the app when the last tab is closed, will have CLT on Off/Unchecked and PEL to No.

I know there might a conflict with people who use XnViewMP in full screen mode... but for them the solution is simple.
For people who make use of the Full screen startup mode (General > General > Mode when starting with a file > Viewer - full screen), this means tabbed viewing is out of the question so there's only one tab, the last tab, if they want to exit the app when pressing Esc they should use CLT to On and PEL to Yes. When they close the full screen image, they close the the app.

There might be a debate here for this situation but I'm sure this will simplify the intended use and meet all users' variants, not to mention the nonconflicting functionality.
MP 0.90 x64, Win 7 64-bit
User avatar
GeorgD
Posts: 291
Joined: Thu Oct 12, 2006 2:45 pm

Re: Pressing ESC Once Quits (despite setting)

Post by GeorgD »

In the XnView Wiki, you can improve the user guide / documentation / F1-help for XnView (classic/Windows) and for XnViewMP