mabe02 / lanterna

Java library for creating text-based GUIs
GNU Lesser General Public License v3.0
2.27k stars 242 forks source link

Overwrote Window.pack() to set disposed variable to false in SwingTerminalFrame. #427

Closed SmoeJith closed 5 years ago

SmoeJith commented 5 years ago

To set a frame to borderless mode, one must dispose, then undecorate, and finally repack the frame. However, disposing a SwingTerminalFrame will set its disposed flag to true, which will cause its pollInput() method to permanently send EOF KeyStrokes. This would not be a problem, but when repacking the frame, the flag is not set to false. The end result is a frame that will not return keyboard input.

My change sets the dispose flag to false when pack() is called so that one can dispose and repack the SwingTerminalFrame an arbitrary number of times.