Ejemplo n.º 1
0
void ScreenModeChecker::enable()
{
	if (isDummy())
		return;

	if (!FullScreenCheckTimer)
		FullScreenCheckTimer = new QTimer(this);

	FullScreenCheckTimer->setInterval(FULLSCREENCHECKTIMER_INTERVAL);
	connect(FullScreenCheckTimer, SIGNAL(timeout()), this, SLOT(checkFullScreen()));
	FullScreenCheckTimer->start();
}
Ejemplo n.º 2
0
/// Implementation of the IProviderPlugin::subscribe function. If the
/// fullscreen property was subscribed to, initiate the needed X
/// things (e.g., start listening to root window events) and emit
/// subscribeFinished.
void SessionStatePlugin::subscribe(QSet<QString> keys)
{
    // Check for invalid keys
    foreach (const QString& key, keys) {
        if (key != sessionStateKey) {
            emit subscribeFailed(key, "Invalid key");
        }
    }

    if (keys.contains(sessionStateKey)) {

        checkFullScreen(); // This also queues the valueChanged signal

        // Now the value is there; signal that the subscription is done.
        emit subscribeFinished(sessionStateKey);

        // Start listening to changes in the client list
        XSelectInput(dpy, DefaultRootWindow(dpy), PropertyChangeMask);
        XFlush(dpy);

        // Start listening to the screen blanking status
        screenBlanked.subscribe();
    }
}
Ejemplo n.º 3
0
void OpenGLDisplay::renderMenu()
{
	checkFullScreen();
	if( theApp.m_pMainWnd )
		theApp.m_pMainWnd->DrawMenuBar();
}