#102 closed defect (fixed)

Win32: GrafX2 forgets its size after being maximized

Reported by: HoraK-FDF@… Owned by: Thomas Bernard
Priority: minor Milestone: 2.7
Component: GrafX2 Version: 2.6
Keywords: Cc:

Description (last modified by Thomas Bernard)

I tested this with:
grafx2-sdl-2.6.2529-issue45-sdl
grafx2-sdl-2.6.2529-issue45-sdl2
grafx2-sdl-2.6.2529-issue45-win32

  • Grafx2 forgets the window size before maximizing on closing.
  • Grafx2 roduces weird artifacts if window is re sized without passed Anim/Layer? dialog, because grafx2 does not redraw itself only the dialog, maybe lock the window and prevent it from being re sized can be used to prevent this.

Change History (9)

comment:1 Changed 17 months ago by Thomas Bernard

I believe it is standard windows behaviour that "maximized" windows cannot be "grabbed". You have to click the maximize button again to get back to normal size and be abble to grab the sides of the window

comment:2 Changed 17 months ago by HoraK-FDF@…

You are right maximized windows cannot be grabbed, never was in a situation where I noticed that in all the years.
But then its still that grafx2 throws away the position/size of its not maximized state on closing and that it does not update on re size if Anim/Layer? dialog is still there.

comment:3 Changed 17 months ago by Thomas Bernard

Description: modified (diff)
Milestone: 2.7
Owner: changed from pulkomandy to Thomas Bernard
Priority: majorminor
Status: newaccepted
Summary: after maximise window borders are not useable anymoreWin32: GrafX2 forgets its size after being maximized

comment:4 Changed 14 months ago by Thomas Bernard

I dont think we can fix the issue "grafx2 does not update on resize when a dialog window is open"

I have made changes in the way the window version remember its position. Can you check with the latest build ?

comment:5 Changed 14 months ago by PulkoMandy

For sdl2 I had started a MULTI_WINDOW mode in the old sdl2 branch where we would use native os windows instead of our own thing. That would let the main window be more easily resizable, at least.

comment:6 Changed 14 months ago by Thomas Bernard

GrafX2 saves the window size on exit, so it saves the maximized window size and forget about the normal one.

With SDL I don't see how it is possible to know if the window is maximized...
With SDL2 and win32 it is possible, so we could not update the windows size in .ini (keeping the last standard windows size)

comment:7 Changed 14 months ago by PulkoMandy

We already grab the native win32 handle for some operations in SDL (clipboard support, for example), so it should be possible there as well?

comment:8 Changed 14 months ago by Thomas Bernard

see https://gitlab.com/GrafX2/grafX2/merge_requests/202
@HoraK-FDF@… is that ok for you ?

comment:9 Changed 14 months ago by Thomas Bernard

Resolution: fixed
Status: acceptedclosed

as said before we won't fix the "resize when dialog is open" in 2.x. (more likely for 3.0)

Note: See TracTickets for help on using tickets.