summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
Commit message (Collapse)AuthorAgeFilesLines
* Fix screen detection on configureNotifyPaul Olav Tvete2015-04-161-1/+2
| | | | | | | | | | | | | | | | | | | If we got two rapid screen changes in a row, we would disregard the second change. This happens because QPlatformScreen::screen() is updated asynchronously, so if we got a screen change A --> B immediately followed by B --> A, before the first screen change event had been processed, we would compare with the old value and conclude nothing had changed. This can happen on creation: if the initial geometry of the window is outside all physical screens, the window manager will immediately move it. The solution is to compare the new screen to the locally cached value. Change-Id: I5440dc035cac4fba4f29ac563e36dfe3e2f82aea Task-number: QTBUG-45076 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix compilation of xcb-qt without system xcb headersKai Koehne2015-04-161-2/+2
| | | | | | | | Make sure the plugins are actually using the 3rdparty headers we ship, not the system ones. Change-Id: I5c857abee8e62c207843f9d29c369620be0d7da8 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Make it possible to use the -visual argumentJørgen Lind2015-04-157-25/+105
| | | | | | | | | | | | for xcb applications to use a specific visual id when creating windows. Also make it possible to retrieve the visual id of a specific window with QXcbWindowFunctions::visualId(QWindow *window). UINT_MAX is used as an invalid visualId. Change-Id: If62ada119ce8f9174cc211f53bbf1ce1bb7d021a Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Keep screen geometries from overlappingPaul Olav Tvete2015-04-145-56/+138
| | | | | | | | | | | | | | | | | | | | | | | | | The simple mapping of dividing each position by the devicePixelRatio does not work when screens have different DPR. If the low-DPR screen above or to the left of the high-DPR screen, the geometries will overlap in the Qt coordinate system. This change introduces a new mapping where the origin of each screen does not move. This mapping is not perfect: it will have gaps between contiguous screens. However, it will keep non-overlapping screens non-overlapping in the Qt coordinate system. Since there is no longer a simple linear coordinate transform, we have to add screen-dependent mapping functions, and distinguish between local and non-local coordinates. A side benefit is that the code is now easier to read, since we remove most manual coordinate transformation. We also have to cache the screen of each window: since we send resize events before screen change events, we cannot rely on QPlatformWindow::screen() (which is set from the screen change event). Task-number: QTBUG-45076 Change-Id: Ie95a0b71ae274e02903caa102a98af2050a44129 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* xcb: Fix getting of virtual rootsAlexander Volkov2015-04-101-6/+6
| | | | | | | | | Update QXcbWMSupport::net_virtual_roots instead of QXcbWMSupport::net_wm_atoms. It's a copy/paste error. Change-Id: If146955d954850f02980f473ad2318d67f193ec9 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Uli Schlachter <psychon@znc.in>
* xcb: Handle XSettings for a virtual desktop rather than for an outputAlexander Volkov2015-04-108-56/+92
| | | | | | | | | | | The virtual desktop may be composed of several outputs which are represented by the QXcbScreen class. XSettings are related to the virtual desktop, so introduce a QXcbVirtualDesktop class and store QXcbXSettings in it. Change-Id: Ib2261675ef8e5136592d4b856bc84646db3a3af4 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Fix logicalDotsPerInch when using devicePixelRatioPaul Olav Tvete2015-04-091-11/+8
| | | | | | | | | | | Qt does not support having different fontMetrics for different screens Also add environment variable for overriding logicalDpi Change-Id: I0baf73026d97fec590597ee304ad9fa119d7a328 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Add missing event types in printXcbEventGatis Paeglis2015-04-091-1/+10
| | | | | | | | And replace Xlib define GenericEvent with XCB define XCB_GE_GENERIC. Change-Id: Ie82cb7f58b18fc0d253e4b7fd65495608df0a7d9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Liang Qi2015-04-012-6/+4
|\
| * Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-312-6/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| | * xcb: Determine the window gravity just before the window is shownAlexander Volkov2015-03-271-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | It may change after the window has been created. Change-Id: Ib81a7ad7353b1909cc42684fc70d6b7d2556106f Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| | * Handle SelectionWindowDestroy in QXcbClipboardMartin Gräßlin2015-03-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is related to 6a7ee92b3958e3a3ebc16be15f8bd34217ec7bd2 which added handling for SelectionClientClose. Further testing showed that with e.g. Qt 4 applications the SelectionClientClose is not emitted, but the selection window seems to be destroyed before the client is destroyed. Fur a destroyed selection window the same applies: the clipboard content is no longer valid and we should emit the changed signal. Change-Id: Id3778a28b9f5601bf2c6e0106981316e0efa6e7c Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Uli Schlachter <psychon@znc.in>
| | * Fallback to malloc for insanely large windowsPaul Olav Tvete2015-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If shmget() does not work (probably because the backingstore size is bigger than SHMMAX), don't create a QImage with the previous buffer and the new size. That does not end well when we try to draw to the image later. Instead, fall back to the malloc path, like we do when the system doesn't support shared memory. [ChangeLog][X11] Don't crash when resizing windows to bigger than 3840x2160 Task-number: QTBUG-45071 Change-Id: I009de7c2179ffde28e252593067756877cad1b1c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | xcb: set WM_NAME window propertyShawn Rutledge2015-03-313-0/+51
|/ / | | | | | | | | | | | | | | | | | | Some older window managers and utilities still ignore _NET_WM_NAME. Task-number: QTBUG-42209 Change-Id: Iff93c8188a0a73b04cdf361add153cd818ac670f Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Martin Gräßlin <mgraesslin@kde.org> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Use Xlib to resolve font cursor if possibleJørgen Lind2015-03-301-0/+12
| | | | | | | | | | | | | | | | before fallingback to uploading a bitmap cursor Task-number: QTBUG-30016 Change-Id: I53eeda6bb5f6cab66e3bc10a2e5382ce55cc1bab Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: Fix bgr888 VNC sessionsLaszlo Agocs2015-03-304-9/+53
| | | | | | | | | | | | | | | | | | Introduce a slow path for 24 and 32 bit BGR. We don't care about performance here but it has to show the correct colors. Task-number: QTBUG-42776 Change-Id: Ic73e8ca3950b2b956f06643165dcfac51e7540f3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | xcb: Do not crash with VNCLaszlo Agocs2015-03-272-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When having a vnc server with pixel format bgr888, we may not have a working GL integration. (we may not have one regardless of the pixel format in fact) We should still keep on attempting to create a regular SHM window for RasterGLSurface windows too, to keep regular widgets apps working. Task-number: QTBUG-42776 Change-Id: Idbf8de29694613b240bd27affcc3d80810ce1460 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | xcb: Speed up screens' initializationAlexander Volkov2015-03-271-60/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | Use RRGetScreenResourcesCurrent to get the screen's outputs. It is fast but it may return nothing if the configuration is not initialized wrt to the hardware. Call RRGetScreenResources in this case to get the up-to-date configuration. Task-number: QTBUG-40207 Change-Id: I84dc8a45b89d0bf8881a72b02e81f701637cdb6a Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Daniel Vrátil <dvratil@redhat.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Handle SelectionWindowDestroy in QXcbClipboardMartin Gräßlin2015-03-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is related to 6a7ee92b3958e3a3ebc16be15f8bd34217ec7bd2 which added handling for SelectionClientClose. Further testing showed that with e.g. Qt 4 applications the SelectionClientClose is not emitted, but the selection window seems to be destroyed before the client is destroyed. Fur a destroyed selection window the same applies: the clipboard content is no longer valid and we should emit the changed signal. Change-Id: I173e272dbe912084deed5342d7a4adb55ea1974f Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
* | Resize backingstore properly on devicePixelRatio changesPaul Olav Tvete2015-03-251-6/+17
| | | | | | | | | | | | | | | | Task-number: QTBUG-45076 Change-Id: Ib2f2408abf7bd0b6d1c8a05fbbdc665e77ea6392 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Proper geometry conversion for devicePixelRatio > 1Paul Olav Tvete2015-03-251-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Rounding the bottom right corner position means that the size can change when the window moves. For windows we need to round the size up in order to have a stable geometry. Task-number: QTBUG-45076 Change-Id: I9a85a5915bfec55b0a7295be137b6fbfd7b53095 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Don't replay mouse press event which closes a popup on X11Alexander Volkov2015-03-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | Add a new style hint to QPlatformIntegration: ReplayMousePressOutsidePopup. Return false for it in the xcb plugin. This commit restores the behavior which was in Qt 4. Task-number: QTBUG-34814 Change-Id: I19fee762395a51475cc67b52b368c70679ca736b Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Proper screen change handling for devicePixelRatioPaul Olav Tvete2015-03-201-2/+17
| | | | | | | | | | | | | | | | | | We need to make sure that we know which screen we are on, and use the correct devicePixelRatio, depending on the screen. Task-number: QTBUG-45076 Change-Id: Ic56ad4ca8a807d584ce4938b64905ce4dd10f7aa Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | Do not build glx integration with -no-openglLaszlo Agocs2015-03-181-1/+1
| | | | | | | | | | | | Task-number: QTBUG-44998 Change-Id: I57c18cd3621a59297d3f91026903628ea6187a5f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | xcb: create a screen if dimensions are known but outputs are notShawn Rutledge2015-03-171-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts 51ada7734ad780178ecced11e0dff454dfc2e5f2 because it's necessary to keep some scenarios with vnc and remote X servers working. When an application is starting, if we don't find the xrandr outputs but we know the dimensions of the screen, we should still be able to put windows onto that screen; but when we already had known xrandr outputs and then they were removed, that's the case where we want to stop rendering (and have no screen instances) until the screen(s) are reattached. Task-number: QTBUG-31389 Task-number: QTBUG-40174 Task-number: QTBUG-42985 Change-Id: I13d0996ba6ece78c4ebcd2c3a59f1617c1c7f0fa Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: Add support for obtaining default xcb connectionJan Kundrát2015-03-122-0/+10
| | | | | | | | | | | | | | This is needed by qtx11extras now that we can meet a nullptr QScreen. Change-Id: I755523cbbbbe188f454bd518d2d86a981542458f Reviewed-by: Richard J. Moore <rich@kde.org>
* | Fix bunch of other segfaults due to null screensJan Kundrát2015-03-121-12/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was motivated by a real segfault: #0 QScreen::handle (this=0x0) at qtgui-5.5.9999/work/qtgui-5.5.9999/src/gui/kernel/qscreen.cpp:112 #1 0x00007faaf5d5e85e in QXcbNativeInterface::connectionForWindow (this=this@entry=0x7fab04d684f0, window=window@entry=0x0) at qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:483 #2 0x00007faaf5d5fa53 in QXcbNativeInterface::nativeResourceForWindow (this=this@entry=0x7fab04d684f0, resourceString=..., window=window@entry=0x0) at qtgui-5.5.9999/work/qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:304 #3 0x00007fab048b8b57 in QX11Info::connection () at /var/tmp/portage/dev-qt/qtx11extras-5.5.9999/work/qtx11extras-5.5.9999/src/x11extras/qx11info_x11.cpp:358 #4 0x00007fab02ce14c6 in NETEventFilter::nativeEventFilter (this=0x7fab04ea5e70, ev=0x7faaec003a60) at kwindowsystem-5.7.0/work/kwindowsystem-5.7.0/src/kwindowsystem_x11.cpp:229 ...at which point I tried to stop playing the get-backtrace-patch-rebuild-repeat cycle and looked at the stuff which looked fishy to my untrained eye. So this is speculative in nature, but I think that each of these cases can be hit and dereference a nullptr. Change-Id: I046debaa1b49fa55e876247fc62f3eb924496fe8 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Fix segfault when requesting root window and there are no screensJan Kundrát2015-03-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was easy to hit with KDE Plasma 5.2.1; KWindowSystem called QX11Info::appRootWindow() which in turn tried to dereference a nullptr returned from QXcbConnection::primaryScreen(). #0 QXcbConnection::rootWindow (this=<optimized out>) at qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbconnection.cpp:1303 #1 0x00007fc26da096d7 in QXcbNativeInterface::rootWindow (this=this@entry=0x7fc27d1734d0) at qtgui-5.5.9999/work/qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:425 #2 0x00007fc26da0ab21 in QXcbNativeInterface::nativeResourceForIntegration (this=0x7fc27d1734d0, resourceString=...) at qtgui-5.5.9999/work/qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:223 #3 0x00007fc27c563148 in QX11Info::appRootWindow (screen=screen@entry=-1) at qtx11extras-5.5.9999/work/qtx11extras-5.5.9999/src/x11extras/qx11info_x11.cpp:158 #4 0x00007fc27a98c444 in NETEventFilter::nativeEventFilter (this=0x7fc27d425b60, ev=0x7fc264004ad0) at kwindowsystem-5.7.0/work/kwindowsystem-5.7.0/src/kwindowsystem_x11.cpp:192 #5 0x00007fc2795d0a8a in QAbstractEventDispatcher::filterNativeEvent (this=<optimized out>, eventType=..., message=message@entry=0x7fc264004ad0, result=result@entry=0x7ffc96ecf348) at qtcore-5.5.9999/work/qtcore-5.5.9999/src/corelib/kernel/qabstracteventdispatcher.cpp:460 #6 0x00007fc26d9ea941 in QXcbConnection::handleXcbEvent (this=this@entry=0x7fc27d173580, event=event@entry=0x7fc264004ad0) at qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbconnection.cpp:971 Change-Id: I98a5d767cd7e143f00666f6fc78e9dc10893513d Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | xcb: another QXcbScreen null pointer checkShawn Rutledge2015-03-111-0/+2
| | | | | | | | | | | | | | | | | | | | In QXcbWindow::setParent(), the window may not have a screen, and in that case we cannot get the root window in this way. Task-number: QTBUG-44719 Change-Id: I719e5e2f8cad13b1460b4d9df6ffd6c4a48e0d37 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Improve handling of XRandR events in XCB backendDaniel Vrátil2015-03-114-136/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Querying X server for data can be very expensive, especially when there are multiple processes querying it at the same time (which is exactly what happens when screen configuration changes and all Qt applications receive XRandR change notifications). This patch is aiming to reduce the number of queries to X server as much as possible by making use of detailed information available in the RRCrtcChangeNotify and RROutputChangeNotify events. Firstly, the backend now does not rebuild all QXcbScreens on any change (which involved the very expensive xcb_randr_get_screen_resources() call), but only builds the full set of QXcbScreens once in initializeScreens(), and then just incrementally updates it. Secondly, it avoids querying X server for all screens geometry as much as possible, and only does so when CRTC/Output change notification for a particular screen is delivered. As a result, handling of all XRandR events on screen change is reduced from tens of seconds to less then a seconds and applications are better responsive after that, because we don't block the event loop for long. The X server is also more responsive after the screen change, since we are not overloading it with requests. Change-Id: I9b8308341cada71dfc9590030909b1e68a335a1f Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | QPA plugins: Fix const correctness in old style castsThiago Macieira2015-03-093-4/+4
| | | | | | | | | | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c946899b4ba15b Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | xcb: do not create a dummy QScreen when there are no outputsShawn Rutledge2015-03-061-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever a QWindow is associated with a QScreen, the screen is expected to be a real working one, so that rendering continues to be possible. This partially reverts 52f5e50f11a3ba82e32dc2efc656e4021a3fa4f5 [ChangeLog][QPA][Xcb] If all QScreens (xcb outputs) are disconnected while an application is running, QGuiApplication::primaryScreen() will return null until a screen is connected again. Task-number: QTBUG-40174 Task-number: QTBUG-42985 Change-Id: Id1b29dd70eaf3f2e7fd477516ce7e2bf24e095f6 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | XCB: Solve crash when plugging a screen with unshown QWindowThiago Macieira2015-03-041-1/+2
| | | | | | | | | | | | | | | | | | | | If a QWindow has never been shown, it has no platformWindow (it's null). So it's a valid condition and we need to be sure that the pointer isn't null before dereferencing it. Task-number: QTBUG-44766 Change-Id: Ia0aac2f09e9245339951ffff13c7eb024d6a0773 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | xcb: Don't log mouse moves by defaultShawn Rutledge2015-02-271-2/+4
| | | | | | | | | | | | | | | | | | It produces too much log output, so now it must be enabled by both defining Q_XCB_DEBUG and enabling the qt.qpa.input category. Change-Id: Id2eb7545a7cd07dadd70da31a1f17c2999feec0d Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Decide whether to synthesize mouse events on a per device basisAlexander Volkov2015-02-254-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently Qt uses the QPlatformIntegration::StyleHint SynthesizeMouseFromTouchEvents to check whether to synthesize mouse events from touch events. But not only platform plugins can produce touch events, they can be created by e.g. QTest::touchEvent() and in this case we almost definitely need synthesizing regardless of the platform. This commit introduces a QTouchDevice::MouseEmulation capability which replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents. So it's possible to pass QTouchDevice without this capability to QTest::touchEvent() and be sure that mouse events will be synthesized. Notice that touch pads always emulate mouse events. As a result we can activate some tests which were disabled for specific platform configurations by commits 6c1670d8c273819435867c42725c0db0eee597dc and e9760f1559361c39f269fb89f1ebd01f6ee8378d. Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: add qt.qpa.screen logging categoryShawn Rutledge2015-02-255-39/+66
| | | | | | | | | | | | | | | | | | | | | | Some existing debug output required recompiling with Q_XCB_DEBUG. Being able to enable this debugging in the field will help with troubleshooting any remaining screen management issues. Change-Id: Ie67b0009d4b00b0d39fde0fb4d8d54fcf89d6693 Reviewed-by: Sandro Mani <manisandro@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Ensure QGuiApplicationPrivate::screen_list is correctly populatedSandro Mani2015-02-251-19/+40
| | | | | | | | | | | | | | | | | | | | Ensure QGuiApplicationPrivate::screen_list always contains at least one screen, and that the first item (returned by QGuiApplication::primaryScreen) is always the current primary screen Task-number: QTBUG-42985 Change-Id: I08b880b3e94387f28230ed5fc738bceea943bad3 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Have XCB/Windows platform integration classes keep their own instance pointerSandro Mani2015-02-256-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | Through the chain of code called by QPlatformIntegrationFactory::create, there are cases where QGuiApplicationPrivate::platform_integration is accessed (typically through QGuiApplicationPrivate::platformIntegration()) before the call to QPlatformIntegrationFactory::create has returned. Change-Id: I7805b72be5b56aed5cb8ce30cb908743c9b1f91b Task-number: QTBUG-44388 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-244-14/+91
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * xcb: Update mouse buttons from MotionNotify eventsAlexander Volkov2015-02-162-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't receive ButtonRelease event after closing a popup by clicking outside of the client area. Thus the internal state of mouse buttons in the xcb plugin becomes outdated until we receive ButtonRelease event. This commit updates the internal state of mouse buttons from MotionNotify events. So when a user will move a mouse on the client area, the xcb plugin will send a mouse event with updated buttons to Qt Gui and QGuiApplication will detect the following mouse events correctly. Task-number: QTBUG-32609 Task-number: QTBUG-35065 Task-number: QTBUG-43776 Task-number: QTBUG-44166 Task-number: QTBUG-44231 Change-Id: Ica334dfbf04f7ef81db86b25262328fe5da11808 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
| * Merge remote-tracking branch 'origin/5.4.1' into 5.4Frederik Gladhorn2015-02-101-0/+12
| |\ | | | | | | | | | Change-Id: I9d668a655b548feab43e9d4b03e2437bdff76437
| | * Fix Qt over VNC with broken VisualInfoAllan Sandfeld Jensen2015-02-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears some VNC servers reports incorrect masks in their visuals. This patch recognizes this unlikely set of masks and interprets it as RGB16 which VNC expects. Task-number: QTBUG-44147 Change-Id: Ia374edcd5f0a5ce0188157ac1d328f888cfa260c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * | Listen to XI2 deviceChanged events to reset last positionAllan Sandfeld Jensen2015-02-092-10/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some drivers appears to reset their scroll positions when make the primary point. This patch listens for the device changed event and uses the information in it to update the position. Task-number: QTBUG-40829 Change-Id: If354dfde6300ceb2b81be14ea24594ab0658a6aa Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Merge dev into 5.5Oswald Buddenhagen2015-02-2328-46/+50
|\ \ \ | | | | | | | | | | | | Change-Id: Id6dbbbfc542c214fe695c6795c6aaf23aedc1cd1
| * | | Linux/XCB: added a missing arg to QXcbConnection::QXcbConnection callStéphane Chatty2015-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QXcbConnection::QXcbConnection has 3 args now, but in the call for extra X displays it still was used with 2 args. The bug has gone unnoticed so far because of default args and type conversion. Change-Id: I48b60ce6da8edb1e564010d2b4af9ae95da25316 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * | | Fix warning-as-error about member not used with Clang 3.6Thiago Macieira2015-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by Clang 3.6 on Linux: qxcbeglcontext.h:91:21: error: private field 'm_connection' is not used [-Werror,-Wunused-private-field] Change-Id: I1a800c709d3543699131ffff13c2fcf8cf013175 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * | | xcb: remove stray QDBusMenuConnection in QXcbNativeInterfaceShawn Rutledge2015-02-202-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was unintentionally left in from an earlier version of 38abd653774aa0b3c5cdfd9a8b78619605230726 Change-Id: I7b0b19ed313493562874642cae8865bb0783e366 Reviewed-by: Daniel Molkentin <daniel@molkentin.de> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * | | xcb: Check for the presence of XInput 2.2 before selecting touch eventsAlexander Volkov2015-02-172-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5309f9cdaadb87e0a577a0701d2c100d29525424 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * | | Fixed license headersJani Heikkinen2015-02-1723-23/+23
| | | | | | | | | | | | | | | | | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | | Merge remote-tracking branch 'origin/dev' into 5.5Frederik Gladhorn2015-02-174-12/+16
|\| | | | | | | | | | | | | | | | | | | | | | | Needed due to license header patch. Change-Id: Id7e30490132a7c487687a0a376419e9f9b97ea41