diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gpm-brightness.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpm-brightness.c b/src/gpm-brightness.c index 8600474..686f676 100644 --- a/src/gpm-brightness.c +++ b/src/gpm-brightness.c @@ -846,7 +846,12 @@ gpm_brightness_update_cache (GpmBrightness *brightness) } root = RootWindow (brightness->priv->dpy, screen); + + gdk_error_trap_push (); resource = XRRGetScreenResourcesCurrent (brightness->priv->dpy, root); + if (gdk_error_trap_pop () || resource == NULL) { + egg_warning ("failed to XRRGetScreenResourcesCurrent"); + } if (resource != NULL) { egg_debug ("adding resource %p", resource); |