| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Calling setPosition on a child window would not send the appropriate commit
request after the wl_subsurface.set_position request.
Task-number: QTBUG-52118
Change-Id: I792016ce7e0a5a2efd3a32a98727b43ee0275b0e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the undefined behavior in tst_WaylandClient::touchDrag and mouseDrag
Note: The test still fails if run twice in a row, but it appears to be
deterministic.
Task-number: QTBUG-56187
Change-Id: Ib45d82224f004d1324f2ce4d6b7df05ee36c04f5
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
(cherry picked from commit 0049240a2b7d8691f09224e1542919ddbbb0d864)
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-55343
Change-Id: I38e94a70585ba93d40de22698fda80530cf2156d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The previous solution did not check for nullptr before dereferencing, which
caused a crash. Furthermore, it checked the new ShellSurface's
shellManagesActiveState before deciding whether to unfocus the old one.
Task-number: QTBUG-55526
Change-Id: I410b6200a5b7b86806f70970730045a4a25f21db
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: I24ca4854aa6756f4cea4f4f5a471ffd9bf33c620
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Erik Larsson <erik@ortogonal.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QShapedPixmapWindow is used as a drag-and-drop icon. This caused two roles
(wl_data_device-icon and wl_shell_surface) to be assigned to the same surface,
resulting in a protocol error.
This bug hasn't been encountered before because QShapedPixmapWindow sets
X11BypassWindowManagerHint, which was previously used to determine whether to
create a shell surface or not.
Task-number: QTBUG-52052
Change-Id: I1d79f3ec8ad08e0be1551c39df6232876dc2ac2e
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Erik Larsson <erik@ortogonal.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far QtWayland did not support custom bitmap/pixmap QCursors.
This change adds support for them by creating a QWaylandShmBuffer and
copying the pixmap data into that buffer. The internal API to set
cursors images is changed to not only rely on wl_cursor_image, but also
allow to just set the buffer with a specific size and a hot spot.
The created WaylandShmBuffer is passed around as a shared pointer, so
that it can be automatically cleaned up once the cursor image is no
longer used on any seat.
Task-number: QTBUG-51604
Change-Id: I1f1ee87f03186c3d564468d3e8ea2a3141d7e2fb
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Johan Helsing <johan.helsing@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old logic didn't care to listen for wl_buffer.release events
so it always drew in the same buffer, potentially resulting in
tearing if the compositor was scanning out the buffer at the same time.
Instead properly cycle between a few buffers and don't reuse the same
one until the release event was received.
The old code also used to throttle the redraws, unless the buffer was
changing, that is unless the window was getting resized. This is now
lost, and no throttling is ever done. Doing it properly, by waiting
for the frame callback before committing the new buffer shows very
noticeable lags with many applications when resizing, because they
paint many times per resize event, so they fall behind the cursor.
A proper fix will be to implement the support for requestUpdate(),
and using it in the applications.
Change-Id: I02732c34769a5c75a6ad68c095bae916e4b274d3
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shell surfaces are now created for windows with BypassWindowManager
set, unless the environment variable
QT_WAYLAND_USE_BYPASSWINDOWMANAGERHINT is also set.
This means that in case you need a window to not create a wayland
shell_surface (perhaps because you do not want to use wl_shell or
xdg_shell), you can set the environment variable and get the same
behavior as before. Meaning the surfaces of windows with the flag set
will not be assigned a role.
Task-number: QTBUG-49272
Change-Id: Idf969540497d6b4e54395b97472d99d2e068be93
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
|
|
|
|
| |
Change-Id: I3ebcb49a4acf230b9515c0317aab2307dcb9270b
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/client/qwaylandwindow.cpp
Change-Id: I80ead87f3e1f36299b1bf9cc9c7db6cd48c0e86f
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QToolTip has the same problems as QMenu, that is you can create one
without a parent and with a global position. Use the same trick and
use the window that last received an input event as the parent.
Change-Id: I093c8da0d54110903f35670b01dea6fa96abecf4
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|/
|
|
|
| |
Change-Id: I52628f87dbea5383db06468f9748a9bacdec3179
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|
|
|
|
|
|
|
|
| |
We must offset the wheel events' position, as we do with the other
types of mouse events.
Change-Id: If85e93ffe95304c7dee4c2a3ff195a73243a8182
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/client/qwaylandshmbackingstore.cpp
src/client/qwaylandwindow.cpp
Change-Id: I795fd08f0fc5d3cb5ed55bf16e724f66b7567723
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The appId is the desktop entry identifier.
According to the desktop entry specifications [1], for applications the
part of the name should follow the reverse DNS convention (see [2]).
To do this we use the application domain if available, otherwise for
lack of information we fall back to the executable base name like other
toolkits such as Gtk+ do.
[1] http://standards.freedesktop.org/desktop-entry-spec/latest/
[2] http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s02.html
Change-Id: I181ad23a9736844e07e8060d78e756a943c27f67
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes the decorations stealing the mouse events when going outside the
content area.
Change-Id: I8f3592fbda6b9c1da6498d74820a73be11c6999d
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
dynamic_cast can not be used when RTTI is disabled, so make
QWaylandShellSurface a QObject.
QWaylandWlShellSurface and QWaylandXdgSurface must also inherit from
QWaylandShellSurface first, to properly inherit from QObject.
Change-Id: I2addb8105a0fe61615d4bc905414f7ee7277029f
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I5a74d32515c3f1fe7aa1916f4241c92832510f8c
Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/client/qwaylanddataoffer.cpp
src/client/qwaylanddisplay.cpp
src/client/qwaylandinputdevice.cpp
src/client/qwaylandwindow.cpp
src/compositor/compositor_api/qwaylandsurfaceitem.cpp
Change-Id: I2eae0fd43a71fbfd7c907ca715707a26f3c134c5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Popups are pretty important for widget apps. Menus, combobox dropdows
and such are all popups. Currently they are completely borked when
activated via keyboard or touch. This is because of the bizarre set_popup
request in the protocol, and Weston's current implementation, that ignore
the fact that a popup can be opened as a result of a keyboard event too
or may not originate from an input event at all.
Pass the last input device and serial we have seen, regardless of the type,
by tracking it globally in the QWaylandDisplay.
With this patch menus and such will not freeze the application anymore
when activated with keyboard or touch without sending a mouse event
to the window first. The behavior is still broken in some ways, especially
with keyboard due to immediately getting a popup_done, but at least
applications remain usable.
Task-number: QTBUG-41142
Task-number: QTBUG-41147
Change-Id: I18de501004ae8a62ff8667e72225d08c2d3ba491
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The QMenu API doesn't play well with Wayland. You can do:
QMenu menu;
menu.popup(someGlobalPos);
which is completely broken on wayland. If some popup window doesn't
have a transient parent use the current focus window for that.
Fixes right-click popups in qdbusviewer and other apps.
Change-Id: I3227f4ec27431ca8ec156971cbfdbf1e848a0527
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ib9a0152f83af433354d32ef4a8a233e5551ded8c
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There currently is a QWaylandInputDevice class both in the wayland QPA
plugin and in the QtCompositor API. This causes the qwindow-compositor
example to crash when running nested in a wayland session due to a
mismatch between the two classes.
By namespacing all the plugin code we make sure that name clashes
will not happen anymore.
Change-Id: I17497cff697599200bea68bf01dfde474526390f
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The wl_pointer.event carries the surface local position of the pointer.
Notify Qt of it, without pretending it to be a motion event.
Change-Id: Ibbe1d125a93b478f9c350a50bfea25b01f628178
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Wayland 1.2 added support for display scaling, where wl_output
has a "scale" event informing the the client that the compositor
will scale the output surfaces by the given factor. The client
then has the option of providing large surfaces to match the
target pixel densety and bypass the compositor's scaling. This
is done by calling wl_surface::set_buffer_scale.
Re-use the current high-dpi support in Qt by implementing
devicePixelRatio() for QWaylandScreen and QWaylandWindow.
Provide high resolution buffers both for raster and OpenGL
graphics.
Introduce a new coordinate system: buffer coordinates, which
is related to the window coordinate system via an "int scale"
scale factor. This scale factor corresponds to Qts qreal
devicePixelRatio, but we keep the name and the type in the
QtWayland implementation.
Change-Id: Ie10d7e5b4833480a9a25d96a26ad02150eb6e83f
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Merge done by Giulio Camuffo
Conflicts:
src/client/client.pro
src/client/qwaylanddisplay.cpp
src/client/qwaylandinputdevice.cpp
src/client/qwaylandinputdevice_p.h
src/client/qwaylandwindow.cpp
src/compositor/compositor_api/qwaylandsurface.cpp
src/compositor/compositor_api/qwaylandsurface_p.h
src/compositor/wayland_wrapper/qwlsurface.cpp
Change-Id: I1df878bb54f49d953c51215a2772869e261ebe81
|
| |
| |
| |
| |
| |
| |
| |
| | |
When binding globals take care of the version the compositor provides
and don't call requests that the compositor doesn't implement.
Change-Id: Iea0c534fb9e005720857e2778e380b6a9c22a6f3
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QWaylandShmBackingStore installs a frame callback on flush, and subsequent
flushes will not attach a new buffer until the callback is fired.
If the window is hidden while we're waiting for the callback, we attach
a NULL buffer, so the compositor will not redraw the surface and will not
fire the frame callback. When showing the window again the backing store's
flush() will wait indefinitely for the frame callback to attach its buffer.
To fix it destroy the frame callback when the window is hidden.
This was easily noticeable when fast switching between popup menus.
Change-Id: Ic0c71ed79e2fab9faf452f63b05bc4576ea9a3ba
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use the EGL_KHR_create_context extension if available to create modern gl
contexts. We disable window decorations on core profiles because that
mandates a VAO to be used.
Change-Id: Id6044e64f6736244ae9d593af4d68c4000a31de6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QWaylandAbstractDecoration.
This makes absolutely no sense. Just do things inline.
Change-Id: Ic6d4e62bc9b3c0a4533f63740f2608a0be201047
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Convert to a D-pointer, split between abstract base class and an implementation.
Also move implementation of the current built-in decoration to the "bradient"
plugin, named in glorious memory of the programmer-designed blue gradient that
will forever sear our eyeballs.
The decoration plugin may be specified using the environment variable
QT_WAYLAND_DECORATION.
Change-Id: Idc99ab06ae138ad299bad2b62b9595379bd007ab
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
| |
| |
| |
| |
| |
| |
| | |
This is in preparation for decoration plugins.
Change-Id: Idb322a7a5cbc2eb5bf2cce019073f9f4fb46297f
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/compositor/wayland_wrapper/qwlcompositor.cpp
Change-Id: Ica26e33eb2b77ed5be0e84e8f4256d2e85abfaf5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
You cannot have rounded corners with an alpha-less config. To make OpenGL
applications appearing with the correct decoration, alpha must be enabled.
With this fix the OpenGL apps' decoration will now look identical to the
SHM apps'.
Change-Id: I24431ddab63146f7f697c85277f00f41e5c55e85
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The data_offer object should be invalidated when client loses keyboard focus.
Otherwise in following scenario, it will become zombie object: start app1 ->
copy text -> start app2 -> paste text -> close app1 -> paste again in app2 ->
seg fault in qtwayland.
The root cause is that when app2 takes focus the first time, data_device.data_offer
event was sent to it from DataDevice::setFocus. When app1 is closed, the data source
reference in data offer becomes invalid. so when trying to paste again in app2,
segmentation faults
Change-Id: I16a584e80fddaadd269b00cdf39eb405dd95b622
Task-number: QTBUG-41005
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
It was already possible to drag it via the mouse but not via touch.
Task-number: QTBUG-41085
Change-Id: Ia52c7124fb2f1aa0331897bd072fcf09fb78aa1a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Custom client buffer integrations may not care about window decorations.
Setting QT_WAYLAND_DISABLE_WINDOWDECORATION is tedious and error-prone.
And it cannot be omitted since things like input events will be off if the
common client code thinks decorations are in use but the client buffer
integration does not render them at all.
Therefore add a supportsWindowDecoration() virtual in addition to the
environment variable.
Change-Id: If8f621182d5c230f4d8d679c050f5d27aed6c2fb
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
| |
| |
| |
| |
| | |
Change-Id: If0483f5e81a033b275ddc14eb1e44ff82fa1ce65
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
| |
| |
| |
| |
| |
| |
| | |
qwaylandwindow.cpp:443:25: warning: ‘transform’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Change-Id: Ic0a96cfda35d331c9957a527eea7f8b987191b5f
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
| |
| |
| |
| |
| |
| |
| | |
Caught by tst_QWidget::mapFromAndTo.
Change-Id: I36e08ebfa3bae1ac8667ee828b1762867d71c66d
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|\|
| |
| |
| | |
Change-Id: Ie82592f160ebf545fac7b864db5e38c9ce9bb41f
|
| |
| |
| |
| |
| | |
Change-Id: I570bbe77185637ebe621e6c915eef2f4442fdd84
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
|
|/
|
|
|
|
|
|
| |
Also fix input region handling in compositor.
Change-Id: If88ad6a03443526eddee045d7af54daf5057373a
Done-with: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some platforms (especially non-desktop ones) may use a custom
Wayland shell extension, more tailored to the form factor than
the generic and desktoppy wl_shell or xdg_shell. Instead of stuffing
N protocol implementations in the QPA plugin use a plugin architecture
to allow them to live out of tree.
When creating a shell surface the QT_WAYLAND_SHELL_INTEGRATION env
variable will be checked, and if it points to a valid plugin that
will be used to create the shell surface, falling back to wl_shell
or xdg_shell if no plugin is specified.
Change-Id: I05019174bb915199dd726f5fdcc0385ef846e8de
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Reviewed-by: Philippe Coval <rzr@gna.org>
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
|
|
|
|
|
|
|
|
| |
Drop the custom request in the surface extension, and use the
wayland core mechanism.
Change-Id: I580f56c90bcd3b2c5a6da08d1a033b10790ac330
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
|
|
|
|
|
|
|
|
| |
The wl_output interface has an event for signaling the rotation of
the display, so use that instead of our own thing.
Change-Id: I8a017d575ee456a7a81649e19a015085fb784805
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
|
|
|
|
|
| |
Change-Id: I940bcbc509a689804a02f71af45f5efc19bccf9f
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The feature is disabled by default,
and can be enabled at runtime
by exporting QT_WAYLAND_USE_XDG_SHELL env variable.
This patch relies on presence of protocol file
which has been imported from weston-1.4.0 sources,
until the xdg-shell is merge into wayland itself.
Because xdg-shell is experimental,
code fallback to WaylandShell if no XdgShell
but keep in mind those shells are exclusive.
Since xdg-shell and wayland-shell share most of the API,
some factorization is done by an (empty) abstraction class
to keep the code more readable.
Despite xdg-shell introduces new popups concept,
they're not used on this change for maitainance purpose.
Notes:
* This change depends on presence of xdg-shell protocol file.
* You can check a demo video
(qt-tizen-cinematic-experience-20140430-rzr)
of the test case at :
https://www.youtube.com/watch?v=pY_XXvKc_0E#
* Use Super+Tab to show window again if hidden
Task-number: QTBUG-38633/part/2of2
Change-Id: I2d7ed85bea1847d82439fdfc893a3dbb2581c14a
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QWaylandWindow::setGeometry() is a virtual call and internally it
would call windowType() which is pure virtual, so calling it from
the constructor won't work.
Instead, set geometry explicitly from the constructor and call
setGeometry() on setVisible(true). This also merges it so we send
one expose event (with correct x/y offset) on geometry change + show.
Change-Id: I1d21664c982005c60c8d73740e43b3a463bac4a8
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|