gmain: Officially deprecate g_main_context_wait()

It’s been de-facto deprecated for a long time, due to emitting a
critical warning when used in a non-internal context. Make that official
in the documentation and with a deprecation annotation.

Split the implementation into an internal helper and an external
wrapper, so the two remaining internal uses don’t emit deprecation

Signed-off-by: Philip Withnall <>

7 jobs for 903-deprecate-main-context-wait in 16 minutes and 31 seconds (queued for 9 minutes)