mirror of
https://github.com/igniterealtime/Spark.git
synced 2026-03-07 08:05:40 +00:00
SPARK-1784: Do not surpress ROAR popup when chat container is inactive/has no focus
Prior to this change, popups where surpressed when the chat container was not explicitly closed.
This commit is contained in:
@ -55,8 +55,10 @@ public class RoarMessageListener implements GlobalMessageListener {
|
||||
|
||||
int framestate = SparkManager.getChatManager().getChatContainer().getChatFrame().getState();
|
||||
|
||||
final boolean chatContainerHasFocus = SparkManager.getChatManager().getChatContainer().isFocusOwner();
|
||||
|
||||
// If the message is for a chat that's currently active and showing, do not popup.
|
||||
if (framestate == JFrame.NORMAL && activeroom.equals(room) && room.isShowing()
|
||||
if (!chatContainerHasFocus && framestate == JFrame.NORMAL && activeroom.equals(room) && room.isShowing()
|
||||
&& (isOldGroupChat(room) || isMessageFromRoom(room, message))) {
|
||||
Log.debug( "Surpressing popup: chat is currently active and showing.");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user