I have here described the situation, which I encounteted on Fedora Silverblue with KDE (Fedora Kinoite).
I did not find her description on the Internet and on the forums of KDE and LibreOffice. Maybe this description will be useful to someone.
Description of the problem:
After installing LibreOffice, the first time, when its main window is overlapped by the window of another application, a warning appears to the (Fig.1, lower right corner of the picture) :
when you click the “Find out more” button, a dialog box will appear (Fig.2, lower left corner of the picture) :
After pressing the “Force Quit” button in it,LibreOffice application closes. For all subsequent launches, it closes automatically ~30 seconds after launch without warning. I found, that this behavior is peculiar only to KDE when it runs on Wayland. When KDE work on x11, this behavior does not occur. A GNOME on Wayland does not have such behavior.
How do I get the LibreOffice to work and allow me editing documents, and not go down after 30 seconds or 1 minute ?
Solving the problem:
I found a description of similar problems on the Internet, the main reason here were problems with the hardware graphic acceleration functions that LibreOffice uses. Having investigated my situation in this direction, I did not succeed. This was the reason for my post here:
Also, no other settings of the LibreOffice, OS and KDE did not allow the LibreOffice to return to working condition. Now, after the research I have done, I can reliably reproduce this behavior of the LibreOffice and reliably bring it into working condition.
Without analyzing the sources of the KDE and LibreOffice, I assume that the reason for this behavior of the LibreOffice on KDE (or maybe any other Flatpack application) is that Wayland monitors the z-position of the application windows and reports this information back to the applications (this does not occur on X11) and the Flatpack uses this. If it is overlapped of the window of another application, i.e. it is inactive now, and work with this application is not currently underway, Flatpak inform KDE about it and it responds to this message GNOME, apparently does not respond to this message). First, a warning appears as in Fig.1, then KDE gives the user the opportunity (Fig.2) to allow or prohibit the application to work, when it is overlapped by another application, i.e. in this case – works in the background.
The results of the answer to this question will be saved in a file ~/.local/flatpak/share/db/background . Its contents determine whether the application will run in the background (when the application window is not on the surface) or not (in GNOME, this folder always remains empty).
Deleting this file will lead to the fact that, as in the first time, a question will be asked as in Fig.1 and Fig. 2. Here you can select “Allow”, if someone has previously chosen “Force Quit”, and the application will be allowed to work when it is overlapped by other windows and it will work reliably. I checked – not all Flatpak applications behave this way. I’ve only seen this at the LibreOffice.