VirtualBox

Ignore:
Timestamp:
Mar 28, 2018 3:35:23 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9049: Small cleanup for VBoxX11Helper stuff.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp

    r69500 r71544  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - X11 helpers..
     3 * VBox Qt GUI - VBox X11 helper functions.
    44 */
    55
    66/*
    7  * Copyright (C) 2008-2017 Oracle Corporation
     7 * Copyright (C) 2008-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1717
    1818/* Qt includes: */
     19#include <QString>
    1920#include <QX11Info>
    20 #include <QString>
    2121
    2222/* GUI includes: */
     
    2626#include <iprt/cdefs.h>
    2727
    28 /* rhel3 build hack */
     28// WORKAROUND:
     29// rhel3 build hack
    2930RT_C_DECLS_BEGIN
    3031#include <X11/Xatom.h>
     
    3233#include <X11/extensions/dpms.h>
    3334RT_C_DECLS_END
     35
    3436
    3537static int  gX11ScreenSaverTimeout;
     
    108110{
    109111    int     dummy;
    110     Display *display = QX11Info::display();
    111     gX11ScreenSaverDpmsAvailable = DPMSQueryExtension(display, &dummy, &dummy);
     112    Display *pDisplay = QX11Info::display();
     113    gX11ScreenSaverDpmsAvailable = DPMSQueryExtension(pDisplay, &dummy, &dummy);
    112114}
    113115
     
    125127    int     dummy;
    126128    CARD16  dummy2;
    127     Display *display = QX11Info::display();
     129    Display *pDisplay = QX11Info::display();
    128130
    129     XGetScreenSaver(display, &gX11ScreenSaverTimeout, &dummy, &dummy, &dummy);
     131    XGetScreenSaver(pDisplay, &gX11ScreenSaverTimeout, &dummy, &dummy, &dummy);
    130132    if (gX11ScreenSaverDpmsAvailable)
    131         DPMSInfo(display, &dummy2, &gX11DpmsState);
     133        DPMSInfo(pDisplay, &dummy2, &gX11DpmsState);
    132134}
    133135
    134136void X11ScreenSaverSettingsRestore()
    135137{
    136     int     timeout, interval, preferBlank, allowExp;
    137     Display *display = QX11Info::display();
     138    int     iTimeout, iInterval, iPreferBlank, iAllowExp;
     139    Display *pDisplay = QX11Info::display();
    138140
    139     XGetScreenSaver(display, &timeout, &interval, &preferBlank, &allowExp);
    140     timeout = gX11ScreenSaverTimeout;
    141     XSetScreenSaver(display, timeout, interval, preferBlank, allowExp);
     141    XGetScreenSaver(pDisplay, &iTimeout, &iInterval, &iPreferBlank, &iAllowExp);
     142    iTimeout = gX11ScreenSaverTimeout;
     143    XSetScreenSaver(pDisplay, iTimeout, iInterval, iPreferBlank, iAllowExp);
    142144
    143145    if (gX11DpmsState && gX11ScreenSaverDpmsAvailable)
    144         DPMSEnable(display);
     146        DPMSEnable(pDisplay);
    145147}
    146148
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h

    r69500 r71544  
    55
    66/*
    7  * Copyright (C) 2006-2017 Oracle Corporation
     7 * Copyright (C) 2006-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1919#define ___VBoxX11Helpers_h___
    2020
     21
    2122/** X11: Known Window Manager types. */
    2223enum X11WMType
     
    3031    X11WMType_Xfwm4,
    3132};
     33
    3234
    3335/** X11: Determines and returns whether the compositing manager is running. */
     
    4446void X11ScreenSaverSettingsRestore();
    4547
     48
    4649#endif /* !___VBoxX11Helpers_h___ */
    4750
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette