Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
gtk: drop MainContext check
Browse files Browse the repository at this point in the history
there's no need to ensure we are initializing gtk on the main thread
if gtk was not initialized yet
  • Loading branch information
bilelmoussaoui committed May 21, 2021
1 parent 22d3c21 commit df0dc79
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions gtk/src/rt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ pub fn init() -> Result<(), glib::BoolError> {
let argv = ::std::env::args().take(1).collect::<Vec<_>>();

if from_glib(ffi::gtk_init_check(&mut 1, &mut argv.to_glib_none().0)) {
if !glib::MainContext::default().is_owner() {
return Err(glib::bool_error!("Failed to acquire default main context"));
}

set_initialized();
Ok(())
} else {
Expand Down

0 comments on commit df0dc79

Please sign in to comment.