summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_x11.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Pass events to installed event dispatcher event filters before passing them ↵John Stanley2012-02-101-11/+16
| | | | | | | | | | | to x11ProcessEvent() Change-Id: If551c732b520b0105a3d4578db1b039c1b5d49fd Pass events to eventFilter first Change-Id: If551c732b520b0105a3d4578db1b039c1b5d49fd Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Merge branch '4.8-upstream' into master-waterWater-Team2011-11-161-28/+0
|\
| * Revert "Improved performance of mapFromGlobal/mapToGlobal on X11"Friedemann Kleint2011-11-141-28/+0
| | | | | | | | | | | | | | | | | | | | The change introduces problems with Unity's global menu bar. Task-number: QTBUG-22420 Reviewed-by: denis <denis.dzyubenko@nokia.com> This reverts commit cdd776a91e65bf5c30cea1bab9823134a3f797d0.
* | Notify X11 of its resizable state through MWM Hints.Jan-Arve Saether2011-10-271-1/+10
|/ | | | | | | | | | | | We only updated the MWM_FUNC_RESIZE when the window was shown. The consequence was that if the widget was initially shown in fixed size it would clear the MWM_FUNC_RESIZE flag, and we would never set it again if the widget became resizable later. Some window managers still support this (apparently it seems that compiz tried to adhere to this) Task-number: QTBUG-21914 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Merge branch 4.7 into qt-4.8-from-4.7Qt Continuous Integration System2011-07-181-0/+6
|\
| * Fixes leaking X11 SyncCounter when widgets get open/destroyedAleksandar Stojiljkovic2011-07-181-0/+6
| | | | | | | | | | | | | | xmeminfo showed leaking memory and unreleased X11 SyncCounter for test application opening and destroying one QWidget. It was not that critical: on 1000+ openings, heap grew ~4MB. This patch fixes the leak. Reviewed-by: Samuel Rødal
| * Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-05-051-2/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Compile on Windows Support gamma correction of text on GL Remove QFontEngineFT::loadGlyphMetrics Make autotest more resilient against network timeout Do not filter adhoc clients Lancelot: Add configurable client filtering to baseline server Improve error reporting on failure to connect to baseline server Fixed bug in X11 backend when creating translucent windows. Only cleanup share widget if it has been created. Add required font metrics functions to QRawFont Fixed bug in QPdfEngine::addImage causing mono images to be made 32 bit Make pixel size a qreal in QRawFont Make sure removed QTextBlock is invalid Make sure QFont's resolve mask is copied on compilers with C++0x support Fix glyph position issue with fallback fonts
| * | Fixed bug in X11 backend when creating translucent windows.Samuel Rødal2011-05-031-2/+7
| | | | | | | | | | | | | | | | | | | | | We forgot to send the ParentAboutToChange event, which meant QGLWidget didn't destroy the old EGL surface. This could cause two EGL surfaces to be created for the same QGLWidget, which leads to undefined behaviour on some platforms.
* | | Fixes warnings about unused variablesOlivier Goffart2011-04-281-3/+1
|/ / | | | | | | Reviewed-by: Samuel
* | Fix window pixmap initialization strategyJacopo De Simoi2011-03-311-3/+9
| | | | | | | | | | | | | | | | | | | | If a compositing manager is active, setting the window pixmap background to None for ARGB windows makes little sense. In this case the background should be transparent Merge-request: 1135 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* | Improved performance of mapFromGlobal/mapToGlobal on X11Denis Dzyubenko2011-03-241-0/+28
| | | | | | | | | | | | | | | | We don't call XTranslateCoordinates anymore, but use the toplevel window offset that we already store to convert between screen coordinates and widget coordinates. Reviewed-by: João Abecasis
* | Do not handle posted events in QSplashScreen.Denis Dzyubenko2011-03-031-2/+8
| | | | | | | | | | | | | | | | When QSplashScreen waits for the window to be fully shown, we shouldn't re-enter the event loop by processing posted events. Reviewed-by: axis Reviewed-by: Olivier Goffart
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt into earth-masteraxis2011-02-241-29/+3
|\ \ | | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreplyimpl.cpp tests/auto/moc/tst_moc.cpp
| * \ Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-101-28/+0
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/development/qmake-manual.qdoc mkspecs/symbian-gcce/qmake.conf qmake/project.cpp src/corelib/global/qnamespace.qdoc src/declarative/graphicsitems/qdeclarativetext.cpp src/gui/text/qtextdocumentlayout.cpp src/gui/text/qtextdocumentlayout_p.h tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp tests/auto/networkselftest/networkselftest.pro tests/auto/qscriptengine/tst_qscriptengine.cpp tools/designer/src/components/signalsloteditor/signalslot_utils.cpp tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf tools/qdoc3/test/qt_ja_JP.qdocconf tools/qdoc3/test/qt_zh_CN.qdocconf
| | * Revert "Improved performance of mapFromGlobal/mapToGlobal on X11"Denis Dzyubenko2011-02-071-28/+0
| | | | | | | | | | | | | | | | | | | | | This change introduced regressions with some window managers (for example with metacity when you maximize the window) This reverts commit cdd776a91e65bf5c30cea1bab9823134a3f797d0.
| * | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-031-1/+3
| |\ \ | | |/ | | | | | | | | | | | | | | | Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
| | * Carefull free the data from XGetWindowProperty on X11.Denis Dzyubenko2011-02-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Make sure we free the data correctly in case of error. Task-number: QTBUG-16616 Patch-by: Juuso Pakarinen Reviewed-by: Ritt Konstantin
* | | Avoid warning when seting a window iconOlivier Goffart2011-02-211-1/+1
|/ / | | | | | | | | | | | | | | | | | | QPixmap::handle(): Pixmap is not an X11 class pixmap The problem was that the QBitmap constructor would re-create a copy of the bitmap in a image (because we are using the raster graphicssystem) Reviewed-by: sroedal
* | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-01-261-20/+58
|\ \ | |/
| * Improved performance of mapFromGlobal/mapToGlobal on X11Denis Dzyubenko2011-01-251-0/+28
| | | | | | | | | | | | | | | | We don't call XTranslateCoordinates anymore, but use the toplevel window offset that we already store to convert between screen coordinates and widget coordinates. Reviewed-by: João Abecasis
| * Moved the implementation of mapFromGlobal/mapToGlobal to QWidgetPrivateDenis Dzyubenko2011-01-251-20/+30
| | | | | | | | Reviewed-by: João Abecasis
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Fix a rare race condition when showing windowsHarald Fernengel2010-12-091-1/+10
|/ | | | | | | | | | | | When setting a window to translucent shortly before showing it with the OpenGL graphics system, the hijacking would call XDestroyWindow without resetting the internal state. This might lead to the window waiting for a map notify message forever. The patch now properly resets the internal state when destroying the old window, so it'll get mapped correctly when show() is called. Reviewed-by: Denis Dzyubenko
* Setting the _NET_WM_STATE Atom only when its not already setDominik Holland2010-10-011-7/+14
| | | | | Task: QT-3918 Reviewed By: Bradley T. Hughes
* Fixes cursor shape when widget becomes native on X11.Denis Dzyubenko2010-09-301-1/+3
| | | | | | | | | When a native window handle is created for a widget that has override cursor set, we should reset the cursor on the parent and set the cursor on the new window handle. Task-number: QTBUG-6185 Reviewed-by: Olivier Goffart
* 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
* Use qrand() instead of rand()Bradley T. Hughes2010-05-041-1/+1
| | | | | | | | This only affects X11 code, and are the only 2 places in Qt where rand() is used instead of qrand(). Task-number: QTBUG-9793 Reviewed-by: TrustMe
* Do not move keyboard focus to invisible windows on X11.Denis Dzyubenko2010-03-241-1/+2
| | | | | | | | | | | | | When QWidget::activateWindow() is called we check if the window was already mapped and just do not do anything if it wasn't. We used to try to active it by giving it keyboard focus, but that always fails because it isn't allowed to call XSetInputFocus on invisible windows, and the error message was swalled by Qt in the error handler. So now we just don't bother even trying if we know the call will fail. Task-number: QTBUG-4042 Reviewed-by: Benjamin Poulain Reviewed-by: Bradley T. Hughes
* Do not use _NET_ACTIVE_WINDOW for nonmanaged windows.Denis Dzyubenko2010-03-241-1/+2
| | | | | | | | If a window has X11BypassWindowManager hint, we shouldn't bother asking the windowmanager to active it using the _NET_ACTIVE_WINDOW protocol and just go though Xorg directly. Reviewed-by: Bradley T. Hughes
* Revert "Revert "Make QWidget::activateWindow() NET window manager aware.""Denis Dzyubenko2010-03-241-1/+21
| | | | This reverts commit 555175f9d9e5633b8fcfd6e6f6a11c84faa9946e.
* Revert "Make QWidget::activateWindow() NET window manager aware."Morten Johan Sørvig2010-03-241-21/+1
| | | | | | | | | | | | | This reverts commit 6390248b11b3596d8c946c232e9b0d832dc42941, which caused the following regressions: TESTFUNCTION_FAIL qshortcut::ambiguousItems (pulse_linux-g++) TESTFUNCTION_FAIL qshortcut::ambiguousRotation (pulse_linux-g++) TESTFUNCTION_FAIL qshortcut::disabledItems (pulse_linux-g++) TESTFUNCTION_FAIL qshortcut::keypressConsumption (pulse_linux-g++) TESTFUNCTION_FAIL qshortcut::number (pulse_linux-g++) TESTFUNCTION_FAIL qshortcut::text (pulse_linux-g++) TESTFUNCTION_FAIL qshortcut::unicodeCompare (pulse_linux-g++)
* Add a new WA_X11DoNotAcceptFocus attribute for top-level widgets.Robert Griebl2010-03-221-1/+21
| | | | | | | | This should prevent window managers from ever sending a WM_TAKE_FOCUS message to those windows (useful for IM windows like virtual keyboards, notification banners, etc.) Reviewed-by: bhughes
* Make QWidget::activateWindow() NET window manager aware.Robert Griebl2010-03-221-1/+21
| | | | | | | Use the _NET_ACTIVE_WINDOW atom if the current window manager supports it - otherwise fall back to XSetInputFocus() Reviewed-by: bhughes
* Do not create native window handle just because a parent has one.Denis Dzyubenko2010-03-191-1/+1
| | | | | | | | | On X11 when creating a widget that has a parent, there is no reason to create a native window handle right away since we don't know yet if the window is going to be ever shown. Task-number: QTBUG-9215 Reviewed-by: Bradley T. Hughes
* Improved qt_x11_wait_for_window_managerDenis Dzyubenko2010-03-171-28/+10
| | | | | | | | | | | | We shouldn't really care about ReparentNotify when waiting for a window to be "managed" by the window manager. We only need to wait until the window is Mapped and Exposed for the first time, then we (most likely) can safely assume that the window manager has finished managing the window. Task-number: QTBUG-9097 Reviewed-by: Bradley T. Hughes
* Rename QTimestamp to QElapsedTimerThiago Macieira2010-03-171-2/+2
|
* Port QtGui uses of QTime as a stopwatch to QTimestampThiago Macieira2010-03-171-2/+2
|
* Fixed qt_x11_wait_for_window_managerDenis Dzyubenko2010-02-051-5/+7
| | | | | | | | | When we wait for the window to be shown by looking for ReparentNotify, MapNotify, etc events in the event queue, we should check if those events come for the right window, otherwise we might exit too early if there are event for an other window in the queue. Reviewed-by: Leonardo Sobral Cunha
* Improved QTest::qWaitForWindowShown on X11.Denis Dzyubenko2010-02-041-30/+45
| | | | | | | | The function is supposed to wait until the window has been managed by the window manager on X11 - i.e. it has been reparented to a frame, mapped and received at least one Expose event after that. Reviewed-by: Olivier Goffart
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Prevent a crash when creating an inputContext from the QApplication dtor.Denis Dzyubenko2010-01-051-1/+1
| | | | | | | | | | When accessing the global input context from the QWidget destructor access it directly instead of calling a helper function. Don't even bother to create an input context if QApplication is being destroyed (just in case if the user is calling the QApplication::inputContext manually from the destructor). Task-number: QTBUG-7105 Reviewed-by: Simon Hausmann
* Fixed antialiasing in the GL based QGraphicsView demos under X11.Trond Kjernåsen2009-11-201-1/+6
| | | | | | | | | | | | | | All the examples/demos that used a QGraphicsView with a QGLWidget as a viewport, that had multisampling enabled, was broken after 7b61fbf03e170a7da37d5f57ed4053aae719ec7f. This is because the reparented QGLWidget will be forced to use the parent widget's visual, which in this case does not contain any multisample buffers. The QX11Info structure for QGLWidget is put together based on the QGLFormat that is passed into the QGLWidget constructor and will in most cases always be different from the parent widget visual. Task-number: QTBUG-5998 and QTBUG-6003 Reviewed-by: Eskil
* API review: Rename functions numColors(), setNumColors() and numBytes()Marius Storm-Olsen2009-11-061-1/+1
| | | | | | | | | | QPaintDevice and QImage used the functions numColors(), setNumColors(), and numBytes(). However, this is not consistent with the rest of the Qt API which uses *Count() and set*Count(). Removed all usage of these functions inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
* Fixed regression in translucent window creation on X11.Samuel Rødal2009-10-221-1/+1
| | | | | | | | | When setting the TranslucentBackground flag after the window has been created, we should check whether the widget has a native window id, and not the WA_NativeWindow attribute which doesn't seem to be set by default for top-level widgets. Reviewed-by: Trond
* Fixed bug on X11 with WA_TranslucentBackground and native child widgets.Samuel Rødal2009-10-121-25/+46
| | | | | | | The native child widgets need to inherit the parent's visual in order to have a translucent background as well. Reviewed-by: Trond
* Improved a qt_x11_wait_for_window_manager.Denis Dzyubenko2009-09-181-7/+30
| | | | | | | | | | | | | | In addition to waiting until the window manager maps and reparents the window, also wait until we get initial expose event. The window manager will most probably send us several ConfigureNotify events, so wait until all of them are handled in addition to the Expose event (as one might rely on another). Also, we shouldn't wait for the ReparentNotify event if the window has X11BypassWindowManagerHint. Reviewed-by: Olivier Goffart