Skip to content

Commit

Permalink
background: Don't spam the logs
Browse files Browse the repository at this point in the history
Only warn once if we don't find the shell api.

Closes: flatpak/xdg-desktop-portal-gtk#215
  • Loading branch information
Matthias Clasen committed Sep 18, 2019
1 parent 96c4381 commit a3fd03f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/background.c
Expand Up @@ -462,7 +462,14 @@ get_app_states (void)

if (!xdp_impl_background_call_get_app_state_sync (background_impl, &apps, NULL, &error))
{
g_warning ("Failed to get application states: %s", error->message);
static int warned = 0;

if (!warned)
{
g_warning ("Failed to get application states: %s", error->message);
warned = 1;
}

return NULL;
}

Expand Down

0 comments on commit a3fd03f

Please sign in to comment.