summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_s60.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Show softkeys when opening a dialog that has a fullscreen parent.Miikka Heikkinen2011-03-291-10/+34
| | | | | | | | | Now shows the CBA for each window that defines softkeys even if topmost parent is fullscreen. Task-number: QTBUG-4953 Reviewed-by: Sami Merila (cherry picked from commit 5a6acc0ba1ed3b056f4c7a9c37481f4cb347a352)
* Change to release license header.Jason McDonald2011-02-161-13/+13
| | | | Reviewed-by: Trust Me
* Worked around a SC issue in S60 3.x vs 5.0 versions.axis2011-02-151-1/+13
| | | | | | Task: QTBUG-16578 RevBy: Gareth Stockwell (cherry picked from commit 984bc6626c4f290572ac721fd10edda99691306f)
* Fixed a bug where the softkeys would leave a see-through "hole".axis2011-02-091-0/+13
| | | | | | | | | | | | | | | | | | | In cases where the widget was created from the event loop instead of main(), the middle three softkeys would not get the right visibility and would leave a "hole" in the application where one could see what was beneath it. It could also be clicked, which would bring the app to the background which was really annoying. Fixed by setting the visibility manually upon creation. It should still be possible to alter the visibility of the toolbar manually after the widget creation, if someone requires that. Task: QTBUG-16578 RevBy: Gareth Stockwell AutoTest: N/A, but tested with various combinations of fullscreen, non-fullscreen and softkey visibility modes. No regressions. (cherry picked from commit 231dcfc8b6a90c3a0ab4869e0a9ab45403fd9a8c)
* Fix native child window Symbian decoration handling.Jani Hautakangas2011-02-091-9/+15
| | | | | | | | | Resizing native child window like QVideoWidget caused S60 cba and status pane to appear. Task-number: QTBUG-17040 Reviewed-by: Gareth Stockwell (cherry picked from commit 9ae73fcd011e26c920f91cf0b609f051c14920a8)
* Setting WA_TranslucentBackground after winid() is ineffective on Symbian.Jani Hautakangas2011-01-121-0/+8
| | | | | | | | | | | Currently Symbian doesn't support semi-transparent EGL surfaces. WA_TranslucentBackground attribute is ineffective if set after EGL surface creation. To enable translucency in this case we need to recreate backing store to get raster surface which supports translucency. Task-number: QT-4416 Reviewed-by: Jason Barron (cherry picked from commit d62e9f4a6fe199ae790b1561fd4ba9ea84bd4d1e)
* Update copyright year to 2011.Jason McDonald2011-01-111-1/+1
| | | | | Reviewed-by: Trust Me (cherry picked from commit ac5c099cc3c5b8c7eec7a49fdeb8a21037230350)
* Minor optimizationMiikka Heikkinen2010-12-131-2/+2
| | | | | | Use already defined factory pointer instead of re-asking it twice. Reviewed-by: Janne Koskinen
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-11-191-2/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: (21 commits) Fixed handling of QInputMethodEvents with nonzero replacementLength. Fixed namespace issues related to epocroot.cpp Corrected ASCII comparison and removed extra braces Add symbian scope for qfiledialog_symbian.cpp Resolve EPOCROOT in qt.conf using same logic as in .pro Make epocroot resolving compatible with more build environments Fix for QtOpenGL RVCT4 compilation error Removed extra cpp and done changes based on comments Correct flags for Symbian file dialogs Fix for WServ 64 crash on Symbian. Use include(original mkspec) instead of copying of mkspec to default Fixed code style of d92cbfc5, reported by git push. Switched qdesktopservices to use SchemeHandler for Symbian^3 and later. Removed unnecessary Q_OS_SYMBIAN flags from qdesktopservices_s60.cpp. Documented usage of dialogs on Symbian Native file dialog on Symbian^3 Add Location as self signable capability in patch_capabilities.pl Localize .loc and .pkg content based on TRANSLATIONS Bump Qt version to 4.7.2. SSL: Fix for systemCaCertificates being called first on symbian ...
| * Fix for WServ 64 crash on Symbian.Jani Hautakangas2010-11-171-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | Crash happens if application first sets WA_OpaquePaintEvent flag and then sets WA_TranslucentBackground flag. In that case WA_TranslucentBackground flag is ineffective leading to situation where Qt Symbian adaptation tries to reset native window transparency but because native window is already opaque due to WA_OpaquePaintEvent, WServ 64 crash occurs. Task-number: QTBUG-15369 Reviewed-by: Jason Barron
* | Doc: Fixing typoSergio Ahumada2010-11-161-1/+1
|/
* Suppress call to controlVisibilityChanged for null control pointerGareth Stockwell2010-10-261-1/+2
| | | | | | | | | | At this point, old_winid may be null. Passing a null pointer to controlVisibilityChanged is actually a no-op, due to the 'QWidgetPrivate::mapper->contains(control)' check, but suppressing the function call altogether clarifies the intent of the code slightly. Reviewed-by: Jason Barron
* Fixed many spelling errors.Rohan McGovern2010-10-251-1/+1
|
* Implemented Qt::WA_ShowWithoutActivating for Symbian.Janne Anttila2010-10-151-1/+1
| | | | | Task-number: QTBUG-14476 Reviewed-by: Jason Barron
* Fix crash when using Q_GLOBAL_STATIC(QWidget...)Jason Barron2010-10-071-1/+2
| | | | | | | | | | | | | | If Q_GLOBAL_STATIC is used with a QWidget (or subclass) then the destructor of QWidget will be executed after the destructor of QApplication. Since ~QApplication() destroys the S60 environment and the trap handler, we need to be sure that if QApplication is destroyed, we do not attempt to use anything from the S60 environment. This includes RWsSession and the trap handler. The fix is to avoid flushing the WSERV buffer if QApplication has been deleted already. Reviewed-by: axis
* Removed the need for S60main.rsc resource file in Symbian.Janne Anttila2010-10-071-3/+22
| | | | | | | | | | | | | | | | | Qt upgrade was failing since the s60main.rsc is being locked by S60 application framework. And when installer detects that old version of Qt has already been installed it first tries to uninstall the old one and then install the new one. The uninstallion failed since the file was locked by the running Qt application. It should be noted that this patch fixes the Qt upgradibility only for Qt versions where patch is included. I.e. the versions before 4.7.2 need a different mechanism to be upgradable. This different mechanism is based on partial upgrade SIS packages as described in QT-4052. Task-number: QT-3471 Reviewed-by: Axis
* Fix incorrect dialog positioning on SymbianGareth Stockwell2010-09-141-1/+1
| | | | | | Task-number: QT-3900 Reviewed-by: Jason Barron Reviewed-by: Sami Merila
* Update QDesktopWidget geometry when S60 furniture visibility changesGareth Stockwell2010-09-021-2/+4
| | | | | Task-number: QTBUG-13204 Reviewed-by: axis
* Enabling AdvancedPointerEvents for active windows causes a panicSami Merila2010-08-251-3/+6
| | | | | | | | | | | | | | | | | | | In Symbian port of Qt, widgets that have attribute WA_AcceptTouchEvents, are tried to set as enabled for "advanced pointer events". These are multitouch events. However, the event enablation cannot be done after a window has been activated. Current implementation causes a crash in certain cases. For example, a treewidget that is inside a inactive tab page, causes a crash when tab page is selected. The crash is worked around, by not allowing a active window to enable advanced pointer events. This fixes http://bugreports.qt.nokia.com/browse/QTBUG-12779 Task-number: QTBUG-12779 Reviewed-by: mread
* Introduce QtOpenGL module for Symbian.Jani Hautakangas2010-08-201-1/+1
| | | | | Task-number: QT-2139 Reviewed-by: Gunnar Sletta
* Ensure geometry of top-level widget accounts for S60 screen furnitureGareth Stockwell2010-08-191-13/+13
| | | | | | | | | | | | | | If the S60 screen furniture has already been constructed before QWidgetPrivate::show_sys() is called on a top-level widget which has Qt::WindowMaximized set (e.g. due to a showMaximized() call), its geometry is set to the full screen extent, including the regions covered by the status bar and CBA. This patch ensures that calculation of the widget geometry always takes into account the screen furniture. Task-number: QTBUG-12605 Reviewed-by: Jason Barron
* Ensure native window is considered invisible when it gets destroyedGareth Stockwell2010-08-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The lifetime of the backing store depends, on Symbian, on the visibility of the native windows which are rendering from it. Specifically, once all such windows (i.e. the TLW window and those of any native widget descendents) have become invisible, the backing store is deleted. During re-parenting of a visible native child widget from parent1 to parent2, the following events occur: 1. QWidget::hide() is called on the child 2. The child widget's native control is deleted 3. A new native control is created, with its parent set as parent2->window()->effectiveWinId() Because there is no yield to the event loop between (1) and (2), the application does not receive a 'window hidden' notification as a result of the call to hide(). This means that the child widget is not removed from the list of visible widgets held in the backing store of parent1->window(). This patch ensures that the child is removed from this list during between steps (1) and (2). Task-number: QTBUG-12406 Task-number: QTBUG-12817 Reviewed-by: Jason Barron
* Ensure that window rectangle is updated when CBA visibility changesGareth Stockwell2010-07-281-10/+5
| | | | | | | | | | | | | | | | | | | | | | In S60, there are two pieces of screen furniture, changes in whose visibility or size can affect the size of the Qt application window. These are the status pane, at the top of the screen, and the CBA at the bottom. QSymbianControl listens for changes in status pane visibility and size by implementing MEikStatusPaneObserver. Notifications received via this interface trigger a call to QSymbianControl::handleClientAreaChange() which resizes the control. There is no corresponding interface through which to receive notifications of changes in CBA visibility. This patch introduces a utility function for setting the visibility of both the status pane and CBA, which ensures that the control's rectangle is updated when either one changes. Task-number: QTBUG-5320 Reviewed-by: Jason Barron
* Clear Qt::WA_OutsideWSRange when making window fullscreenGareth Stockwell2010-07-281-0/+2
| | | | | Task-number: QTBUG-10269 Reviewed-by: Jason Barron
* Avkon removal configured with -no-s60mread2010-07-011-0/+3
| | | | | | | | | | | | | | | | Avkon dependencies can be configured out with the -no-s60 configure flag, conversely Qt on Symbian will use Avkon if -s60 is configured. These changes are intended to keep or introduce binary compatibility between the s60 and no-s60 configurations. To do this, it has been necessary to introduce stub equivalents of the CAknAppUi related classes into the no-s60 configuration, and override all Avkon framework virtual functions in the QS60Main... classes. Other than that, these changes are mostly just correcting the use of the Q_WS_S60 flag so that it only refers to Avkon dependencies. Reviewed-by: Sami Merila
* Merge branch '4.6-s60' into 4.7-s60axis2010-06-241-3/+0
|\ | | | | | | | | | | | | | | Conflicts: src/3rdparty/phonon/qt7/mediaobject.mm src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/plugins/phonon/mmf/mmf.pro
| * Allow TLW translucency on Symbian without Qt::FramelessWindowHintGareth Stockwell2010-06-231-3/+0
| | | | | | | | | | | | This flag is Windows-specific, and should not be required on other platforms. Reviewed-by: Jason Barron
* | Fixed an on-exit crash for apps using GL.Trond Kjernåsen2010-06-111-0/+1
|/ | | | | | | | | | | | If a QGLWidget is left on the heap when the QApplication destructor is called, it will leave the QGLWidget in a broken state. The widget itself is released and set to a non-created state, which the associated QGLContext doesn't get notified about. With this patch the QGLWidget knows when QWidget::destroy() is called and can act acordingly. Task-number: QT-3498, QTBUG-10995 Reviewed-by: Paul
* Enable visibility change events on all Symbian native windowsGareth Stockwell2010-06-021-0/+1
| | | | | | | | Previously, these events were enabled only on top-level widgets. This patch enables them also for native child widgets. Task-number: QTBUG-8697 Reviewed-by: Jason Barron
* Added reference counting to QWidgetBackingStoreGareth Stockwell2010-06-021-3/+1
| | | | | | | | | | | | | | | | | | | On Symbian, the top-level widget's backing store must be destroyed when it is no longer required, in order to conserve memory. The criteria for destroying the backing store is when neither the TLW nor any of its native descendents (which share the backing store) are visible. In order to implement this requirement, a count must be kept of the number of native widgets which are using the TLW's backing store. This patch provides the mechanism for maintaining this count, and for destroying the backing store when the count is decremented to zero. No calls to either the increment nor decrement functions are made, however, by this code included in this patch; this code will be added to only the Symbian backend by a subsequent patch. Task-number: QTBUG-8697 Reviewed-by: Bjørn Erik Nilsen Reviewed-by: Jason Barron
* Always construct s60 screen furniture even if not used.Janne Koskinen2010-05-311-4/+1
| | | | | | | | Not creating screen furniture in full screen caused regression when swapping into idle screen and back on Nokia 5800. Task-number: QTBUG-10985 Reviewed-by: Jason Barron
* Don't crash when applications set Qt::WA_TranslucentBackground.Jason Barron2010-05-121-1/+3
| | | | | | | | | | | | | | | After replacing some code with a function call to s60UpdateIsOpaque() we introduced a crash for widgets that set Qt::WA_TranslucentBackground. The reason for the crash was that the Qt::WA_WState_Created attribute was being set before calling this function, but *not* before setWinId() was being called. This meant that s60UpdateIsOpaque() assumed that the window was created (and the handle added to the widget map), but this was not actually the case. The fix here is to move the call to s60UpdateIsOpaque() after the call to setWinId() such that those assumptions are true. Reviewed-by: Jani Hautakangas
* Removed fullscreen responsiveness of softkeysMiikka Heikkinen2010-04-281-9/+0
| | | | | | | | | | | | | The CEikCba class casting is not binary compatible between at least S60 3.2 and 5.0 platforms, even though it is source compatible. The removed code was causing stack corruption on emulator when binaries were built on S60 3.2 SDK and run on S60 5.0 SDK. Another solution for this feature needs to be found. Task-number: QTBUG-10199 Reviewed-by: Shane Kearns Reviewed-by: Janne Anttila
* Fix window transparency on Symbian.Jason Barron2010-04-211-10/+1
| | | | | | | | | | | | | In the create_sys() function where native handles are created, we were only looking at the "isOpaque" flag to determine if a window should be translucent or not. This is not the correct thing to do because transparency should only be granted if the application explicitly sets the Qt::WA_TranslucentBackground flag. The fix is to defer the transparency decision to s60UpdateIsOpaque() which does the right thing. Reviewed-by: Jani Hautakangas
* Tweak the 'normalGeometry' of the widget before setting it.Jason Barron2010-04-211-2/+11
| | | | | | | | | | | If a widget is initially shown as maximized or fullscreen then the normal geometry is calculated before the status pane has been created. When returning to the "Normal" window state the geometry needs to be tweaked to compensate the fact that there is a status present now. This should only happen if the application has not been given an explicit position. Reviewed-by: Janne Anttila
* Use QDesktopWidget as a status pane observer on Symbian.Jason Barron2010-04-211-0/+5
| | | | | | | | | | | | | | | | | Now that the S60 screen furniture construction is delayed, we need to manually set the status pane observer to get notifications about changes in the size of the status pane. Using the AppUi would have been the obvious choice here, but sadly CAknAppUi (base class for QS60MainAppUi) uses private inheritance when implementing the MEikStatusPaneObserver interface. To work around this problem we make QSymbianControl implement the interface and use the instance of this class that is associated with QDesktopWidget to recevive the notifications and then call the function in the AppUi to maintain the same behavior. Reviewed-by: Janne Anttila Reviewed-by: mread
* Delay creation of S60 screen furniture.Jason Barron2010-04-211-0/+36
| | | | | | | | | | | | | | Previously the S60 screen furniture (Status Pane and CBA) was being constructed when QApplication was constructed. This meant that if you never created a widget, you would still get those app panes which is not what we want. This patch avoids constructing these panes in QApplication, and manually creates them later when the first window is shown in a state where they would be needed. Reviewed-by: Janne Anttila Reviewed-by: mread
* Don't use setGeometry() in setWindowState() on Symbian.Jason Barron2010-04-211-5/+7
| | | | | | | | | | setGeometry() has the side effect that it internally sets both the WA_Moved and WA_Resized attributes and these attributes should only be used when the application has explicitly set a size or position. When a widget is resized due to being maximized or fullscreened then we should resize the native window handle instead of calling setGeometry. Reviewed-by: Janne Anttila
* Modify setWindowState() on Symbian to create the native window earlier.Jason Barron2010-04-211-2/+3
| | | | | | | | The native window is used quite early in this function so as soon as we determine that this does in fact require a native window, we should create it immediately. Reviewed-by: Janne Anttila
* Fixed 'fullsreen with softkeys' mode not to expand under softkey area.Janne Anttila2010-03-231-3/+5
| | | | | | | | | | | availableGeometry returns incorrect area after cba is made invisible, it seems that this happens because CAknToolbar is not made invisible. Fixed the problem by reverting back to SetExtentToWholeScreen usage when the widget is really fullscreen, i.e. Qt::WindowSoftkeysVisibleHint is not set. Task-number: QTBUG-9038 Reviewed-by: Miikka Heikkinen
* HotFix for fluidlauncher default size caused by 6d44dadd.Janne Anttila2010-03-121-2/+19
| | | | | | | | | | | | | It seems that in Symbian we cannot restore Qt::WA_Moved and Qt::WA_Resized attributes in setWindowState method to the same ones what the attributes were when method was called. Thus we currently make sure that Qt::WA_Moved and Qt::WA_Resized attributes are not touched when normal window state is applied. There is a new task QTBUG-8977 to sort out when those attributes should be set and when not. Reviewed-By: Sami Merila
* Fixed dialog resize not to move the dialog for Symbian.Janne Anttila2010-03-101-1/+6
| | | | | | | | | | | | | | | | QDialog::resize() also moved the dialog in Symbian. This occured since adjustPosition was called as an result of resize and that method did not check if dialog position was explicitly set. In addition it was found that in Symbian WA_Resized and WA_Moved attributes were basically set for almost all top-level widgets by system. This was also fixed and a new auto test was introduced to verify these attributes in all platforms. Windows platform also suffers from bug in this area, and a separate task QTBUG-5897 for it was created Task-number: QTBUG-5897 Reviewed-by: Sami Merila
* Fix for QTBUG-6659 Parent window accepts pointer events wronglyJani Hautakangas2010-03-051-2/+4
| | | | | | | | | Parent window accepted pointer events even though the child was modal. That was because closing popup didn't restore pointer grab for modal window. Task-number: QTBUG-6659 Reviewed-by: axis
* Added fullscreen support to softkeys in Symbian.Janne Anttila2010-03-011-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit enables the following two features: 1. Developer can make softkeys visible in fullscreen widget by setting the Qt::WindowSoftkeysVisibleHint window flag. This flag implememts intermediate mode for maximized and fullscreen modes. In maximized mode both statuspane and softkeys are visible, in fullscreen mode with WindowSoftkeysVisibleHint flag, only the softkeys are visible and in normal fullscreen mode both statuspane and softkeys are invisible. This feature was requested by QTBUG-5171. 2. Developer can make softkeys to respond to the key events even the softkeys are invisible. This means that when widget with Qt::WindowSoftkeysRespondHint window flag is shown in fullsreen, the softkey HW key events are routed to invisible softkeys and softkeys trigger the action associated to pressed softkey button. If the flag is not set, the key event will be passed to application/focused widget normally and softkey actions are not triggered. This feature was requested in QTBUG-4564. Both new flags are by default off. In addition, the softkey example is updated to demonstrate the new window flags. The commit also contains some code style fixes applied by my editor automatically to changed files. Task-number: QTBUG-5171 Task-number: QTBUG-4564 Reviewed-by: Jason Barron
* Fixed defect in handling of expose events for SymbianGareth Stockwell2010-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit bc82db did not correctly handle native child widgets. Consider the case when we have a top-level widget A with a native child widget B. When QSymbianControl::Draw() is called on the control corresponding to B, the following occurs: 1. The inExpose flag is set in B's QWExtra structure. 2. The call to syncBackingStore() results in a call to QWidgetBackingStore::flush(), passing default parameters. 3. Because no target widget was passed to flush(), this function selects the top-level widget (A) as the target for the flush operation, passing A as the first argument of QS60WindowSurface::flush(). 4. QS60WindowSurface::flush() checks the inExpose flag from A's QWExtra structure, finds it to be false, and proceeds to call DrawNow() on A's control. Because QSymbianControl::Draw() uses the default graphics context, this context is shared between controls. This means that the DrawNow() call in step 4 causes a WSERV-10 panic (Activate() called on an already-active) graphics context. This patch moves the inExpose flag from B's QWExtra into A's QTLWExtra, with the result that the call to DrawNow() in step 4 is suppressed. Task-number: QTBUG-7960 Reviewed-by: axis
* Whitespace/tab fixes.Jani Hautakangas2010-02-051-1/+1
| | | | Reviewed-by: Trust me
* s60 application loses normalGeometry when returning from fullscreenSamuel Nevala2010-02-051-78/+30
| | | | | | | | | | | | | | | | | | | | | | | Problem description: normalGeomerty lost during showFullScreen 1. Reported problen was due on void QSymbianControl::PositionChanged() over write top->normaGeometry on every position change. As fix top->normalGeometry is moved to new rect:s top left only when widget windowState == 0. 2. Also made some new qwidget auto tests. Refactored s60 side setWindowState to be more readable. Minimized window state now hides window decoration. QApplication & QWidget autotest run on emulator and tested on s60 5.0 hw using attached application. http://bugreports.qt.nokia.com/browse/QTBUG-6231 Task-number:QTBUG-6231 Merge-request: 2256 Reviewed-by: Jani Hautakangas <ext-jani.hautakangas@nokia.com>
* Flush the WSERV command buffer after deleting a surface.Jason Barron2010-02-041-0/+4
| | | | | | | | | | | | | | For graphics systems that use EGL surfaces in the backing store destroying the surface does not guarantee that the memory is immediately freed because this command does not cause a flush. This implies that a manual flush is instead needed. We do this in 2 places; the first is when the surface is destroyed due to a visibility changed. The second case is just after the window has been destroyed. At this point the backing store has already been deleted so the deletion of both the surface and window can happen atomically in WSERV. Task-number: QT-2506 Reviewed-by: Iain
* Enable surface transparency support on Symbian^4.Jason Barron2010-01-141-0/+8
| | | | | | | | | On Symbian^4 systems where the window supports surface transparency, we use this for the Qt::WA_TranslucentBackground flag instead of the previous method. Task-number: QT-2026 Reviewed-by: Iain
* Improve the behavior of expose events on Symbian.Jason Barron2010-01-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Previously when an expose was received from WSERV, we simply called BitBlt (for raster) or called flush on the window surface (for anything else). This behavior differs from other platforms which call syncBackingStore(). This difference means that we flush the backing store without actually updating the content first. This works for most cases because if there actually was new content, it would be updated when the widget's UpdateRequest event was handled. The problem arises when the backing store does not have the correct content. This can happen if the backing store was deleted, but only partially restored (see Task below). Another problem is with the OpenVG graphics system which assumes that beginPaint() is called before endPaint() is order to initialize the context and the surface size. The fix is to call syncBackingStore() like the other platforms, but introduce a bit field to prevent infinite recursion in the painting pipeline. Task-number: QTBUG-4921 Reviewed-by: axis Reviewed-by: Gareth Stockwell