mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed Issue #1054. Buttons in Feedback panel will only get focused, if the MageFrame has the focus thus preventing focus theft from other programs.
This commit is contained in:
parent
0b26aaff6e
commit
9be613beb9
1 changed files with 5 additions and 2 deletions
|
@ -201,9 +201,12 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
|||
}
|
||||
|
||||
// Issue 256: Chat+Feedback panel: request focus prevents players from chatting
|
||||
private void requestFocusIfPossible() {
|
||||
// Issue #1054: XMage steals window focus whenever the screen updates
|
||||
private void requestFocusIfPossible() {
|
||||
boolean requestFocusAllowed = true;
|
||||
if (connectedChatPanel != null && connectedChatPanel.getTxtMessageInputComponent() != null) {
|
||||
if (MageFrame.getInstance().getFocusOwner() == null) {
|
||||
requestFocusAllowed = false;
|
||||
} else if (connectedChatPanel != null && connectedChatPanel.getTxtMessageInputComponent() != null) {
|
||||
if (connectedChatPanel.getTxtMessageInputComponent().hasFocus()) {
|
||||
requestFocusAllowed = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue