summaryrefslogtreecommitdiffstats
path: root/src/gui/embedded/qscreenlinuxfb_qws.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-04-17 12:01:04 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-04-17 12:01:04 (GMT)
commit198efeb27e5c2a87d0a2bb6859446cb1faf45ed8 (patch)
treee4c99e89cbecd2084a87a8c7a5d4877385fcec1c /src/gui/embedded/qscreenlinuxfb_qws.cpp
parentbb2e4df9bee3148e819c98410aa36e22dad95d7a (diff)
parente85867003ca1741f378b1f58f4dd9d48577a5d9b (diff)
downloadQt-198efeb27e5c2a87d0a2bb6859446cb1faf45ed8.zip
Qt-198efeb27e5c2a87d0a2bb6859446cb1faf45ed8.tar.gz
Qt-198efeb27e5c2a87d0a2bb6859446cb1faf45ed8.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-animations
Conflicts: src/gui/graphicsview/qgraphicsitem.cpp
Diffstat (limited to 'src/gui/embedded/qscreenlinuxfb_qws.cpp')
-rw-r--r--src/gui/embedded/qscreenlinuxfb_qws.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gui/embedded/qscreenlinuxfb_qws.cpp b/src/gui/embedded/qscreenlinuxfb_qws.cpp
index fed7aad..48fe881 100644
--- a/src/gui/embedded/qscreenlinuxfb_qws.cpp
+++ b/src/gui/embedded/qscreenlinuxfb_qws.cpp
@@ -342,8 +342,18 @@ bool QLinuxFbScreen::connect(const QString &displaySpec)
}
dw=w;
dh=h;
- xoff += (vinfo.xres - w)/2;
- yoff += (vinfo.yres - h)/2;
+ int xxoff, yyoff;
+ if (sscanf(qwssize, "%*dx%*d+%d+%d", &xxoff, &yyoff) == 2) {
+ if (xxoff < 0 || xxoff + w > vinfo.xres)
+ xxoff = vinfo.xres - w;
+ if (yyoff < 0 || yyoff + h > vinfo.yres)
+ yyoff = vinfo.yres - h;
+ xoff += xxoff;
+ yoff += yyoff;
+ } else {
+ xoff += (vinfo.xres - w)/2;
+ yoff += (vinfo.yres - h)/2;
+ }
} else {
dw=w=vinfo.xres;
dh=h=vinfo.yres;