g3n / engine

Go 3D Game Engine (http://g3n.rocks)
https://discord.gg/NfaeVr8zDg
BSD 2-Clause "Simplified" License
2.8k stars 295 forks source link

Serious graphical glitch involving resizing near the title bar of a GUI window widget #63

Closed amyadzuki closed 6 years ago

amyadzuki commented 6 years ago

I have come across a really difficult-to-describe graphical glitch that I think occurs when you attempt to resize a GUI window widget near the title bar.

It is easiest to reproduce by resizing the top of a window downward in a short, rapid motion. After the glitch is triggered, the window "runs away" from the mouse pointer whenever the mouse cursor approaches the title bar.

Another way to trigger the glitch is to resize the height from the bottom border of a GUI window widget as small as it gets, release the mouse button, and then enlarge the height back again in a short, rapid downward drag of the mouse. Like before, after triggering it, the window "runs away" from the cursor whenever it approaches the title bar.

This glitch is serious because it causes GUI window widgets to "run off the screen" where they cannot be interacted with anymore. Please let me know if you have any difficulty reproducing it and I will try to be more clear and/or supply example code as needed.

Tested on: FreeBSD 10.3 amd64

amyadzuki commented 6 years ago

Don't spend a lot of time looking for the glitch... if you can't reproduce it in a minute or two then I will create a minimal test case repo and possibly a video.

danaugrs commented 6 years ago

Managed to reproduce it - an easy task given your clear instructions 😉. I might take some time to refactor the entire window class.

amyadzuki commented 6 years ago

Oh I'm so glad you could reproduce it! I'm just loving g3n so far, and I'm planning to use it to make my first commercial game ^_^ Take care

danaugrs commented 6 years ago

I just checked-in a fix - let me know if you see any more weird behaviors! Feel free to share any work-in-progress screenshots of your game when you get it going :)