~ubuntu-branches/ubuntu/precise/kde-workspace/precise-security

« back to all changes in this revision

Viewing changes to powerdevil/daemon/backends/upower/xrandrbrightness.cpp

Tags: upstream-4.7.2
Import upstream version 4.7.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include "xrandrbrightness.h"
21
21
 
 
22
#include <config-X11.h>
 
23
 
22
24
#include <stdio.h>
23
25
#include <stdlib.h>
24
26
 
53
55
        return;
54
56
    }
55
57
 
56
 
    if (minor > 2)
 
58
#ifdef HAS_RANDR_1_3
 
59
    if (minor > 2) {
57
60
        m_resources = XRRGetScreenResourcesCurrent(QX11Info::display(), QX11Info::appRootWindow()); // version 1.3, faster version
58
 
    else
 
61
    } else
 
62
#endif
 
63
    {
59
64
        m_resources = XRRGetScreenResources(QX11Info::display(), QX11Info::appRootWindow());
 
65
    }
60
66
 
61
67
    if (!m_resources)
62
68
    {