Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/kernel/qdesktopwidget_s60.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    104104    rects->resize(QDesktopWidgetPrivate::screenCount);
    105105    workrects->resize(QDesktopWidgetPrivate::screenCount);
     106
     107    (*rects)[0].setRect(0, 0, S60->screenWidthInPixels, S60->screenHeightInPixels);
     108    QRect wr = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect());
     109    (*workrects)[0].setRect(wr.x(), wr.y(), wr.width(), wr.height());
    106110}
    107111
     
    147151}
    148152
    149 const QRect QDesktopWidget::availableGeometry(int /* screen */) const
    150 {
    151     TRect clientRect = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
    152     return qt_TRect2QRect(clientRect);
    153 }
    154 
    155 const QRect QDesktopWidget::screenGeometry(int /* screen */) const
     153const QRect QDesktopWidget::availableGeometry(int screen) const
    156154{
    157155    Q_D(const QDesktopWidget);
    158     return QRect(0, 0, S60->screenWidthInPixels, S60->screenHeightInPixels);
    159     }
     156    if (screen < 0 || screen >= d->screenCount)
     157        screen = d->primaryScreen;
     158
     159    return d->workrects->at(screen);
     160}
     161
     162const QRect QDesktopWidget::screenGeometry(int screen) const
     163{
     164    Q_D(const QDesktopWidget);
     165    if (screen < 0 || screen >= d->screenCount)
     166        screen = d->primaryScreen;
     167
     168    return d->rects->at(screen);
     169}
    160170
    161171int QDesktopWidget::screenNumber(const QWidget * /* widget */) const
Note: See TracChangeset for help on using the changeset viewer.