|
@@ -1,66 +1,12 @@
|
1
|
|
-#include "maindialog.h"
|
2
|
1
|
#include <QApplication>
|
3
|
|
-#include <QTextCodec>
|
4
|
|
-#include <QWindow>
|
5
|
|
-#include <QDebug>
|
6
|
|
-#include <QTimer>
|
|
2
|
+#include "maindialog.h"
|
7
|
3
|
|
8
|
4
|
|
9
|
5
|
int main(int argc, char *argv[])
|
10
|
6
|
{
|
11
|
7
|
QApplication a(argc, argv);
|
12
|
|
-// QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
13
|
|
-// QTextCodec::setCodecForTr(QTextCodec::codecForCStrings());
|
14
|
8
|
MainDialog w;
|
15
|
9
|
w.show();
|
16
|
10
|
|
17
|
|
-// Display *dpy;
|
18
|
|
-// Window rootWindow;
|
19
|
|
-// Window parent;
|
20
|
|
-// Window *children;
|
21
|
|
-// Window *child;
|
22
|
|
-// unsigned long noOfChildren;
|
23
|
|
-
|
24
|
|
-// dpy = XOpenDisplay(NULL);
|
25
|
|
-// if (!dpy) {
|
26
|
|
-// return 7;
|
27
|
|
-// }
|
28
|
|
-// rootWindow = RootWindow(dpy, -1);
|
29
|
|
-
|
30
|
|
-
|
31
|
|
-// children = (Window*)get_client_list(dpy, &noOfChildren);
|
32
|
|
-
|
33
|
|
-//// XQueryTree(dpy, rootWindow, &rootWindow, &parent, &children, &noOfChildren);
|
34
|
|
-// for (int i = 0; i < noOfChildren; ++i) {
|
35
|
|
-// char* nameStr;
|
36
|
|
-// XFetchName(dpy, children[i], &nameStr);
|
37
|
|
-// QString name(nameStr);
|
38
|
|
-// XFree(nameStr);
|
39
|
|
-// if (name.startsWith("rdesktop - ")) {
|
40
|
|
-//// if (name.startsWith("robin@gigi-lt1: /tmp")) {
|
41
|
|
-// qDebug() << name;
|
42
|
|
-// QWindow *window = QWindow::fromWinId(children[i]);
|
43
|
|
-// window->setFlags(Qt::FramelessWindowHint);
|
44
|
|
-
|
45
|
|
-// QWidget *widget = QWidget::createWindowContainer(window);
|
46
|
|
-//// QEvent e(QEvent::EmbeddingControl);
|
47
|
|
-//// QApplication::sendEvent(widget, &e);
|
48
|
|
-//// widget->show();
|
49
|
|
-//// QTimer* timer = new QTimer(widget);
|
50
|
|
-//// QObject::connect(timer, SIGNAL(timeout()), widget, SLOT(update()));
|
51
|
|
-//// timer->start(100);
|
52
|
|
-// break;
|
53
|
|
-// }
|
54
|
|
-// }
|
55
|
|
-
|
56
|
|
-//// QWindow *window = QWindow::fromWinId(0x0340056f);
|
57
|
|
-//// window->setFlags(Qt::FramelessWindowHint);
|
58
|
|
-
|
59
|
|
-//// QWidget *widget = QWidget::createWindowContainer(window);
|
60
|
|
-
|
61
|
|
-//// QVBoxLayout *layout = new QVBoxLayout(this);
|
62
|
|
-//// layout->addWidget(widget);
|
63
|
|
-//// this->setLayout(layout);
|
64
|
|
-
|
65
|
11
|
return a.exec();
|
66
|
12
|
}
|