mirzaakhena / gtge

Automatically exported from code.google.com/p/gtge
0 stars 0 forks source link

WindowExitListener seems to be unneeded. #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The WindowExitListener seems to not be needed.  There are four places it 
is used:

public GameSettings(URL splashImage): the removal of the 
this.addWindowListener(WindowExitListener.getInstance()); method does not 
appear to hinder functionality.

Both FullScreenMode and WindowedMode use it, but they will still probably 
terminate if they do not have this listener (I need to verify this, but it 
will probably act like the GameSettings class does and exit the 
application upon close anyways).  

Furthermore, GameLoader removes the listeners set into the FullScreenMode 
and WindowedMode in the setup method.

Original issue reported on code.google.com by MetroidF...@gmail.com on 7 Apr 2008 at 2:08

GoogleCodeExporter commented 8 years ago
WindowExitListener is used for anyone that is using the 
FullScreenMode/WindowedMode
directly not using GameLoader class, and want to remove the default exit 
behavior
(calling System.exit(0)).
If you can find better idea, perhaps by simply making the frame do nothing if 
the
close button is pressed.

Original comment by pau...@yahoo.com on 7 Apr 2008 at 4:30

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
But doesn't WindowExitListener make the program call System.exit(0)?

Frame is an exposed property, so (presumably advanced, since they're using 
FullScreenMode/WindowedMode without the nice wrapping that GameLoader provides) 
users would be able to set a listener directly, wouldn't they?

Original comment by MetroidF...@gmail.com on 7 Apr 2008 at 2:21

GoogleCodeExporter commented 8 years ago
Yep, it's exists only for ease to use :) It's removed in normal operation 
anyway.
Well your argument is okay, if one is using FullScreenMode/WindowedMode 
directly,
they are advanced users :)

Original comment by pau...@yahoo.com on 7 Apr 2008 at 2:51

GoogleCodeExporter commented 8 years ago
I am going to post a poll in the forums, since either way it doesn't matter 
that 
much (that's why its low priority :)   )

If people are for it, I'll set the status of this to WontFix, and if people are 
against it, I'll simply remove it.  I'll place it in "Bugs" although its not 
really 
a bug.  Let the people decide! :)

Original comment by MetroidF...@gmail.com on 8 Apr 2008 at 2:49

GoogleCodeExporter commented 8 years ago
Status changed to WontFix due to lack of interest.

Original comment by MetroidF...@gmail.com on 20 Apr 2008 at 4:49