Make notifications work in KDE
authorSteve Youngs <steve@emchat.org>
Sat, 23 Feb 2013 01:25:28 +0000 (11:25 +1000)
committerSteve Youngs <steve@emchat.org>
Sat, 23 Feb 2013 01:25:28 +0000 (11:25 +1000)
Under KDE, #'frame-visible-p and #'frame-totally-visible-p will only
return nil if the frame you are querying is iconified.  If it is merely on
another virtual desktop they will return t.

I'm not sure yet if this is a bug in KDE or if SXEmacs needs to be made
more "KDE-aware", but this changeset will let EMchat notifications work in
KDE.

* emchat-log.el (emchat-log): Test if the EMchat frame is focused
with #'selected-frame.

* .gitignore: Add TAG

Signed-off-by: Steve Youngs <steve@emchat.org>
.gitignore
emchat-log.el

index de14343..d2907bd 100644 (file)
@@ -13,3 +13,4 @@ prepsrc.el
 ,,*
 ++*
 =build
+TAG
index 87522f2..e6aacc1 100644 (file)
@@ -429,8 +429,7 @@ ID is the entity that sent MESSAGE."
   "Log message under ID.
 Put MESSAGE at the end of log buffer if OPTION is non-nil.
 Mark MESSAGE unread if MARK-UNREAD is non-nil"
-  (unless (or (eq (current-buffer) emchat-log-buffer)
-             (frame-visible-p emchat-frame))
+  (unless (eq (selected-frame) emchat-frame)
     (emchat-notify id message))
   (if (and option (buffer-live-p emchat-log-buffer))
       (with-current-buffer emchat-log-buffer