Bug 328014 - Child modal dialog of a parent modal dialog doesn't get focus
Summary: Child modal dialog of a parent modal dialog doesn't get focus
Status: RESOLVED FIXED
Alias: None
Product: print-manager
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.11.95
Platform: Arch Linux Linux
: NOR grave
Target Milestone: ---
Assignee: Daniel Nicoletti
URL:
Keywords:
: 328760 331182 333455 344763 345490 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-24 15:12 UTC by Alexander Nestorov
Modified: 2015-12-01 11:36 UTC (History)
20 users (show)

See Also:
Latest Commit:
Version Fixed In: 14.12.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Nestorov 2013-11-24 15:12:04 UTC
Launching a modal dialog (for example, as password dialog) from a modal dialog won't give the focus to the second dialog.

Reproducible: Always

Steps to Reproduce:
1. Open KDE system-config
2. Go to "Printers"
3.  Open "Configure/Setup"
4. Change something (anything) and click on save to trigger a password dialog
5. Password dialog is unusable as it won't get the focus
Actual Results:  
Second modal dialog won't get the focus

Expected Results:  
Second modal dialog should get the focus

Actual screenshot of the bug: http://imagebin.ca/v/132faZ5hj1Wg
I'm setting this as "Grave" because IMHO, the software is basically unusable. At least that what understand by <unusable> if I can't change any preferences.
Comment 1 Thomas Lübking 2013-11-24 15:55:03 UTC
bug in the client (print manager)

a) pw dialog and (modal) config dialog are set transient for the same (dummy) window
b) the password is *not* set modal, so the modal config dialog alone blocks the entire group.

Every half-wise NETWM compliant WM will produce similar (the same) results.
Even WMaker or ICEWM do.
Comment 2 Diego 2013-11-29 13:58:48 UTC
I can confirm this bug, it's always reproducible by opening the Print Manager with:
kcmshell4 kcm_printer_manager
Comment 3 Johannes Falke 2013-12-11 15:08:46 UTC
I can also confirm this bug. The only way to work around this that I can currently see is kdesu kcmshell4 kcm_printer_manager.
Comment 4 Antonio Rojas 2013-12-17 19:58:39 UTC
*** Bug 328760 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Nicoletti 2013-12-17 20:01:18 UTC
I can reproduce and as soon as I have time I'll fix it, though I have no idea of what happened so that it got broken, I have the felling that something might have changed in KWin as print-manager is pretty much on bug fix mode...
Comment 6 Christoph Feck 2014-02-16 18:13:09 UTC
*** Bug 331182 has been marked as a duplicate of this bug. ***
Comment 7 Diego 2014-02-21 10:59:16 UTC
This problem can be seen also when changing printer settings.

Click "Configure", then choose "Printer options", change something and "Apply". The password prompt will always be unreachable in the background.
Comment 8 Tory Anderson 2014-02-26 14:00:25 UTC
I also confirm this problem.
Comment 9 gajdos.mirek 2014-04-17 11:03:00 UTC
Confirming, I can reproduce this as well.
Comment 10 Christoph Feck 2014-04-18 02:51:20 UTC
*** Bug 333455 has been marked as a duplicate of this bug. ***
Comment 11 Rex Dieter 2014-04-30 15:16:09 UTC
enough "me too" comments, marking confirmed.
Comment 12 Orion Poplawski 2014-04-30 15:26:47 UTC
This is probably the culprit:

https://projects.kde.org/projects/kde/kdeutils/print-manager/repository/revisions/1595ef0614f824a6a871d51327eff3a108e6e251
Added by Daniel Nicoletti 11 months ago

Doesn't let the password dialog be modal otherwise it will block plasma.
Partially fixes BUG: 314633
Comment 13 Orion Poplawski 2014-04-30 15:28:25 UTC
Note that for me, running System Settings -> Printers works fine, only launching from kcmshell4 triggers.
Comment 14 Diego 2014-04-30 16:01:46 UTC
(In reply to comment #13)
> Note that for me, running System Settings -> Printers works fine, only
> launching from kcmshell4 triggers.

Yeah, but if you change some Settings from System Settings the problem still hold.
Open System Settings Printers KCM, select "Configure" of a printer, then go to "Printer options", change something, click "Apply" and then you'll get an unreachable password dialog.
Comment 15 Orion Poplawski 2014-04-30 22:01:54 UTC
(In reply to comment #14)
> (In reply to comment #13)
> Yeah, but if you change some Settings from System Settings the problem still
> hold.
> Open System Settings Printers KCM, select "Configure" of a printer, then go
> to "Printer options", change something, click "Apply" and then you'll get an
> unreachable password dialog.

Ah, yes, I can confirm that too (4.13.0).  At other times it prompts for the password okay, but in that situation it fails.
Comment 16 Moviuro 2014-08-30 07:40:11 UTC
Still exists in KDE 4.14.0 (same printer dialog)...
Comment 17 S 2014-10-22 18:31:47 UTC
(In reply to Orion Poplawski from comment #13)
> Note that for me, running System Settings -> Printers works fine, only
> launching from kcmshell4 triggers.

For me (openSUSE 13.2 RC1, KDE 4.14.1) it doesn't work from the menu or from the kcmshell4. The authentication dialog appears behind the main window, and it doesn't accept focus or input, so unusable.
Comment 18 S 2014-10-22 18:39:09 UTC
Additionally, even when opening systemsettings as root, the "Configure" button for the printer is non-functional.
Comment 19 Wolfgang Bauer 2014-10-23 13:58:29 UTC
(In reply to Daniel Nicoletti from comment #5)
> I can reproduce and as soon as I have time I'll fix it, though I have no
> idea of what happened so that it got broken, I have the felling that
> something might have changed in KWin as print-manager is pretty much on bug
> fix mode...
Well, to summarize:
As already explained by Thomas Lübking in comment#1, the problem is that the configure printer dialog is modal, while the password dialog is not. So the password dialog can never get focus.

The password dialog has been changed to non-modal with this commit, as mentioned in comment#12 as partial bugfix for BUG#314633:
https://projects.kde.org/projects/kde/kdeutils/print-manager/repository/revisions/1595ef0614f824a6a871d51327eff3a108e6e251

Personally I see two ways to fix this:
- make the password dialog modal again
- make the configure printer dialog non-modal as well
I have tried both, and both fix the issue here.
Comment 20 S 2014-10-23 14:58:06 UTC
Thanks Wolfgang for making some progress on this!

(In reply to S from comment #18)
> Additionally, even when opening systemsettings as root, the "Configure"
> button for the printer is non-functional.

What about this issue where the "Configure" button simply does nothing? Should I file a separate bug, or is it somehow related?
Comment 21 Wolfgang Bauer 2014-10-23 15:57:25 UTC
(In reply to S from comment #20)
> What about this issue where the "Configure" button simply does nothing?
> Should I file a separate bug, or is it somehow related?

I haven't looked at that yet. But if it works as user you won't have any need to run the KCM as root, I'd say.
Comment 22 S 2014-10-23 17:48:26 UTC
http://bugzilla.opensuse.org/show_bug.cgi?id=889187#c7
Nice fix Wolfgang!
Comment 23 Christoph Feck 2014-12-04 14:05:36 UTC
Wolfgang, if possible, please propose your patch on reviewboard.
Comment 24 Wolfgang Bauer 2014-12-04 19:45:39 UTC
(In reply to Christoph Feck from comment #23)
> Wolfgang, if possible, please propose your patch on reviewboard.
Please see https://git.reviewboard.kde.org/r/121351/ .

Btw, this problem also exists in the Frameworks5 port.
Comment 25 Wolfgang Bauer 2015-01-29 19:51:28 UTC
Git commit 0653256f5f5b90d64c6093f168e49dd94e137f10 by Wolfgang Bauer.
Committed on 29/01/2015 at 19:54.
Pushed by wbauer into branch 'Applications/14.12'.

Make the printer configuration dialog non-modal

Commit 1595ef0614f824a6a871d51327eff3a108e6e251 (a partial fix for bug
314633) changed the password dialog to be non-modal.
But the printer configuration dialog is still modal, so if a password is
needed to apply/save the configuration it cannot be entered because the
password dialog cannot get focus.

This patch sets the configuration dialog to be non-modal as well to
prevent this problem.
FIXED-IN: 14.12.2
REVIEW: 121351

M  +1    -1    configure-printer/ConfigureDialog.cpp

http://commits.kde.org/print-manager/0653256f5f5b90d64c6093f168e49dd94e137f10
Comment 26 Christoph Feck 2015-02-04 23:16:41 UTC
> Btw, this problem also exists in the Frameworks5 port.

Wolfgang, can the commit just be merged to frameworks branch? Or do you first want to address the issues raised in the review request?
Comment 27 Wolfgang Bauer 2015-02-05 20:41:34 UTC
(In reply to Christoph Feck from comment #26)
> > Btw, this problem also exists in the Frameworks5 port.
> 
> Wolfgang, can the commit just be merged to frameworks branch? Or do you
> first want to address the issues raised in the review request?

Yes, I'll submit the change to master and frameworks branch as well tomorrow.

Sorry, I was a bit short of time in the last days...
Comment 28 Wolfgang Bauer 2015-02-07 14:12:10 UTC
Git commit fdee6634b2bc0438fe74420c2e0178721ca21def by Wolfgang Bauer.
Committed on 29/01/2015 at 19:54.
Pushed by wbauer into branch 'frameworks'.

Make the printer configuration dialog non-modal

Commit 1595ef0614f824a6a871d51327eff3a108e6e251 (a partial fix for bug
314633) changed the password dialog to be non-modal.
But the printer configuration dialog is still modal, so if a password is
needed to apply/save the configuration it cannot be entered because the
password dialog cannot get focus.

This patch sets the configuration dialog to be non-modal as well to
prevent this problem.
FIXED-IN: 14.12.2
REVIEW: 121351

Conflicts:
	configure-printer/ConfigureDialog.cpp

M  +1    -1    configure-printer/ConfigureDialog.cpp

http://commits.kde.org/print-manager/fdee6634b2bc0438fe74420c2e0178721ca21def
Comment 29 Christoph Feck 2015-03-03 10:43:00 UTC
*** Bug 344763 has been marked as a duplicate of this bug. ***
Comment 30 Christoph Feck 2015-03-24 21:29:30 UTC
*** Bug 345490 has been marked as a duplicate of this bug. ***
Comment 31 Barade 2015-07-01 21:43:16 UTC
I have installed print-manager 4.14.3 on Gentoo Linux and still got this problem!!! Does this depend on any other packages?
Comment 32 Christoph Feck 2015-07-02 00:10:53 UTC
It is fixed in version 14.12.2.
Comment 33 George Getejanc 2015-12-01 08:42:32 UTC
I can confirm this bug in Fedora 23 KDE to, with KDE 5 and Dolphin 15.08.1, Qt 5.5.1 (compiled on 5.5.0) and KDE Frameworks 5.16.0

The problem ist still there, and not fixed yet.

Please to devs, to fix this. I have this problem on every fedora, 20, 21, 22, 23... Not fixed on any of these.
Comment 34 Wolfgang Bauer 2015-12-01 11:36:02 UTC
(In reply to George Getejanc from comment #33)
> I can confirm this bug in Fedora 23 KDE to, with KDE 5 and Dolphin 15.08.1,
> Qt 5.5.1 (compiled on 5.5.0) and KDE Frameworks 5.16.0

What has dolphin got to do with it?
This bug report is about kde-print-manager...
Are you sure you are talking about the same problem?

> The problem ist still there, and not fixed yet.

And what problem exactly?

> Please to devs, to fix this. I have this problem on every fedora, 20, 21,
> 22, 23... Not fixed on any of these.

It is fixed since the 14.12.2 release (i.e. since February), and I cannot reproduce it any more in openSUSE since then. Not in the KDE4 nor KF5 version.