This is a Two step workaround for an annoying problem for the programs listed in the title and maybe for your app. Let me know if it worked and for which programs.
Note 1: When a app window is not full screen and small enough that that the open or save dialog window can fit in the empty space of my screen the dialog window will open next to the main window with the focus on the main window. The workaround works for me as long as the main window is maximized or large enough that the dialog window is forced to be displayed above it.
Step 1: Install gnome extension "Grand Theft Focus" to focus dialog windows for Visual Studio Code and ...:
https://extensions.gnome.org/extension/5410/grand-theft-focus/
Step 2: Use devilspie2 to focus dialog windows for (Chrome based) browsers and ... :
I'm using Brave browser.
Credits
From a terminal install devilspie2:
sudo apt install devilspie2
Create a rule by making the following file:
nano ~/.config/devilspie2/devilspie2.lua
Insert the following code:
if ( get_application_name() == 'xdg-desktop-portal-gnome' and get_window_type() == 'WINDOW_TYPE_DIALOG' )
then
focus_window();
end
Save and exit the file.
If you get an error that the file of folder does not exist, just run devilspie2 once. It will create the config directory and exits because there are no rules and try to create the rule again.
Run devilspie from Alt+F2 to test if it works by opening (a) Chrome (based) Browser and pressing Ctrl + s
. The dialog window should be in focus.
If all works add devilspie2 to your Startup Applications and it should work the next login.
Step 3: Remore %U
from the desktop launcher of Typora:
Funny enough just removing %U
from Typora's desktop launcher fixes the issues, probably in combination with one of the above steps. The desktop launcher now reads:
[Desktop Entry]
Version=1.1
Type=Application
Name=Typora
GenericName=Markdown Editor
Comment=a minimal Markdown reading & writing app. Change Log: (https://>
Icon=typora
Exec=typora
Actions=
MimeType=text/markdown;text/x-markdown;
Categories=Office;WordProcessor;
StartupNotify=true
These are the work around steps that fixed this annoying issue until the devs get around to the problem.
I hope it helps some of you.