Back to index

kdeartwork  4.3.2
saver.cpp
Go to the documentation of this file.
00001 #include <kapplication.h>
00002 #include <kglobal.h>
00003 #include <k3process.h>
00004 #include <klocale.h>
00005 #include <kstandarddirs.h>
00006 #include <X11/Xlib.h>
00007 #include <QX11Info>
00008 
00009 #include "saver.h"
00010 #include "saver.moc"
00011 
00012 //-----------------------------------------------------------------------------
00013 kScreenSaver::kScreenSaver(Drawable drawable) : QObject()
00014 {
00015        Window root;
00016        int ai;
00017        unsigned int au;
00018 
00019        mDrawable = drawable;
00020        mGc = XCreateGC(QX11Info::display(), mDrawable, 0, 0);
00021        XGetGeometry(QX11Info::display(), mDrawable, &root, &ai, &ai,
00022               &mWidth, &mHeight, &au, &au); 
00023 }
00024 
00025 kScreenSaver::~kScreenSaver()
00026 {
00027        XFreeGC(QX11Info::display(), mGc);
00028 }
00029 
00030 //-----------------------------------------------------------------------------
00031 
00032