mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +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
|
// 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;
|
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()) {
|
if (connectedChatPanel.getTxtMessageInputComponent().hasFocus()) {
|
||||||
requestFocusAllowed = false;
|
requestFocusAllowed = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue