Bug 174505 - bell in non-visible session event never happens
Summary: bell in non-visible session event never happens
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 280882 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-07 06:43 UTC by Mikel Ward
Modified: 2012-01-10 13:12 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.0


Attachments
Proposed patch (411 bytes, patch)
2010-11-09 10:59 UTC, Tijl Coosemans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikel Ward 2008-11-07 06:43:26 UTC
Version:            (using KDE 4.1.2)
OS:                Linux
Installed from:    Fedora RPMs

Go to Settings->Notifications->Bell in a Visible Session, click Log to a file and specify /home/mward/visible.out (change /home/mward to your home directory).

Go to Settings->Notifications->Bell in Non-Visible Session, click Log to a file and specify /home/mward/nonvisible.out (change /home/mward to your home directory).

Run sleep 3; echo "\\a" in a console window, and Alt+Tab away so that the window is not visible or click on the Minimize button so the window is not visible.

Lines like this appear in visible.out rather than nonvisible.out
- KNotify Fri Nov 7 16:42:22 2008: Bell in session 'Shell'
Comment 1 Mikel Ward 2009-05-31 10:10:05 UTC
Is anybody investigating this?

I have another look in Ubuntu 9.04 (KDE 4.2.2, Konsole 2.2.2) and the problem still exists.

I have tried on the current desktop obscured (not focused, hidden by a maximized Konqueror window), on the current desktop minimized, and on a different desktop, and under no circumstances does the event trigger.

There is also no documentation available for that preference.
Comment 2 Ariel 2009-06-01 03:10:11 UTC
Ever since I upgraded from KDE 3.5 my non-visible bell in konsole has been non-functional.

One simple way to verify/reproduce is to do this in the shell:

   $ echo ^G

where ^G is CTRL-G and is entered as a sequence of two keys: CTRL-V-CTRL-G
The konsole window/screen doesn't flash as it used to do in the good old days.
Comment 3 Kurt Hindenburg 2009-06-15 03:41:59 UTC
Verified steps in original bug report with latest svn 4.3.0pre
Comment 4 Kurt Hindenburg 2009-06-15 06:26:39 UTC
Does invisible == not focused?  For example, if there is only 1 session, but Konsole is not the active window, should the visible or invisible bell trigger?

The issue is in TerminalDisplay.cpp, 
KNotification::event("BellVisible", message,QPixmap(),this); 
is always called.

A check needs to be made and BellInvisible called if necessary.
Comment 5 Kurt Hindenburg 2009-06-15 06:27:12 UTC
Comment #2, that is a seperate issue I think.  The swapcolors function doesn't work I think.
Comment 6 Jon Nelson 2009-07-01 19:25:16 UTC
I think I have the same issue.
Open up konsole (I'm using KDE 4.3RC1 I think).
Open up two tabs.
Configure the current profile to *notify* and *play a sound* (just pick one, but test it) on bell on both "Bell in Visible Session" and also for non-visible sessions.

Type this into one tab:

sleep 5; echo -e '\a' 

and switch to the other tab.

now it is not visible, and you can *hear* the bell go off, but no notification is sent.

What's up with that?
Comment 7 Jon Nelson 2009-07-01 19:26:05 UTC
The test procedure in my comment for bug 174505 should also work here.
Confirmed as of 4.3RC1.
Comment 8 Tijl Coosemans 2010-11-09 10:59:44 UTC
Created attachment 53273 [details]
Proposed patch

Here's a patch for kdebase.
Comment 9 Kurt Hindenburg 2011-07-09 22:22:19 UTC
Git commit ca0cb95007f01018818a0d5f1cc95eb0fa6bb6e9 by Kurt Hindenburg.
Committed on 10/07/2011 at 00:18.
Pushed by hindenburg into branch 'master'.

Fix notifications for non-visible sessions.

Currently all notifications are deemed 'visible'.  This patch fixes
that so all non-visible sessions go to their own notifications.

Patch by Tijl Coosemans.

I'll backport to the 4.7 branch.
BUG: 174505
FIXED-IN: 2.7.1
REVIEW: 101720

M  +2    -1    src/TerminalDisplay.cpp     

http://commits.kde.org/konsole/ca0cb95007f01018818a0d5f1cc95eb0fa6bb6e9
Comment 10 Jekyll Wu 2011-08-27 13:30:49 UTC
*** Bug 280882 has been marked as a duplicate of this bug. ***
Comment 11 Jérôme Poisson 2012-01-10 10:41:41 UTC
Actualy, the bug is not fully fixed: if you check bell in visible session and bell in an invisible session, you can sleep 3; echo -e "\a" and it works.

But, if you uncheck bell in visible session, and you check bell in invible session - so you should have notification only when you are on an other tab or when konsole has not the focus -, it doesn't work (no notification at all).

This bug should be reopenned.

Tested on Konsole 2.7.3 @ Kubuntu 11.10
Comment 12 Jekyll Wu 2012-01-10 11:58:48 UTC
(In reply to comment #11)

Hmm, you are right about the behavior in Konsole 2.7.3. I just checked it.

But reopening is unneeded. It seems Kurt forgot to backport the fix to the 4.7 branch. So  this problem is actually fixed in KDE SC 4.8, or Konsole 2.8. I also just checked it.
Comment 13 Jérôme Poisson 2012-01-10 13:12:26 UTC
Oki great, I will update ASAP then. thanks