[libwnck] utils: fix compilation warning (thus error) if XRes is missing
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck] utils: fix compilation warning (thus error) if XRes is missing
- Date: Wed, 28 Jun 2017 23:38:42 +0000 (UTC)
commit edaaa25ab65e95fdaae324e8e06be99594d60387
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Thu Jun 29 01:31:01 2017 +0200
utils: fix compilation warning (thus error) if XRes is missing
libwnck/util.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/libwnck/util.c b/libwnck/util.c
index 7ee54fa..d90f585 100644
--- a/libwnck/util.c
+++ b/libwnck/util.c
@@ -106,18 +106,17 @@ _wnck_print_resource_usage (WnckResourceUsage *usage)
static WnckExtStatus
wnck_init_resource_usage (GdkDisplay *gdisplay)
{
- int event, error;
- Display *xdisplay;
WnckExtStatus status;
- xdisplay = GDK_DISPLAY_XDISPLAY (gdisplay);
-
status = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (gdisplay),
"wnck-xres-status"));
if (status == WNCK_EXT_UNKNOWN)
{
#ifdef HAVE_XRES
+ Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdisplay);
+ int event, error;
+
if (!XResQueryExtension (xdisplay, &event, &error))
status = WNCK_EXT_MISSING;
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]