summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix possible segfault when setting up window's transient parentShawn Rutledge2013-04-301-1/+1
| | | | | | | | tp->handle() can be null. Task-number: QTBUG-30919 Change-Id: Ie18b70d4cc6916d2e821a71d00d1bf99956b0632 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Add QXcbWindowEventListenerJørgen Lind2013-04-261-3/+14
| | | | | | | | This makes it possible to listen for events on xcb_window_t which are not platformwindows inside the xcb plugin Change-Id: Ic9ec17ed757a7f9a5302ef2759c119a72bac573c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Respond to the _NET_WM_CONTEXT_HELP WM_PROTOCOLS messageJan Kundrát2013-04-241-0/+5
| | | | | | | | | | | | | | | | This change restores a proper function of the "(?)" button in the window decorations which is used as a clue for the user to check what a particular widget is supposed to do. The change is only implemented for QtWidgets because the underlying QWhatsThis is inherently widget-specific -- which is why it sends an event to QGuiApplication, but only processes it in the QtWidget-specific QApplication. Thanks to Alberto Mardegan and Gunnar Sletta for their feedback on this patch. Change-Id: Ibb912e3960f1e9aec54c5ed77ade1c6744d6ca23 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Implement startup notification spec again.David Faure2013-04-231-0/+4
| | | | | | | | | | | | | | | | | This functionality was in Qt4's qapplication_x11.cpp and was missing from the XCB QPA plugin. Ported the code from xlib to xcb. This code was actually tested (with plasma), unlike the Qt-4.8 code which skipped every other character... for (uint i = 0; i < 20 && i + sent <= length; i++) xevent.xclient.data.b[i] = message[i + sent++]; Provide a QPA native-function for accessing the startup id, for cases where an application doesn't show a window, but starts another app instead, or asks a running app to show the window on its behalf. Change-Id: If392179efddd70a51c45a8fab4fb9d753913094a Reviewed-by: David Faure (KDE) <faure@kde.org>
* qxcb: output clear error message when running on an 8-bit displayDavid Faure2013-04-231-1/+3
| | | | | | | | | | | | | | | Currently, running a Qt5 widget app in Xvfb (with its default setup, 8 bit color depth) outputs a stream of error messages, starting with: QWidget::paintEngine: QWidget::paintEngine: Should no longer be called Better output clearly the reason why we end up in that method: painting on a null image, due to the unsupported image format. Maybe this should even be a qFatal... Change-Id: Iae8f1b057518c146bf8e034999c1b5e67ce6ef5e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Implement alertion state for windows.Friedemann Kleint2013-04-191-0/+14
| | | | | | | | | | | | | | Add QWindow::alert() and QPlatformWindow::setAlertState(). Add logic to clear alertion state when the window becomes active. The platform plugins then only need to implement a setter and a cheap getter and need not handle activation. Prototypically implement X11 and Windows. Task-number: QTBUG-30416 Change-Id: Ia70c4722d812462a21f4034b7d52735c9f2bc49c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Merge branch 'dev' into stableOswald Buddenhagen2013-03-201-9/+233
|\ | | | | | | | | | | | | | | | | | | | | | | This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
| * XCB: don't map hidden windowsAlberto Mardegan2013-03-151-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | This bug was introduced by the XEMBED implementation (carried over from Qt4, but there it applied to QX11EmbedWidget only): the _XEMBED_INFO property is used to inform the *embedder* whether the embedded window should be mapped when embedded. Task-number: QTBUG-30084 Change-Id: I8d1c467874bdee3300a1b18b8174b2d62f498713 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
| * Implement XEmbed protocolAlberto Mardegan2013-03-061-9/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a static QWindow::fromWinId(WId id) constructor which can be used to create a QWindow object representing windows created by other processes. Then, QWindow::setParent() can be used to embed a window into a foreign window socket and QWindow::setTransientParent() to stick the current window on top of a foreign window. The changes in the QtWidgets module ensure that the focus chain (TAB navigation) correctly works when a QtWidgets-based window is embedded into another application. As far as the platform implementation is concerned, this commit only implements the embedding functionality in the XCB plugin. So, this is roughly equivalent to the Qt4 QX11EmbedWidget functionality. Change-Id: Iff8f7b9ee974d33fb30f36056f7838b433a413c7 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Fix sluggish resizing for opengl windows on X11Shawn Rutledge2013-03-131-4/+7
|/ | | | | | | | Disable sync protocol for OpenGL surfaces in the XCB plugin. Task-number: QTBUG-29304 Change-Id: I4cb47b04637e15e012758d3b0840abd13d27df69 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Transient QWindows centered; default-constructed geometryShawn Rutledge2013-02-241-13/+36
| | | | | | | | | | | | | | | | | | | Default-constructed geometry does not mean put the window at 0,0, and it does not mean center the window on the screen: it means let the window manager position the window. If the window is explicitly positioned at 0,0 though, that is a higher priority than the transient hint; without this change, the transientFor property had no effect. On X11, transient means use center "gravity" to make the transient window exactly centered. But the user can still override the geometry of a transient window, as with any window. On OSX and Windows, neither transient window functionality nor smart initial positioning are provided, so a window with no position set will be centered on the screen, and a transient window will be put at the center of its transientParent. Change-Id: I4f5e37480eef5d105e45ffd60362a57f13ec55f5 Task-number: QTBUG-26903 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix focus handling of native child widgets in xcb.Gunnar Sletta2013-02-191-1/+13
| | | | | | Change-Id: If4d596195624011142bff6853849a23064e478df Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> (cherry picked from commit fc663b5f9aae16fe6a03160e3eb148a5f742ac58)
* Factorize code for formatting window titles into QPlatformWindow.David Faure2013-02-061-11/+1
| | | | | Change-Id: I0dcccd08916fc2ea1b795681e9b98a9550ef51b6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* XCB: Force XSync after creating WindowKai Koehne2013-01-151-0/+5
| | | | | | | | | | | | Make sure that dpy->request == dpy->last_request_read after setting up a new window. If we don't do this, last_request_read might never be updated until the difference hits a limit that can lead to hangs in the application (see e.g. QTCREATORBUG-8373). Task-number: QTBUG-29106 Change-Id: I390493ca6f966dc105d3ea3a2c48abec01177bc2 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* XCB: add support for getting and setting appTime and appUserTime.David Faure2012-12-141-0/+1
| | | | | | | | | | | | The QX11Info class needs this. This required adding the missing nativeResourceFunctionForScreen in QPlatformNativeInterface. Change-Id: I2c6e91c7f122f3ecdf769a177deafd2aa3896e2f Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix empty window title regression, add application display name to window titleDavid Faure2012-12-141-1/+12
| | | | | | | | | | | | | | | This increases consistency a lot: all windows and dialogs from a Qt application will show the app display name in the caption, on Windows and X11. This helps identifying which app a dialog belongs to, which is especially useful when the dialog is very generic and shows up unexpectedly. For compatibility reasons, the app name is added to the caption only if setApplicationDisplayName() was called -- or if the caption would be completely empty. The standard Qt4 case (setWindowTitle + no display name) is unchanged. Change-Id: Ib284c62c1f4c0bc923e5bc2d10247d95e9aa76c1 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fixed incorrect handling of extra mouse buttons in XCB platform plugin.Samuel Rødal2012-12-141-58/+10
| | | | | | | | | | | | | | | | | | | | | | translateMouseButtons() was only able to correctly handle the left, right, and mid mouse buttons. Thus, if any buttons outside of those were pressed, the motion notify event would basically unset the mouse button mask, leading to a release event being sent instead. Later on, when the actual release event arrives, that button gets xor'ed into the empty button mask generating another press, and later another motion event will generate a release. In the end that means two press-release sequences are sent for any extra mouse buttons. Instead of getting the mask of the buttons currently being pressed from the event, we need to keep track of the mask ourselves. Task-number: QTBUG-28561 Change-Id: Iaa67e784a13d792deef8fc29dbd5456a5471a861 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix QWidget::setWindowOpacity() when called before show().Friedemann Kleint2012-12-121-0/+4
| | | | | | | | | Pass opacity from the QWidget to QWindow and to the platform windows. Task-number: QTBUG-28477 Change-Id: If5a85d9183bd1ca33dac2052936ecd1e6c0b5f6c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Made QWidget::setWindowOpacity work with the XCB platform plugin.Samuel Rødal2012-12-121-0/+17
| | | | | | | | | Ported the rather trivial implementation from Qt 4. Task-number: QTBUG-28477 Change-Id: I44e14a3c150af43c6b9b880242b655fe06084fd7 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fixed excessive enter/leave events being generated with the xcb plugin.Samuel Rødal2012-11-231-2/+39
| | | | | | | | | | | | | | | | | | | | | When we get a leave event we peek ahead in the queue to see if there's an enter event already pending. If so we use QWindowSystemInterface::handleEnterLeave() instead of two separate window system interface events, so that you don't get leave and enter events for the whole parent chain when moving the mouse cursor between two neighbouring native child widgets. We skip VIRTUAL events as they are generated for parent windows, and we only care about the bottom-most window that is being entered / left. Qt can take care of the rest since it knows the QWindow hierarchy. We need to not skip leave events with detail set to INFERIOR, since Qt expects to get a handleEnterLeave() when the mouse moves from a parent window to a child window. Task-number: QTBUG-27550 Change-Id: I7457d2e59d8b694081f2e43a16cd2e58d769624e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Added expose and configure event compression in xcb platform plugin.Samuel Rødal2012-11-141-1/+44
| | | | | | | | | We had this in 4.x to prevend swamping the event queue and causing a lot of needless processing of stale events. Task-number: QTBUG-27734 Change-Id: I020fe44885569f5a68c07220fcb44bea3e138089 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add a QEnterEvent containing the mouse position.Friedemann Kleint2012-11-101-1/+3
| | | | | | | | | | | | | Enter handling requires knowledge of the mouse position. Extend the enter handling of QWindowSystemInterface to receive the position (implemented for Windows, XCB and Mac), passing it on to QEnterEvent. Dispatch QEnterEvent from widgets code. Change-Id: I49c07d2b1f46310c877017dd55d4cd7d636bdbce Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Rename all QWindow properties that have "window" in themShawn Rutledge2012-11-071-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | windowTitle, windowModality, windowIcon and so on are named that way to be similar to the ones in QWidget. However QQuickWindow inherits all of the declared properties, and we would like to have shorter property names in QML. If you are working with a Window then it's obvious the title property is the window title. Unfortunately, there must be patches in many other modules which depend on this one. In order to avoid the need to merge them all at the same time, there is also patch https://codereview.qt-project.org/#change,39001 which temporarily adds backwards-compatible accessors, which can be removed after the other modules are able to build without them. We should not rename windowState to state, because in QML, state usually drives the state machine for animation transitions etc. (although QWindow is not an Item, a user might get confused about it). Related patches are https://codereview.qt-project.org/#change,39001 https://codereview.qt-project.org/#change,37764 https://codereview.qt-project.org/#change,37765 https://codereview.qt-project.org/#change,37766 https://codereview.qt-project.org/#change,37762 Change-Id: Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* xcb: Fix a trivial reply leakUli Schlachter2012-11-021-1/+1
| | | | | | Change-Id: Ib9a0f96007e6dc5e125bfcd39bd1ef09baebae3b Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* XCB: Use screen's client leader as fallback for transient parent.Friedemann Kleint2012-11-021-8/+10
| | | | | | | | | Modal dialogs that do not have a QWidget parent may be hidden by their parent unless they actually have a transient parent. Task-number: QTBUG-27786 Change-Id: I7847df3517e5ba6e8d77a2a18c905e908a3cd2f4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove DRI2/OpenGL code paths from xcb plugin.Samuel Rødal2012-10-191-9/+0
| | | | | | | | | | | These were used to test QtWayland, but there are other options available for that now. The DRI2 code hasn't been maintained and doesn't even compile at the moment, so let's just remove it to de-clutter the source. Change-Id: I7db0f4db82348497b9f4d6c2dcf2e13f3ab14a76 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Made xcb plugin work when the GLX extension is not present.Samuel Rødal2012-10-191-3/+1
| | | | | Change-Id: I9285d7524586ff404206c088019ece33335137d9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPlatformWindow: change API for QPlatformWindow::setWindowStateRichard Moe Gustavsen2012-10-171-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation requests the platform window to set the window state if it can, and return the actual window state back. The problem with this approach is that the platform window is created as late as possible, so a call to QWindow::setWindowState would in many (most?) cases never be forwarded to the platform window (instead, the platform window is responsible to check the current window state upon creation). As such, the window state might be left unsynched with the platform window. This patch suggests removing the return value from QPlatformWindow::setWindowState. This will at least be consistent, so that setting/getting state would produce the same result independent of delayed window creation. If needed, we can later add new API to QPlatformIntegration or QPlatformWindow for querying supported/actual window state. Change-Id: Ie43f56169656854a765ce88b47a808f8f3d51bb4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QPlatformWindow: change API for QPlatformWindow::setWindowFlagsRichard Moe Gustavsen2012-10-151-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The current implementation requests the platform window to set as many of the flags it can, and return the same flags with the unsupported flags removed. The problem with this approach is that the platform window is created as late as possible, so a call to QWindow::setWindowFlags would in many (most?) cases never be forwarded to the platform window (instead, the platform window is responsible to check the current window flags upon creation). As such, the filtering would never be done. Looking at the current set of plugins, most of them also seems to ignore this protocol, returning the flags unfiltered. This patch suggests removing the return value from QPlatformWindow::setWindowFlags. This will at least be consistent, so that setting/getting flags would produce the same result independent of delayed window creation. If needed, we can later add new API to QPlatformIntegration or QPlatformWindow for querying supported window flags. Change-Id: I9c759b5f9fab5ebed764a982f77fe19881118875 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* QXcbWindow: Don't recreate window when reparenting.Yoann Lopes2012-10-011-3/+0
| | | | | | | | | | | | For consistency, this behavior has been kept across Qt versions... Just get rid of it. Also fixes native child widgets not being notified of the change of window handle (winId) when being reparented. Updated auto-test. Change-Id: I3616dc0f1c32a519d78a4846297d6d4a6e926fbf Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Prevent buffer overflow in QXcbWindow.Samuel Rødal2012-09-181-1/+1
| | | | | | | | Thanks to Janne Kulmala for noticing this and informing about the fix. Task-number: QTBUG-27123 Change-Id: Idd3cfd74fb7be277b6d805446aea5784b8fdf2f6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed missing window decorations on compiz.Samuel Rødal2012-08-231-3/+1
| | | | | | Task-number: QTBUG-26954 Change-Id: I6981338d4bbc9cf1440c9d67e9d034e0553dfeae Reviewed-by: Jason Barron <jason.barron@nokia.com>
* Fixed non-GL applications crashing when GLX/EGL initialization fails on xcb.Samuel Rødal2012-08-221-15/+20
| | | | | Change-Id: I5a08d6067272575aa56074aaebe308c3d49299bb Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Revert "Move QWindowSystemInterface out of qpa."Paul Olav Tvete2012-08-031-1/+1
| | | | | | | | | | | | | | This reverts commit 784a877d3cd9a1a75aca9c83146389503a966071. Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/testlib/qtestkeyboard.h src/testlib/qtestmouse.h src/testlib/qtesttouch.h Change-Id: Iebfed179b3eb7f30e4c95edcae5a8ad6fd50330e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QXcbWindow::setMask(): Check for SHAPE extensionUli Schlachter2012-07-251-0/+2
| | | | | | | | | | | If the SHAPE extension is not available and we try to use it, the xcb connection will shut down and go into an error state. This is bad because there would be no error message that would give a hint on what went wrong. Change-Id: I1a6734bd146ca179a990b6ce896813bf76007b66 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Reimplement QXcbWindow::setMask() with xcbUli Schlachter2012-07-251-36/+15
| | | | | | | | | This functionality does not need libXext. The bindings for the shape extension from libxcb-shape is enough and is available without Xlib. Change-Id: I9f1927024c64df00ace1666998c6c6deda2ef782 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Move QWindowSystemInterface out of qpa.Stephen Kelly2012-07-191-1/+1
| | | | | | | | Public QtTest headers require it, so all unit tests would have to use private Qt headers otherwise, which is not practical. Change-Id: I5d4466ec30b6a57ebdfc34413e716e657eb51368 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Suppress QWindowSystemInterface inclusion warnings.Girish Ramakrishnan2012-07-031-1/+1
| | | | | | | | | | | | | Since QWindowSystemInterface is now part of QPA API. The correct inclusion is: #include <qpa/qwindowsysteminterface.h> #include <qpa/qwindowsysteminterface_p.h> Bulk of the work was done by: find . -type f | xargs sed -i -e 's,#include <\(QtGui/\)\?QWindowSystemInterface>,#include <qpa/qwindowsysteminterface.h>,g' Change-Id: If75fc32611e72ef1cf58505794def375b1acf74a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Basic tablet support in xcb through XI2Laszlo Agocs2012-06-281-2/+4
| | | | | | | | | | The Maemo-specific function have been renamed a bit to prevent them clashing with the more generic stuff. Task-number: QTBUG-25865 Change-Id: Id55693159e15d5a0c679546eb48308feb48acac9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix compilation for XCB-without-XlibGiuseppe D'Angelo2012-06-261-1/+1
| | | | | | | | | Commit 6481218da13539529b87626a352a17f42c57be61 broke the build by removing the #ifdef XCB_USE_XLIB guards, but forgetting to port Button1 to the XCB equivalent. Change-Id: I9102feceb4deb0135ce0df318e46b35d1134a0b9 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* QPlatformWindow: Add Window masks.Friedemann Kleint2012-06-261-0/+54
| | | | | | | | | Add functionality for window masks to QPlatformWindow, which is required to implement QWidget::setMask() in order to fix the regression in functionality from Qt 4.8. Change-Id: I2c2d5629f0b4c6d90e52595ad70b13559aab1f41 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Reimplement QXcbWindow::startSystemResize() with xcbUli Schlachter2012-06-221-20/+15
| | | | | | | | | | This function just sends a ClientMessage to the window manager. XCB can do this fine and there is no need to require Xlib for the job. Change-Id: Iad3d78c393c1f439fff987fa19b4d82513810930 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Introduce QPA API for size grip handling.Friedemann Kleint2012-06-141-0/+33
| | | | | | | | | | - Introduce API to do size grip handling (mouse press and move). - Move Windows code to Windows plugin. - Move X11 code to XCB plugin and activate it. Change-Id: I2f61d6ddc1fa07447e668554d41ecc820efca23f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Implement QXcbWindow::setWindowIconCorentin Jabot2012-06-021-0/+45
| | | | | | | Change-Id: I1908cbef0c20d3725423b559f234bd6d3ddd4167 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix xcb plugin compilation for -qconfig largeTasuku Suzuki2012-05-261-0/+4
| | | | | | Change-Id: I1ee1fb9c140396e83272d607ee4dd63ce2c50b8d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Initialize member variable in QXcbWindowPekka Vuorela2012-05-241-0/+1
| | | | | Change-Id: Iddf3f70ae2cb7be0703c0084da87e41412ad1d06 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Improve widget geometry.Friedemann Kleint2012-05-091-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | - Rename posFromMove to posIncludesFrame in Widgets and make the handling more fine-grained; try to clean it up as soon as the frame margins are known in QWidgetPrivate::fixPosIncludesFrame(). - Implement QWidgetPrivate::updateFrameStrut(). - Windows: Handle posIncludesFrame in window creation, notify changed geometry after setting window flags. - XCB: Do not change the window gravity in propagateSizeHint() as this causes the window to jump around. Determine the gravity in window creation, leave it constant and fix the geometry when setting instead. - Store the normal geometry when maximize/fullscreen state change events are received. - Remove xfails from fixed tests Task-number: QTBUG-25331 Task-number: QTBUG-24905 Task-number: QTBUG-24294 Change-Id: I89c7229d86aaf88f02247d63915da7905e4a27ea Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>