summaryrefslogtreecommitdiffstats
path: root/kscreensaver/xsavers/saver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kscreensaver/xsavers/saver.cpp')
-rw-r--r--kscreensaver/xsavers/saver.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/kscreensaver/xsavers/saver.cpp b/kscreensaver/xsavers/saver.cpp
new file mode 100644
index 00000000..b905d619
--- /dev/null
+++ b/kscreensaver/xsavers/saver.cpp
@@ -0,0 +1,31 @@
+#include <kapplication.h>
+#include <kglobal.h>
+#include <kprocess.h>
+#include <klocale.h>
+#include <kstandarddirs.h>
+#include <X11/Xlib.h>
+
+#include "saver.h"
+#include "saver.moc"
+
+//-----------------------------------------------------------------------------
+kScreenSaver::kScreenSaver(Drawable drawable) : QObject()
+{
+ Window root;
+ int ai;
+ unsigned int au;
+
+ mDrawable = drawable;
+ mGc = XCreateGC(qt_xdisplay(), mDrawable, 0, 0);
+ XGetGeometry(qt_xdisplay(), mDrawable, &root, &ai, &ai,
+ &mWidth, &mHeight, &au, &au);
+}
+
+kScreenSaver::~kScreenSaver()
+{
+ XFreeGC(qt_xdisplay(), mGc);
+}
+
+//-----------------------------------------------------------------------------
+
+