diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-08-11 14:42:48 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-08-18 12:55:03 +0200 |
commit | 6efa8cd70aedf13edef9143eb57b52bd175fb748 (patch) | |
tree | 569d6fff00417948c6ca2be7880d195b79340b46 /src/plugins/platforms/xcb/qxcbnativeinterface.cpp | |
parent | 20c14d87f248ca3d5aa42119df01105bbaaadc85 (diff) |
Support antialias and rgba Xft settings as used by GNOME and UNITY
We only parsed the hintstyle from the Xft settings. This patch adds
parsing for also subpixel style and disabling antialiasing.
Task-number: QTBUG-27106
Change-Id: Icdb88ccc10e50d76eb30a5b126bee7590e257022
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index 5673d41811..a00da04c26 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -85,7 +85,8 @@ static int resourceType(const QByteArray &key) QByteArrayLiteral("appusertime"), QByteArrayLiteral("hintstyle"), QByteArrayLiteral("startupid"), QByteArrayLiteral("traywindow"), QByteArrayLiteral("gettimestamp"), QByteArrayLiteral("x11screen"), - QByteArrayLiteral("rootwindow") + QByteArrayLiteral("rootwindow"), + QByteArrayLiteral("subpixeltype"), QByteArrayLiteral("antialiasingEnabled") }; const QByteArray *end = names + sizeof(names) / sizeof(names[0]); const QByteArray *result = std::find(names, end, key); @@ -277,6 +278,12 @@ void *QXcbNativeInterface::nativeResourceForScreen(const QByteArray &resource, Q case ScreenHintStyle: result = reinterpret_cast<void *>(xcbScreen->hintStyle() + 1); break; + case ScreenSubpixelType: + result = reinterpret_cast<void *>(xcbScreen->subpixelType() + 1); + break; + case ScreenAntialiasingEnabled: + result = reinterpret_cast<void *>(xcbScreen->antialiasingEnabled() + 1); + break; case TrayWindow: if (QXcbSystemTrayTracker *s = systemTrayTracker(screen)) result = (void *)quintptr(s->trayWindow()); |