Skip to content

Minimization bug #1871

Closed
Closed

Description

@VaibhavDS19

Synfig version & platform:
(we're more likely to help if you're using latest development builds)
Latest normal build
Issue description:
Minimizing the window and then closing it causes the app to never get maximized. This includes when it takes time to build and if we minimize it, it seems to crash sometimes and then never gets maximized. Opening the app causes it to be minimized. Uninstalling and reinstalling doesn't seem to work.
OS so far used and tried on
Windows
Success rate of triggering this issue
One hundred percent so far.

Activity

  1. rodolforg commented on Nov 25, 2020

    @rodolforg
    Contributor

    Thank you for reporting!
    A possible workaround is to erase (or manually edit) the synfig preferences file (settings-1.4).
    I'm not sure the exact path on windows, but if you're using portable version, the folder is named "config".

  2. VaibhavDS19 commented on Nov 25, 2020

    @VaibhavDS19
    Author

    Thank you for replying so fast. Yes, the workaround seems to work perfectly.

  3. VaibhavDS19 commented on Nov 25, 2020

    @VaibhavDS19
    Author

    Idea of how it might happen?

  4. rodolforg commented on Nov 25, 2020

    @rodolforg
    Contributor

    Synfig saves the window position and size on closing. But it seems that it doesn't check if it was minimized or something like that.

  5. VaibhavDS19 commented on Nov 25, 2020

    @VaibhavDS19
    Author

    ok, thank you very much for replying.

  6. rodolforg commented on Nov 25, 2020

    @rodolforg
    Contributor

    It must be fixed :)

  7. added this to the v1.4.1 milestone on Nov 25, 2020
  8. rodolforg commented on Nov 26, 2020

    @rodolforg
    Contributor

    @ice0 @morevnaproject do we really need to save main window position and size? :P
    Gtk has some explanations against it: https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-get-position (last paragraph of this method)

  9. ice0 commented on Nov 27, 2020

    @ice0
    Collaborator

    @rodolforg I think yes. At least we need window size to correctly restore workspace.
    Also it just convenient. No need to move the window to your preferred location every time.

    As I see this is Windows-related problem. When you minimize window it just moves it to -30000, -30000 position.

  10. rodolforg commented on Nov 28, 2020

    @rodolforg
    Contributor

    Is size kept "correctly" (same value before being minimized)?

    If I'm not crazy I saw other reports about 'invisible' Synfig when user has two screens then open it later with only one.

  11. rodolforg commented on Nov 28, 2020

    @rodolforg
    Contributor

    Anyway, here is the code point to work on:

    if (widget == App::main_window)
    {
    write_string(x, "[mainwindow|");
    int left = 0, top = 0, width = 0, height = 0;
    App::main_window->get_position(left, top);
    App::main_window->get_size(width, height);
    write_int(x, left);
    write_separator(x);
    write_int(x, top);

  12. ice0 commented on Nov 28, 2020

    @ice0
    Collaborator

    Is size kept "correctly" (same value before being minimized)?

    For Windows 10 - yes, Windows 7 - not tested.

  13. rodolforg commented on Dec 19, 2020

    @rodolforg
    Contributor

    Ok. What about this:

    • if width or height < 50, write as something like 640 x 480.
    • if left or top < -1000, write as 0,0.
    • on read, if left+width < 0, set at (0,y)
    • 0n read, if top+height > screen height, set at (x,0)
  14. ice0 commented on Dec 20, 2020

    @ice0
    Collaborator

    if left or top < -1000, write as 0,0.

    Looks like -100 will be enough.

    on read, if left+width < 0, set at (0,y)
    0n read, if top+height > screen height, set at (x,0)

    I'm not sure if this is required. As for me, if you can see the upper left corner of the window - this gives you the ability to resize the window and this will be enough.

  15. rodolforg commented on Dec 20, 2020

    @rodolforg
    Contributor

    Looks like -100 will be enough.

    But maybe user moved it that way?

    I'm not sure if this is required. As for me, if you can see the upper left corner of the window - this gives you the ability to resize the window and this will be enough.

    My logic was to check if windows is hidden on startup (moved away so it can't be seen in screen).
    In second thought, :

    • I didn't propose a check if left > screen width (and in a similar way, the vertical direction)
    • I don't know how it behaves when user more than one screen :P
  16. added 2 commits that reference this issue on Jan 6, 2021
    689502d
    710ab46
  17. added a commit that references this issue on Jan 12, 2021
    ca04f3d
  18. added a commit that references this issue on Apr 17, 2021
    fc1ce21
  19. added a commit that references this issue on Apr 20, 2021
    de99a3d
  20. rodolforg commented on May 9, 2021

    @rodolforg
    Contributor

    This issue is fixed in v1.4.1.

  21. ice0 commented on May 10, 2021

    @ice0
    Collaborator

    Just checked, all works fine now.

  22. added 2 commits that reference this issue on Aug 9, 2021
    d9df812
    9978c85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions