Bug 1093071 - YaST constantly steals focus
YaST constantly steals focus
Status: RESOLVED WONTFIX
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2
Current
Other All
: P4 - Low : Major (vote)
: ---
Assigned To: YaST Team
Jiri Srain
https://trello.com/c/1DocyrnP
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-14 07:27 UTC by Oliver Kurz
Modified: 2022-01-24 20:16 UTC (History)
22 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Kurz 2018-05-14 07:27:40 UTC
+++ This bug was initially created as a clone of Bug #326158 +++

## Observation

There are a lot of very old bugs already and at least in the current state seems like the behaviour described in these bugs is still present: YaST during some actions, especially package installation (but not in the "software management" module itself), opens many popup dialogs and steals the focus preventing to work with the system while yast does its actions


## Steps to reproduce

* In an installed system, open the yast control center, open "Remote Administration (VNC)", enable any of the Remote Administration options and confirm
* Confirm installation of necessary package and minimize or focus another application
* Observe how the yast configuration dialog gains focus again (unminimized)


## Expected result

* For minimised YaST progress dialogs should never popup
* progress dialogs should not get focus for unfocussed foreground applications

## Further details

Seems this has been reported already many times so it might be interesting to dig a bit into history here:
* https://bugzilla.suse.com/show_bug.cgi?id=326158
* https://bugzilla.suse.com/show_bug.cgi?id=331835
* https://bugzilla.suse.com/show_bug.cgi?id=34759
* https://bugzilla.suse.com/show_bug.cgi?id=334631
* https://bugzilla.suse.com/show_bug.cgi?id=615927
* https://bugzilla.suse.com/show_bug.cgi?id=372319
* https://bugzilla.suse.com/show_bug.cgi?id=74073
* https://bugzilla.suse.com/show_bug.cgi?id=330649
* https://bugzilla.suse.com/show_bug.cgi?id=297642
* https://bugzilla.suse.com/show_bug.cgi?id=298071
Comment 1 Stefan Hundhammer 2018-05-14 10:04:28 UTC
The YaST Qt UI does a QWidget::raise() for each new dialog (created from the Ruby/ex-YCP application code:

https://github.com/libyui/libyui-qt/blob/master/src/YQDialog.cc#L186

We are doing that for a good reason because every so often it happened that some weird window manager got the window stacking wrong and a small popup dialog would end up behind (!) the main dialog, rendering the entire YaST application unusable. Only very advanced users try [Alt][Tab] to check if maybe some modal popup is hiding behind the main window; to the great majority of users, that application has become unusable.

This was a workaround for an even larger number of other bugs that turned out to be complete showstoppers for many users. We never liked that approach, but it was a feasible workaround for a real-world problem.

What you are asking for, however, is a minor annoyance that affects only a very small number of users, mostly in our internal QA department.

For more details, see also 

  https://bugzilla.suse.com/show_bug.cgi?id=246934#c23

We will definitely not go back to make the YaST UI unusable for average users in many cases when some window manager misbehaves (which a surprising number of them tends to do).

If anybody is actually willing to spend time on this and has a solution that does not break things (i.e. go back to hiding small popup windows behind the main window in some cases), we will seriously consider it. But so far, nobody seems to have a bright idea what can be done.
Comment 2 Oliver Kurz 2018-05-14 11:03:30 UTC
(In reply to Stefan Hundhammer from comment #1)
> […]
> What you are asking for, however, is a minor annoyance that affects only a
> very small number of users, mostly in our internal QA department.

Well, I got this report from a non-SUSE openSUSE user and was just trying to first reproduce myself and report accordingly.

> […] But so far, nobody seems to have a bright idea what can be done.

well, the software management module actually does it fine: It shows the progress notification using the same view as the installer within the same window in an inner frame and therefore no problem there. Another alternative is to ensure that multiple packages do not spawn multiple dialogs but just one. In this case it might popup once but you can minimize. That would already help.
Comment 3 Ladislav Slezák 2018-05-14 11:24:09 UTC
The package installed from the package manager work correctly because it prepares the progress window for that. The other modules request installing a needed package, but do not prepare a progress window. In that case the progress cannot be displayed in the current window as it would be destroyed and it could contain unexpected content after returning the control back to the module.

I think the fix could be opening a new window in the Package.Install and related calls and closing it in the end.
Comment 4 Stefan Hundhammer 2018-05-14 11:28:32 UTC
Now tracking in our Trello scrum queue.

Still don't know a solution, though.
Comment 5 Lukas Ocilka 2022-01-24 20:16:22 UTC
It looks like we are not going to fix it. Sorry.