Skip to content

fix(dialog): Remove Linux specific code for rfd 0.14 compatibility#1033

Merged
amrbashir merged 1 commit into
v2from
dialog-linux
Mar 6, 2024
Merged

fix(dialog): Remove Linux specific code for rfd 0.14 compatibility#1033
amrbashir merged 1 commit into
v2from
dialog-linux

Conversation

@FabianLars
Copy link
Copy Markdown
Member

fixes #956

After PolyMeilex/rfd#152 it always freezes the app since we already have a gtk main loop running and try to run the dialog on it too. Since gtk allows to have multiple gtk event loops in the same app, as long as they run in seperate threads, i removed our special handling and let rfd spawn its own loop (see pr linked above). From my testing this works fine and allows us to keep upgrading rfd instead of locking it to 0.12(?).

@FabianLars FabianLars requested a review from a team as a code owner March 6, 2024 17:03
@amrbashir amrbashir merged commit 16fc0f2 into v2 Mar 6, 2024
@amrbashir amrbashir deleted the dialog-linux branch March 6, 2024 17:38
@valadaptive
Copy link
Copy Markdown

Hi,

I just stumbled upon this. It seems my PR to rfd has created a lot of unintended effects for those who use it, and I'm curious where exactly GTK documents that it's safe to run multiple event loops in the same app.

The quote in PolyMeilex/rfd#152 comes from documentation that's no longer online, but I can't seem to find any other documentation that says that GTK can be run on multiple threads as long as they don't interact. If you could point me to such documentation, I may be able to create another PR to rfd.

@FabianLars
Copy link
Copy Markdown
Member Author

I can't remember if i based this on gtk docs or just on forum discussions (example, just for glib though) and our own testing tbh :/
I do remember reading though gmaincontext / glib loop docs too (which of course does not guarantee that gtk behaves the same), but those aren't really explicit about it either, for example:

To allow multiple independent sets of sources to be handled in different threads, each source is associated with a GMainContext.

In the 3 months since this was merged this did not cause a single issue that we're aware of so we're fairly confident.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dialog][v2][linux] Any blocking dialog does not display properly when running on Linux

3 participants