Bug 163677

Summary: hidden question dialog prevents application quit via taskbar
Product: konsole Reporter: Jacques Kvam <jwkvam>
Component: generalAssignee: Konsole Developer <konsole-devel>
Severity: wishlist CC: adaptee, drew.m.fisher, kwin-bugs-null
Priority: NOR    
Version: 2.8   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.3

Description Jacques Kvam 2008-06-10 05:59:12 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.2.3 
OS:                Linux

When closing an application from the taskbar that is either: 1. minimized, or 2. on another workspace. The popup notification that you are closing multiple tabs is not given, and the user is not given any feedback that anything actually happened.

The popup is finally displayed when the user goes to activate the same application in question.

1. Open konsole
2. Open another tab
3. Ensure that warn about multiple tabs when closing is enabled
4. Minimize konsole or switch to another workspace.
5. Right-click on the taskbar and close konsole.
6. *Nothing happens*
7. Activate konsole and finally see the warning about multiple tabs.
Comment 1 Drew Fisher 2008-06-27 04:08:52 UTC
I can confirm this in Konqueror and Konsole in SVN r823211.
Comment 2 A. Spehr 2008-06-27 04:27:06 UTC
question dialog doesn't get focus
Comment 3 Thomas Lübking 2012-03-12 01:33:33 UTC
Sorry for the late reply.

The behavior is intended.*
If a dialog for a minimized window is opened, it's kept minimize and the window is marked "urgent" (ie the taskbutton flashes) instead.
Obvious reason is that otherwise a unrelated dialog would be shown or the window would unconditionally be unminimized. (the urgent hint exists precisely to avoid such)

I see that the close dialog is a bit special in this regard, but that is unknown to the WM.

As a workaround you can set up a rule matching the dialog and force it to not be minimized.

The konsole developers might consider to unminimize the window with the dialog
-> reassigning.

*kwin/manage.cpp:417 in current git master
Comment 4 Jekyll Wu 2012-04-21 09:27:51 UTC
For the situation of minimized Konsole , I think the following code should do the job.

bool MainWindow::queryClose()

    if ( isMinimized() ) {

   int result = KMessageBox::warningYesNoCancel(....);

But for the situation of on a another virtual desktop, is it possible?
Comment 5 Thomas Lübking 2012-04-21 10:29:30 UTC
KWindowSystem::setOnDesktop(window()->winId(), KWindowSystem::currentDesktop());
Comment 6 Jekyll Wu 2012-04-22 05:39:20 UTC
Git commit cf5ccf5f65fa490411a27f6a5ada271bdc188d3b by Jekyll Wu.
Committed on 21/04/2012 at 06:32.
Pushed by jekyllwu into branch 'master'.

Ensure the confirmation dialog for closing window is visible to users
FIXED-IN: 4.9.0

M  +6    -0    src/MainWindow.cpp

Comment 7 Jekyll Wu 2012-04-24 21:01:44 UTC
Git commit 66c0ddf7d1d5c9a7009f33da418d27a186651b92 by Jekyll Wu.
Committed on 21/04/2012 at 06:32.
Pushed by jekyllwu into branch 'KDE/4.8'.

Ensure the confirmation dialog for closing window is visible to users
FIXED-IN: 4.8.3
(cherry picked from commit cf5ccf5f65fa490411a27f6a5ada271bdc188d3b)

M  +6    -0    src/MainWindow.cpp