blob: be9d1792595509fd840f2610c5eaad140be02c5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
* Copyright (c) 2010 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#include "QtUtilities.h"
#include <QWidget>
#ifdef Q_WS_X11
#include <QX11Info>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#endif
#include "Swift/Controllers/ApplicationInfo.h"
namespace QtUtilities {
void setX11Resource(QWidget* widget, const QString& c) {
#ifdef Q_WS_X11
char res_class[] = SWIFT_APPLICATION_NAME;
XClassHint hint;
hint.res_name = (QString(SWIFT_APPLICATION_NAME) + "-" + c).toUtf8().data();
hint.res_class = res_class;
XSetClassHint(widget->x11Info().display(), widget->winId(), &hint);
#else
(void) widget;
(void) c;
#endif
}
}
|