~ubuntu-branches/ubuntu/wily/psi/wily-proposed

« back to all changes in this revision

Viewing changes to src/libpsi/tools/idle/idle_x11.cpp

  • Committer: Package Import Robot
  • Author(s): Jan Niehusmann
  • Date: 2014-07-01 21:49:34 UTC
  • mfrom: (6.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20140701214934-gt4dkgm94byi4vnn
Tags: 0.15-1
* New upstream version
* set debhelper compat level to 9
* set Standards-Version to 3.9.5 (no further changes)
* add lintian override regarding license-problem-non-free-RFC
* use qconf to regenerate configure script
* implement hardening using buildflags instead of hardening-wrapper

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 *
15
15
 * You should have received a copy of the GNU Lesser General Public
16
16
 * License along with this library; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 *
19
19
 */
20
20
 
29
29
 
30
30
#else
31
31
 
32
 
#include <qapplication.h>
 
32
#include <QApplication>
33
33
#include <QDesktopWidget>
34
34
#include <QX11Info>
35
35
 
79
79
        old_handler = XSetErrorHandler(xerrhandler);
80
80
 
81
81
        int event_base, error_base;
82
 
        if(XScreenSaverQueryExtension(QApplication::desktop()->screen()->x11Display(), &event_base, &error_base)) {
 
82
        if(XScreenSaverQueryExtension(QX11Info::display(), &event_base, &error_base)) {
83
83
                d->ss_info = XScreenSaverAllocInfo();
84
84
                return true;
85
85
        }
90
90
{
91
91
        if(!d->ss_info)
92
92
                return 0;
93
 
        if(!XScreenSaverQueryInfo(QApplication::desktop()->screen()->x11Display(), QX11Info::appRootWindow(), d->ss_info))
 
93
        if(!XScreenSaverQueryInfo(QX11Info::display(), QX11Info::appRootWindow(), d->ss_info))
94
94
                return 0;
95
95
        return d->ss_info->idle / 1000;
96
96
}