Changeset 651 for trunk/src/gui/kernel/qapplication_s60.cpp
- Timestamp:
- Mar 8, 2010, 12:52:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.2 (added) merged: 650 /branches/vendor/nokia/qt/current merged: 649 /branches/vendor/nokia/qt/4.6.1 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/kernel/qapplication_s60.cpp
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 20 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 72 72 # endif 73 73 # include <private/qs60mainapplication_p.h> 74 74 75 #endif 75 76 … … 808 809 void QSymbianControl::Draw(const TRect& controlRect) const 809 810 { 811 812 813 814 815 816 817 818 819 820 821 822 810 823 QWindowSurface *surface = qwidget->windowSurface(); 811 824 QPaintEngine *engine = surface ? surface->paintDevice()->paintEngine() : NULL; … … 856 869 Q_ASSERT(false); 857 870 } 858 } else {859 surface->flush(qwidget, QRegion(qt_TRect2QRect(backingStoreRect)), QPoint());860 871 } 861 872 … … 917 928 qwidget->data->crect = cr; 918 929 QTLWExtra *top = qwidget->d_func()->maybeTopData(); 919 if (top )920 top->normalGeometry = cr;930 if (top) 931 top->normalGeometry; 921 932 if (qwidget->isVisible()) { 922 933 QMoveEvent e(newPos, oldPos); … … 931 942 void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) 932 943 { 933 if (m_ignoreFocusChanged )944 if (m_ignoreFocusChanged) 934 945 return; 935 946 … … 953 964 qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle()); 954 965 #ifdef Q_WS_S60 955 // If widget is fullscreen, hide status pane and button container 956 // otherwise show them. 966 // If widget is fullscreen/minimized, hide status pane and button container otherwise show them. 957 967 CEikStatusPane* statusPane = S60->statusPane(); 958 968 CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer(); 959 bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen;960 if (statusPane && (bool)statusPane->IsVisible() == isFullscreen)961 statusPane->MakeVisible( !isFullscreen);962 if (buttonGroup && (bool)buttonGroup->IsVisible() == isFullscreen)963 buttonGroup->MakeVisible( !isFullscreen);969 ; 970 if (statusPane) 971 statusPane->MakeVisible(); 972 if (buttonGroup) 973 buttonGroup->MakeVisible(); 964 974 #endif 965 975 } else if (QApplication::activeWindow() == qwidget->window()) { … … 1198 1208 } 1199 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1200 1228 if (touch) { 1201 1229 QApplicationPrivate::navigationMode = Qt::NavigationModeNone; … … 1522 1550 } 1523 1551 1552 1553 1554 1555 1556 1557 1524 1558 /*! 1525 1559 \warning This function is only available on Symbian. … … 1538 1572 QScopedLoopLevelCounter counter(d->threadData); 1539 1573 1574 1575 1576 1540 1577 QWidget *w = qApp ? qApp->focusWidget() : 0; 1541 1578 if (w) { … … 1550 1587 switch (event->type()) { 1551 1588 case QSymbianEvent::WindowServerEvent: 1552 return d->symbianProcessWsEvent(event ->windowServerEvent());1589 return d->symbianProcessWsEvent(event); 1553 1590 case QSymbianEvent::CommandEvent: 1554 return d->symbianHandleCommand(event ->command());1591 return d->symbianHandleCommand(event); 1555 1592 case QSymbianEvent::ResourceChangeEvent: 1556 return d->symbianResourceChange(event ->resourceChangeType());1593 return d->symbianResourceChange(event); 1557 1594 default: 1558 1595 return -1; … … 1560 1597 } 1561 1598 1562 int QApplicationPrivate::symbianProcessWsEvent(const TWsEvent *event)1599 int QApplicationPrivate::symbianProcessWsEvent(const vent) 1563 1600 { 1564 1601 // Qt event handling. Handle some events regardless of if the handle is in our 1565 1602 // widget map or not. 1603 1566 1604 CCoeControl* control = reinterpret_cast<CCoeControl*>(event->Handle()); 1567 1605 const bool controlInMap = QWidgetPrivate::mapper && QWidgetPrivate::mapper->contains(control); 1568 1606 switch (event->Type()) { 1569 1607 case EEventPointerEnter: 1570 if (controlInMap) 1608 if (controlInMap) { 1609 callSymbianEventFilters(symbianEvent); 1571 1610 return 1; // Qt::Enter will be generated in HandlePointerL 1611 1572 1612 break; 1573 1613 case EEventPointerExit: 1574 1614 if (controlInMap) { 1615 1616 1575 1617 if (S60) { 1576 1618 // mouseEvent outside our window, send leave event to last focused widget … … 1585 1627 break; 1586 1628 case EEventScreenDeviceChanged: 1629 1630 1587 1631 if (S60) 1588 1632 S60->updateScreenSize(); … … 1597 1641 case EEventWindowVisibilityChanged: 1598 1642 if (controlInMap) { 1643 1644 1599 1645 const TWsVisibilityChangedEvent *visChangedEvent = event->VisibilityChanged(); 1600 1646 QWidget *w = QWidgetPrivate::mapper->value(control); … … 1604 1650 delete w->d_func()->topData()->backingStore; 1605 1651 w->d_func()->topData()->backingStore = 0; 1652 1653 1654 1606 1655 } else if ((visChangedEvent->iFlags & TWsVisibilityChangedEvent::EPartiallyVisible) 1607 1656 && !w->d_func()->maybeBackingStore()) { … … 1614 1663 break; 1615 1664 case EEventFocusGained: 1665 1666 1616 1667 #ifndef QT_NO_CURSOR 1617 1668 //re-enable mouse interaction … … 1627 1678 break; 1628 1679 case EEventFocusLost: 1680 1681 1629 1682 #ifndef QT_NO_CURSOR 1630 1683 //disable mouse as may be moving to application that does not support it … … 1678 1731 \sa s60EventFilter(), s60ProcessEvent() 1679 1732 */ 1680 int QApplicationPrivate::symbianHandleCommand( int command)1733 int QApplicationPrivate::symbianHandleCommand() 1681 1734 { 1682 1735 Q_Q(QApplication); 1683 1736 int ret = 0; 1737 1738 1739 1740 1741 1684 1742 1685 1743 switch (command) { … … 1722 1780 KAknsMessageSkinChange are handled. 1723 1781 */ 1724 int QApplicationPrivate::symbianResourceChange( int type)1782 int QApplicationPrivate::symbianResourceChange() 1725 1783 { 1726 1784 int ret = 0; 1785 1786 1727 1787 1728 1788 switch (type) { … … 1730 1790 case KEikDynamicLayoutVariantSwitch: 1731 1791 { 1792 1793 1732 1794 if (S60) 1733 1795 S60->updateScreenSize(); … … 1754 1816 #ifndef QT_NO_STYLE_S60 1755 1817 case KAknsMessageSkinChange: 1818 1819 1756 1820 if (QS60Style *s60Style = qobject_cast<QS60Style*>(QApplication::style())) { 1757 1821 s60Style->d_func()->handleSkinChange();
Note:
See TracChangeset
for help on using the changeset viewer.