[mythtv] [patch] Screen saver X calls always made from main thread

Anduin Withers awithers at anduin.com
Mon Mar 15 04:33:19 EST 2004

I liked the screen saver feature. I've attached a patch which should address
the reason the code was disabled. Now the original functions post an event
to the main window, the event is processed when the main window executes its
event loop.

- The hunk to settings.pro may not apply cleanly, my local copy has a few
extra lines.
- The QWS check could be removed in favor of the ENABLE_SCREEN_SAVER define,
I didn't do it though.

Anduin Withers

-------------- next part --------------
#include <qapplication.h>
#include "ssevent.h"

const int kScreenSaverEventType = 23425;
-------------- next part --------------
#ifndef SSEVENT_H_1079302342
#define SSEVENT_H_1079302342

extern const int kScreenSaverEventType;

class ScreenSaverEvent : public QCustomEvent
    enum ScreenSaverEventType {ssetDisable, ssetRestore, ssetReset};

    ScreenSaverEvent(ScreenSaverEventType type) :
            QCustomEvent(kScreenSaverEventType), sset(type)

    ScreenSaverEventType getSSEventType()
        return sset;

    ScreenSaverEventType sset;

#endif //SSEVENT_H_1079302342
-------------- next part --------------
A non-text attachment was scrubbed...
Name: myth_screensaver_thread.patch
Type: application/octet-stream
Size: 5581 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040315/b3c8a985/myth_screensaver_thread.obj

More information about the mythtv-dev mailing list