diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java index 58c38054e..932effa98 100755 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java @@ -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); diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactRightButtonMenu.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactRightButtonMenu.java index 7c60a7dc7..40473cac1 100644 --- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactRightButtonMenu.java +++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactRightButtonMenu.java @@ -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 {