summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@nokia.com>2010-12-15 17:20:14 (GMT)
committerRobert Griebl <robert.griebl@nokia.com>2010-12-15 17:49:45 (GMT)
commit82bbc1c1611bde33680d22a1a3c6449e51d7b0b9 (patch)
tree3ce55de7e52498bfe3d3a4bcb19ebabfa64a5a3f /src/gui/kernel
parent3e0df49f978933b1e4e6b48c695bf813ec9a2828 (diff)
downloadQt-82bbc1c1611bde33680d22a1a3c6449e51d7b0b9.zip
Qt-82bbc1c1611bde33680d22a1a3c6449e51d7b0b9.tar.gz
Qt-82bbc1c1611bde33680d22a1a3c6449e51d7b0b9.tar.bz2
Resolve XRRSizes() from libxrandr for QScroller's DPI calculation.
Reviewed-by: Denis Dzyubenko
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_x11.cpp3
-rw-r--r--src/gui/kernel/qt_x11_p.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index ff98229..58ccda2 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -2015,12 +2015,15 @@ void qt_init(QApplicationPrivate *priv, int,
(PtrXRRRootToScreen) xrandrLib.resolve("XRRRootToScreen");
X11->ptrXRRQueryExtension =
(PtrXRRQueryExtension) xrandrLib.resolve("XRRQueryExtension");
+ X11->ptrXRRSizes =
+ (PtrXRRSizes) xrandrLib.resolve("XRRSizes");
}
# else
X11->ptrXRRSelectInput = XRRSelectInput;
X11->ptrXRRUpdateConfiguration = XRRUpdateConfiguration;
X11->ptrXRRRootToScreen = XRRRootToScreen;
X11->ptrXRRQueryExtension = XRRQueryExtension;
+ X11->ptrXRRSizes = XRRSizes;
# endif
if (X11->ptrXRRQueryExtension
diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h
index 56c8094..d97264c 100644
--- a/src/gui/kernel/qt_x11_p.h
+++ b/src/gui/kernel/qt_x11_p.h
@@ -226,6 +226,7 @@ typedef void (*PtrXRRSelectInput)(Display *, Window, int);
typedef int (*PtrXRRUpdateConfiguration)(XEvent *);
typedef int (*PtrXRRRootToScreen)(Display *, Window);
typedef Bool (*PtrXRRQueryExtension)(Display *, int *, int *);
+typedef XRRScreenSize *(*PtrXRRSizes)(Display *, int, int *);
#endif // QT_NO_XRANDR
#ifndef QT_NO_XINPUT
@@ -710,6 +711,7 @@ struct QX11Data
PtrXRRUpdateConfiguration ptrXRRUpdateConfiguration;
PtrXRRRootToScreen ptrXRRRootToScreen;
PtrXRRQueryExtension ptrXRRQueryExtension;
+ PtrXRRSizes ptrXRRSizes;
#endif // QT_NO_XRANDR
};