summaryrefslogtreecommitdiffstats
path: root/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Client xdg-shell: Fix crash when switching popupsJohan Klokkhammer Helsing2019-02-121-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | The call to flushWindowSystemEvents() sometimes caused new popups to be shown in the middle of hiding another. I.e. if multiple events show and hide surfaces, they would be shown/hidden in opposite order of their corresponding events. QMenus sometimes suffered from this (can be seen with the qopenglwidget example from qtbase). When the flush was added 5 years ago in 50f43a0c5, it was to "reduce the chances of seeing a bad frame". I don't see any rendering artifacts, though, and I can't find any bug report on it. So let's hope it's safe to remove the hack. [ChangeLog][QPA plugin] Fixed a crash that sometimes happened when switching popups. Also adds more info to the workaround warning message that appears when a popup grab is attempted and there already is another grabbing popup that is not the parent. Fixes: QTBUG-73524 Change-Id: Ibfcbb48c4bbe295c2be1a30add2d7e05cad398c5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.12.0' into 5.12Qt Forward Merge Bot2018-12-051-0/+1
|\ | | | | | | Change-Id: Ica38060e6d624a7534660eabec604f6795970c95
| * Client: Explicitly send expose window on first configureDavid Edmundson2018-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Before 88a0246a46c30e08e9730d16cf8739773447d058 we would always call QWaylandWindow::applyConfigure which in turn sends an expose event. Without that clients do not commit their initial buffer. This adds back the expose event on the first received configure. Fixes: QTBUG-71509 Change-Id: Ica39bb23245957948e1e1f75caf4f16f7b086ef7 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Client: Rename m_topmostPopup to clarify its goalDavid Edmundson2018-11-141-4/+4
| | | | | | | | | | | | | | | | | | | | This is used when creating new grabbed popups to ensure they are only created on the topmost grabbing popup as per the specification. Non-grabbing popups don't have this restriction. Change-Id: I8e2b8cd0f091688c847f81f2e5d33ce2f0df96a1 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Client: Don't require an input device for non-grabbing popupsDavid Edmundson2018-11-141-12/+18
|/ | | | | | | | | | It's valid to create a non-grabbing XDG-popup, such as a tooltip, before an input event. The current guard should only apply for grabbing popups, otherwise tooltips created early are turned into XDG-toplevels resulting in incorrect positioning. Change-Id: I5bb59a68964ef2375c81e8b4e1a73361b9d2cbcc Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Client: Don't attach buffers to unexposed windowsJohan Klokkhammer Helsing2018-10-261-3/+16
| | | | | | | | | | | | | | | | | QBackingStore::flush is sometimes called with an unxeposed window, in that case, don't attach the buffer to the wl_surface immediately, as that causes protocol errors with xdg_shell. Flushed buffers are instead stored until we get the first configure event. [ChangeLog][QPA plugin][xdg-shell] Fixed a bug where buffers were sometimes attached and committed before the first configure event, causing protocol errors. Fixes: QTBUG-71345 Change-Id: If9409d97bd25f6b13940c56141920a664c349c8e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client (xdg-shell): Only restore normal size when not maximizedJohan Klokkhammer Helsing2018-10-091-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | kwin and perhaps other compositors sometimes send questionable configure events with state set to maximized and size == {0,0}. Previously, we would then restore the m_normalSize, which would give us a maximized window with the size of a windowed (normal) one. A size of zero usually means that it's up to the client to decide, which makes sense for non-maximized windows, but not so much for maximized ones. This is what the protocol spec says about the maximized state: The surface is maximized. The window geometry specified in the configure event must be obeyed by the client. It's fixed in the dev version of kwin, but until then, let's be on the safe side and only resize the window if things make sense. [ChangeLog][QPA plugin] Fixed a bug where maximized windows would resize to their unmaximized size if the compositor sent an invalid configure event. Change-Id: I2371b29c82426ac48cd1c18c14c3dd0fe4f2250e Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-141-2/+4
| | | | Change-Id: Ia9584a185a3d7a68a4333890ade535585ba33fee
* Client: Log configure states to logging categoryJohan Klokkhammer Helsing2018-08-091-0/+2
| | | | | | | | | States are not visible in WAYLAND_DEBUG output since array values are not printed there. Logging the states to the Wayland QPA logging category gives us a convenient way of seeing what states are configured. Change-Id: If71c6df3180eba3f8efb08135a67b417940c3ffe Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-281-5/+28
| | | | | | | | | | | Conflicts: src/client/qwaylandxdgsurface.cpp src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h Done-with: Johan Klokkhammer Helsing <johan.helsing@qt.io> Change-Id: Ia39be6254a95af1c4efa831358cc06a697da3423
* Fix warning about extra constThiago Macieira2018-06-201-1/+1
| | | | | | | qwaylandxdgsurfacev5.cpp:77:97: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers] Change-Id: I6efb28c3145047559ec0fffd1538a5ce04f2721b Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Client: Get rid of QWaylandShellSurface::setTypeJohan Klokkhammer Helsing2018-06-191-15/+14
| | | | | | | | | | This shouldn't change any behavior, but lets the shell integrations choose if they want to use the extremely hacky QWaylandWindow::transientParent(). Hint: Not all shells need the hacks, and not all shells need them in all cases, and some shells may need even more hacks. Change-Id: Id105e4feb83cc9c14dcf07dcca55fcd5e63d4a2b Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Client: Remove applyConfigure for xdg-shell popupsJohan Klokkhammer Helsing2018-06-131-6/+0
| | | | | | | | It's just dead code, we can add it back in the unlikely event that we should need it. Change-Id: I209fe92fb160e022c992384d731964e774596f74 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Client: Set window geometry for xdg-shell v6 and stableJohan Klokkhammer Helsing2018-06-071-0/+2
| | | | | | | | | | | | | | | | | Eventhough, according to the protocol spec, it should work perfectly fine without setting the geometry, gnome-shell 3.28.2 chokes on it and applications get stuck in the upper right corner and can't be moved. Qt seems to be the only toolkit left that doesn't set the window geometry, so let's just do it the simple, though somewhat incorrect, way. The downside of this patch, is that the unset window geometry used to include subsurfaces that extended outside the parent surface, but here we just set it to the frameGeometry of the window. Task-number: QTBUG-68575 Change-Id: I8a9d029ff6d57bd33294658e3bfd69ff08cd38c1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Client: Move xdg-shell-v6 to a pluginJohan Klokkhammer Helsing2018-05-281-0/+337
[ChangeLog][QPA plugin] The xdg-shell-v6 shell integration has been moved to a plugin. Change-Id: I548d19590ddbc8ad3e791301359a6de17ac9dcd8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>