https://bugs.kde.org/show_bug.cgi?id=447102

--- Comment #8 from Stefano Crocco <stefano.cro...@alice.it> ---
I'm aware of this issue and I've already created a fix for it
(https://invent.kde.org/network/konqueror/-/merge_requests/125). Unfortunately,
it needs to be reviewed before it can be accepted. Until that is done, there's
nothing I can do.

Of course, this is not how the preload mechanism should work. What should
happen is the following:
- if you have the "Preload an instance after desktop startup" on, then when you
log in KDE an hidden Konqueror window should be created (unless there are
already visible windows from a previous session). This should happen regardless
of the "Always try to have one preloaded instance" option.
- if you have the "Preload an instance after desktop startup" off, then no
Konqueror window (hidden or not) should be created, except from the ones you
left open from previous sessions. Again, this should be independent from the
"Always try to have one preloaded instance" option.
- If you have the "Always try to have one preloaded instance" option on, then,
once you run Konqueror, it will always create an extra, hidden window. This
way, the next time you want a new window, it won't need to really create a new
one: it'll just show the hidden one (which is faster), then create a new hidden
one. This also happens when you close the last window: in that case, a new
Konqueror application will be launched, with a single, hidden window (you can
see this by running `ps x` after closing the last Konqueror window).
- If you have the "Always try to have one preloaded instance" option off,
nothing of the above should happen. In particular, closing the last Konqueror
window should also close the application.

If you're interested, below are some technical details about the cause of this
bug.

Despite what one could image, the problem you're experiencing is not related to
the "Preload an instance after desktop startup" option, but to the "Always try
to have one preloaded instance" one and it's not caused by Konqueror itself,
but rather by its interaction with the generic KDE session restoring feature.
Essentially, when you close your session, the hidden window Konqueror creates
when "Always try to have one preloaded instance" is on is registered by the KDE
session manager, which then restores it when you next log in. Unfortunately,
the session manager doesn't take into account the fact that the window was
hidden, and it doesn't provide an easy way for Konqueror to tell it to ignore
the preloaded windows.

This problem has appeared in recent years because in the past there used to be
an instance of the Konqueror application for each window. Since it's easy to
exclude application from session management, Konqueror could tell the session
manager to ignore an instance if its window was hidden. Unfortunately, when we
needed to change the main web engine Konqueror uses from KWebKitPart to
QtWebEngine, we had to change how Konqueror works because QtWebEngine expects a
single application instance, regardless of how many windows there are. We
didn't realize that doing so would break how session management works, and this
caused the bug you're experiencing.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to