summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--facetracknoir/main.cpp11
2 files changed, 5 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a0207df4..bc734e43 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -536,8 +536,6 @@ endif()
winmm
uuid
)
- else()
- target_link_libraries(opentrack X11)
endif()
if(MSVC)
SET_TARGET_PROPERTIES(opentrack PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup")
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp
index 25da2961..78ea9aea 100644
--- a/facetracknoir/main.cpp
+++ b/facetracknoir/main.cpp
@@ -33,24 +33,23 @@
#if defined(_WIN32)
# include <windows.h>
//#pragma comment(linker, "/SUBSYSTEM:console /ENTRY:mainCRTStartup")
-#elif defined(Q_OS_UNIX)
-#include <X11/Xlib.h>
#endif
int main(int argc, char** argv)
{
-#if defined(Q_WS_X11)
- XInitThreads();
-#endif
+ QApplication::setAttribute(Qt::AA_X11InitThreads, true);
+
QApplication app(argc, argv);
+
QFont font;
font.setFamily(font.defaultFamily());
font.setPointSize(9);
font.setStyleStrategy(QFont::PreferAntialias);
app.setFont(font);
- FaceTrackNoIR w;
+ FaceTrackNoIR w;
QDesktopWidget desktop;
+
w.move(desktop.screenGeometry().width()/2-w.width()/2, 100);
w.show();
qApp->exec();