Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Exit Fullscreen with No Image #141

Closed
Yevrag35 opened this issue Mar 15, 2024 · 2 comments
Closed

Can't Exit Fullscreen with No Image #141

Yevrag35 opened this issue Mar 15, 2024 · 2 comments

Comments

@Yevrag35
Copy link

Describe the bug

When you go fullscreen with no image loaded you are unable to revert the window back to normal. Only way around as I can see is closing the app and reopening.

To Reproduce

Tested in 2.2.3 build as well as the latest dev branch commit, and the issue is present in both. The issue does not occur in version 2.2.2 or earlier.

Steps to reproduce the behavior:

  1. Open the app with no image loaded (i.e. - it just shows the PicView logo in the background).
  2. Enter fullscreen either by:
  • Clicking the fullscreen button at the top menu bar
  • Pressing the default key bound to the fullscreen functionality (default is F11/F12)
  1. You find that pressing the key bindings F11/F12 do not put the window back to normal size and the top menu buttons are gone (though, as I'll explain, they wouldn't help either).

Expected behavior

Pressing the fullscreen key binding again should revert the window back to normal as it does when an image is being displayed.

Additional context

Debugging the code, and in particular, when you get to this line, because GetMainWindows.MainImage.Source is null and gotoFullscreen is false, it enters the Restore_From_Move() method.

It seems like it may be unintentionally going into that method, because after the routine is finished, some pieces of settings think you reverted the window back to normal successfully, when it hasn't.

Not saying that removing this bit is the fix, but...

if (GetMainWindow.MainImage.Source is null && !gotoFullscreen)
{
    Restore_From_Move();
    return;
}

... commenting it out does allow the window to revert back to normal as you would expect. I'm not sure what the reasons for that Restore_From_Move() are, but I think it's going to that method unintentionally.

Ruben2776 added a commit that referenced this issue Mar 15, 2024
@Ruben2776
Copy link
Owner

Hi there, thanks for your bug report!

The initial context for the code you've linked was behavior where it wasn't intended to enter into full-screen when no image was provided.
I've since then fixed the issue, as you've highlighted, and changed it to support starting the program in full-screen, whether it has been started with an image or not.

@Ruben2776
Copy link
Owner

The changes has been added in the 2.2.4 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants