| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Qt we call flush() when we think the window might need to be
updated. It is also possible to trigger a flush while painting.
Two fixes:
1) If there are attempted flushes between beginPaint() and endPaint,
queue them up, and do them in endPaint().
2) Make sure we only commit the buffer once: after that the
compositor owns the buffer, and it can repaint on its own.
Change-Id: Ibf61068fa95760eb67dbc0b1d0534854114ea528
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
| |
The logging category is exported, so the name should be
specific.
Change-Id: Iffdc89875ef9e3091009780edc614fee10c05532
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
|
| |
glibc 2.27 #defined it as just "1U" instead of the kernel "0x0001U".
Same value, but because the tokens are different, this triggers a
warning.
Change-Id: I052407b777ec43f78378fffd153112449de8cf4f
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang-tidy -p compile_commands.json $file \
-checks='-*,modernize-use-default-member-init,readability-redundant-member-init' \
-config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' \
-header-filter='qtwayland' \
-fix
Afterwards I ran search and replace on the diff to clean up some whitespace errors:
- Replaced '(\n\+[^:\n]*)(:\s+\+\s+)' with '$1: '
- Replaced '(\n\+[^,\n]*)(,\s+\+\s+)' with '$1, '
- Replaced '\n\+\s*\n' with '\n'
I also had to do some manual edits, because for some reason, this particular
clang-tidy check doesn't trigger for some files.
Change-Id: I3b3909bac4bf20108bbe8ad1e01bcc54236dae1b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
Applied automatic fixes using clang-tidy's modernize-use-nullptr, and some
manual cleanup to prevent QFlag macros to be affected.
Change-Id: I88f94390185bc6e6f23693b68723cd5710815ae6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-65600
Done-with: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I34116dad8eecd01090596270965b9a24f6fe8f39
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
| |
Change-Id: If3f21fc43d0118c1819d354c8ef43f1b79617c7b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: I9699a957430b8d3574ce29acb91b7ada9ea6209b
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
which has a file descriptor we can also use to share with
Change-Id: I8d96dea9955d4c749b99fffd14cd61628c616b30
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using mkstemp. Even current glibc versions do not open the
file with O_CLOEXEC, so this code is not thread-safe. QTemporaryFile is.
And since Qt 5.10, it will also use O_TMPFILE on Linux, so the file will
not actually exists on disk.
Take this opportunity to use the runtime directory instead of /tmp.
There's no guarantee that the /tmp filesystem can support mmap'ing,
while XDG_RUNTIME_DIR has that guarantee. It's also usually a tmpfs, so
no data will be leaked to disk.
Change-Id: I8d96dea9955d4c749b99fffd14cd5335d1114cef
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
| |
Change-Id: I6e7b5869097f579020c7a4439441a63a0771e955
Task-number: QTBUG-55956
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
|
|
| |
Convert all uses of QT_NO_FOO to proper QT_CONFIG(foo) checks.
Change-Id: Id0f0b3325c246567a43d6b2d71b0d69e5535e648
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the shell surface handling for windows, and instead of
creating the shell surface at initialization time, and then attaching
a null buffer to hide it, it creates the shell surface on setVisible(true),
and destroys it on setVisible(false).
This fixes hiding when using xdg_shell, as that interface defines that
attaching a null buffer to an xdg_surface is an error.
Also this should help with bugged EGL drivers which attach a buffer
after eglSwapBuffers() returns, which used to cause a newly hidden
window to get a new valid buffer after we attached a null one, showing
it again.
Task-number: QTBUG-47902
Change-Id: I8e0a0442319a98cc1361803ea7be1d079b36fc8c
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
| |
Change-Id: I8e28d3c1dc2c2bbff4517ffe3b2f63c2ac86b95f
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|\
| |
| |
| | |
Change-Id: I75a8ddc0652f3c6f438ef98e940c9357450d29c6
|
| |
| |
| |
| |
| | |
Change-Id: I6833ab86ffdb4e37dad5108baddb7a54cfb5e9fa
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|\|
| |
| |
| | |
Change-Id: Iada0e076ee33e8d39ecc4f40edfd9764ba610c03
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: I76ae5d3e64f096eb3163d6163a38d68c7c1ca756
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I6cc8d5214c905d6b2e9f0c2eebb07d1cb897f74a
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Mikko Levonmaa <mikko.levonmaa@bitfactor.fi>
|
|/
|
|
|
|
|
|
|
|
| |
Allows more flexibility for the client to determine
additional shm formats supported by the compositor in
addition to the standard types. For example YUV formats.
Change-Id: Ib4a47c1d5bbeed9314d5ad5f5f8e1551c1dd71e4
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Reviewed-by: Mikko Levonmaa <mikko.levonmaa@bitfactor.fi>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/client/qwaylandshmbackingstore.cpp
src/client/qwaylandwindow.cpp
Change-Id: I795fd08f0fc5d3cb5ed55bf16e724f66b7567723
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some pointers need to be initialized in QWaylandBuffer and
QWaylandShmBuffer, and checked at destruction.
This avoids crashes when shm surface creation fails.
Change-Id: I6f6afa3cc6c67533b5130700cbc27b271764109e
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This class helps keeing one lookuptable for server and client
It relies on that wayland-(client|server)-protocol.h being included
before the qwaylandshmformathelper.h
Change-Id: I12158126a80c8fef5c52427d35792f33716020f1
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.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>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
src/compositor/compositor_api/qwaylandsurface.cpp
Change-Id: I3ee40153c959dbe31ea685571c5a8bb1ae36606e
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There was a race condition between the gui and the wayland event thread
which could lead to double freeing the QWaylandShmBackingStore's frame
callback. Protect the wl_callback_destroy calls using a mutex.
Change-Id: Ia70ebac208a6d4450328ba5254a850be26d84d6d
Reviewed-by: Laszlo Agocs <laszlo.agocs@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>
|
|
|
|
|
|
| |
Task-number: QTBUG-41677
Change-Id: I039ec581e960eb70eb04aed6e65add70c563ba77
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This is in preparation for decoration plugins.
Change-Id: Idb322a7a5cbc2eb5bf2cce019073f9f4fb46297f
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In an attempt to make QOpenGLWidget and QQuickWidget working on Wayland.
Since Qt 5.3 all widget windows are of type RasterGLSurface (given that
the plugin reports this capability which wayland will, with this patch).
Such a window can behave either like a raster or an OpenGL window.
This concept maps badly to platform plugins that have a rigid separation
between raster and OpenGL platform window implementations. From now on,
the OpenGL window implementation, that is used pretty much always,
except for raw RasterSurface windows, must be prepared to behave like
a raster window too, which involves having a backingstore.
Change-Id: I0226704b8d5893843fcae68059c5fe9ad2f5e761
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|
|
|
|
| |
Change-Id: I8b810e54531453b6a80250555c21bb0b1e6e76cc
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
|
|
|
|
|
| |
Change-Id: Ibf400b32f78a6a0fcf0991914d2d9ad684483979
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
|
|
And make wayland common files into a library, exporting all classes. Now
there is no need to do bulild hacks to make your own version of the
wayland plugin.
Change-Id: Ib4872863dfb5ab3f2bc0f4a94ae16fc1e7b63b88
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
|