when a window is iconified should set the state to normal before invoking toFront

cusax-fix
Yana Stamcheva 20 years ago
parent baf9450d38
commit 254d252f85

@ -183,8 +183,12 @@ public void run()
ChatWindow msgWindow = (ChatWindow) contactMsgWindows
.get(this.contactItem);
if (msgWindow.isVisible())
if (msgWindow.isVisible()) {
if(msgWindow.getState() == JFrame.ICONIFIED)
msgWindow.setState(JFrame.NORMAL);
msgWindow.toFront();
}
else
msgWindow.setVisible(true);
}
@ -245,8 +249,13 @@ public void windowClosing(WindowEvent e)
.setSelectedContactTab(this.contactItem);
}
if (tabbedChatWindow.isVisible())
if (tabbedChatWindow.isVisible()) {
if(tabbedChatWindow.getState() == JFrame.ICONIFIED)
tabbedChatWindow.setState(JFrame.NORMAL);
tabbedChatWindow.toFront();
}
else
tabbedChatWindow.setVisible(true);
@ -260,8 +269,12 @@ public void windowClosing(WindowEvent e)
.setSelectedContactTab(this.contactItem);
}
if (tabbedChatWindow.isVisible())
if (tabbedChatWindow.isVisible()) {
if(tabbedChatWindow.getState() == JFrame.ICONIFIED)
tabbedChatWindow.setState(JFrame.NORMAL);
tabbedChatWindow.toFront();
}
else
tabbedChatWindow.setVisible(true);
@ -313,8 +326,13 @@ public void messageReceived(MessageReceivedEvent evt)
}
if (Constants.AUTO_POPUP_NEW_MESSAGE) {
if(msgWindow.isVisible())
if(msgWindow.isVisible()) {
if(msgWindow.getState() == JFrame.ICONIFIED)
msgWindow.setState(JFrame.NORMAL);
msgWindow.toFront();
}
else
msgWindow.setVisible(true);
}
@ -377,8 +395,12 @@ public void windowClosing(WindowEvent e)
if (Constants.AUTO_POPUP_NEW_MESSAGE) {
tabbedChatWindow.addChatTab(chatPanel);
if(tabbedChatWindow.isVisible())
if(tabbedChatWindow.isVisible()) {
if(tabbedChatWindow.getState() == JFrame.ICONIFIED)
tabbedChatWindow.setState(JFrame.NORMAL);
tabbedChatWindow.toFront();
}
else
tabbedChatWindow.setVisible(true);

@ -333,6 +333,9 @@ else if (itemName.equalsIgnoreCase("viewHistory")) {
if(guiContactList.containsHistoryWindowForContact(contactItem)) {
history = guiContactList.getHistoryWindowForContact(contactItem);
if(history.getState() == JFrame.ICONIFIED)
history.setState(JFrame.NORMAL);
history.toFront();
}
else {

Loading…
Cancel
Save