Opened 5 years ago

Closed 5 years ago

#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 by Thomas Bernard, 5 years ago

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 by HoraK-FDF@…, 5 years ago

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 by Thomas Bernard, 5 years ago

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 by Thomas Bernard, 5 years ago

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 by PulkoMandy, 5 years ago

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 by Thomas Bernard, 5 years ago

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 by PulkoMandy, 5 years ago

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 by Thomas Bernard, 5 years ago

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

comment:9 by Thomas Bernard, 5 years ago

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.