| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
cursorSize was a static which was multiplied with the dpr each time
loadCursorSize was called resulting in a bigger and bigger cursor size.
Fix it by making the static constant.
Change-Id: Ie23cf0cc0d6c13721feecebe214d7c794be35077
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can't trust QWindow::isActive, because it relies on focusWindow, which may
be updated too late, and there might also be multiple active toplevel windows
at once on Wayland. Even though Qt doesn't support multiple seats, we should
still draw the decorations of active windows correctly.
This implements QPlatformWindow::isActive and uses it in the decorations.
Change-Id: I34d79b354e2d26694533e2319a26f24085212243
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QPA plugin] Added client-side support for the
xdg-decoration-unstable-v1 Wayland extension. Qt clients will now let the
compositor draw the window decorations if configured through this extension.
Note: The env var QT_WAYLAND_DISABLE_WINDOWDECORATION is still supported, but
works on a higher level, and for all shell integrations, while xdg-decoration
only works with xdg-shell stable.
Task-number: QTBUG-69746
Change-Id: I9dd0331bbd8d624c6be54ed23ee3b96446d5820d
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
XdgOutput is an extension of wl_output with the benefit of having the
logical size of a screen as an explicit parameter, instead of clients
inferring it from modeSize / scale. This is useful as it allows
compositors to implement fractional scaling whilst clients can still
fill the screen.
In the future XdgOutputV2 will support a more useful name and ID that
we can use.
[ChangeLog][QPA plugin] Added support for xdg-output-unstable-v1
Change-Id: I2e1e64ad6cb497a1cbb7b7b170f28ac92231c2c4
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-68834
Change-Id: Iced478d12b56fc360c0d824cf5876855d887f9a2
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...and out of QWaylandCursor. Encapsulates the ugly details of wayland
cursor themes, and presents a simple interface.
A theme is created with a given size and theme name. wl_cursor_images for a
theme can be acquired through:
wl_cursor_image *QWaylandCursorTheme::cursorImage(Qt::CursorShape shape);
Change-Id: Ia6fc6f2997133ca25c1610ecdf075ecb5c4edbfa
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
| |
Now cursor themes load once per device pixel ratio, and not once per screen.
Task-number: QTBUG-67796
Change-Id: I4c253e65a791d69e7d510c4228989390a4343110
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove the "dummy" request, which seems to be just leftover test code.
- Rename the event from "qtkey" to "key". We've already prefixed the
global interface, no need to also prefix the event.
- Prefix the global with `zqt_` and suffix it with "_v1". If we make
backwards incompatible changes, we should bump the suffix, rename the
xml-file and reset the version number.
- Add some documentation to the xml file.
- Add notice about (lack of) compatibility guarantees.
- Four spaces for indentation
Task-number: QTBUG-68423
Change-Id: I78f0eaff4cac22f27318ba32c83c83feb2de857a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QPA plugin] The wl-shell shell integration has been moved to a
plugin.
This also adds API so shell integrations can return native resources for
windows, as it was needed in order to continue to supporting wl_shell_surface.
Change-Id: Ibc68ffcc5b0c6993d8f4e078f663e4d67340e1a5
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
If nothing is trying to access QWaylandScreen::cursor() leave the platform
cursor uninitialized. This in turn avoids initializing cursor themes, which may
use a significant amount of shared memory depending on the cursor size, number
of screens and screen DPI.
Task-number: QTBUG-67796
Change-Id: Ifd062cb52c4889adcaadeb00bea928b8e84a2182
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Adapt the cursor size to the screen's devicePixelRatio, so we are not
forced to have a tiny cursor on a high dpi screen or a huge cursor on
external low-dpi displays.
Change-Id: I3712dc64e5c5e2e05d0dc5943bd49ba5c1335cd3
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first step in deprecating xdg-shell unstable v5 and making the good
names available for the good names for xdg-shell stable.
Shell initialization has been refactored slightly, so the
QWaylandShellIntegrationFactory actually tries to initialize the shell
integration before returning it. Similarly for the factory method of non-plugin
shells.
Change-Id: I85e60594c4fc03c6f302c04316110aed428d28dc
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ic42119e47afc7bda72eb985fe86d1343a762c274
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QPA plugin] If we're unable to create a connection to the Wayland
display, fail gracefully so other platform integrations can be tried instead.
This also adds QWaylandIntegration::hasFailed() which can later be extended to
report that the platform plugin is unusable for other reasons. I.e. no
compatible shell extensions or similar.
Task-number: QTBUG-59762
Change-Id: I0f1ae73982e2860814235c1a189741d130e1db3e
Reviewed-by: Paul Olav Tvete <paul.tvete@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>
|
|
|
|
|
|
|
|
| |
If QWaylandDisplay is deleted while waiting for a sync callback, don't leak the
callback.
Change-Id: I4fd46cdc8c431e44998d70d1afc01018c4908f27
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
|
|
| |
Use begin()/end() instead.
Change-Id: I1a73b4518ee7408271ec913a219c034e330b0d5a
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Sometimes the callback in forceRoundTrip would be handled in response to the
QEventDispatcher::aboutToBlockSignal signal emitted at the start of
processEvents, and would wait there for more events that may never come.
Task-number: QTBUG-64696
Change-Id: I4e38a4dd4158afc606e779ff615b5eef98b955b0
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't assume that no-draganddrop implies no-clipboard. Introduce
a new private feature wayland-datadevice which contains the
common functionality. This feature cannot be controlled independently,
but is automatically disabled when both clipboard and draganddrop are
disabled.
Change-Id: I6aac09c7ee524e3b11f0a1caa4a6c62fc3f1d10f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
| |
Move QWaylandDisplay member functions into the correct .cpp file.
Change-Id: Ie3915d2bd0d191900ad2fd306564bb732e40221a
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
|
| |
Change-Id: Ia480913fd9986cbd306858d1fb497e1fb70551f0
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
| |
Change-Id: I195efecca9350cb519865f251cdee9c6e23d3592
Reviewed-by: Lars Knoll <lars.knoll@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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If m_shellSurface was deleted, there was no way for QWaylandDisplay to know
whether the shell handled window deactivation or not.
The shell integration now always handles the window active state. The default
implementation of QWaylandShellIntegration will make a window active on
keyboard focus.
Change-Id: I80cfce9976b1d3c57094fdd8980c9110b873f239
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|\
| |
| |
| | |
Change-Id: Ibfe6fe6ed983b537d55544883b7dc75e5cc3fc37
|
| |\
| | |
| | |
| | | |
Change-Id: I1efd16d6c5f939d61001376c3b010eae1927595b
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make QtWaylandClient compile when Qt is configured with:
-no-opengl -no-accessibility -D QT_NO_CLIPBOARD -D QT_NO_DRAGANDDROP -D QT_NO_SESSIONMANAGER
Task-number: QTBUG-56192
Change-Id: Idc6aae6b36a35515109a27bed31a22e3e909ef27
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
|/ /
| |
| |
| |
| |
| |
| | |
The mininimal-cpp compositor example does not have any shell extensions.
Change-Id: Ifec2822ef4f5944eed02c19ddfc47419051364a4
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I6784a53fcc2f0f68b8e916181cb8cdef263782b8
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/client/qwaylanddisplay.cpp
src/client/qwaylanddisplay_p.h
src/client/qwaylandxdgpopup_p.h
Change-Id: If86ea09971773dc6c541f07819459a90e8ab73a0
|
| |
| |
| |
| |
| |
| |
| |
| | |
This simplifies the code in QWaylandDisplay and hopefully makes it easier to
implement a prioritized shell selection mechanism later.
Change-Id: I2bb3a13f8acedb60a6606cb3a8b5b228095eadf9
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Let shell surface implementations decide if they manage activated state. Moves
the logic out of QWaylandDisplay.
Change-Id: I75c86df68a1a93f9b1d2bf378b6603215d0b0128
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I75a8ddc0652f3c6f438ef98e940c9357450d29c6
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
According to the xdg_shell protocol, the compositor is allowed to set multiple
active windows. Qt's model, however, allows only a single active window.
In order to map between the models, a list of the compositor's active windows
is kept in QWaylandDisplay in the order they were activated. Hence, the front
of this list will always be the most recently activated window, and it will be
mapped as Qt's active window.
Previously keyboard focus was used to determine the active window, this method
has been disabled for xdg_shell.
Functionality for delaying the call to
QWindowSystemInterface::handleWindowActivated has been moved from
QWaylandInputDevice::Keyboard to QWaylandDisplay so the implementations can
share the workaround.
Task-number: QTBUG-53702
Change-Id: I878151f9c52ed09a8d6571c6208920436c3ca8fc
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/client/qwaylandinputcontext_p.h
src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h
Change-Id: Iac517e1985e4e67d7ca00ca4c10dcda9dd9079f9
|
| |
| |
| |
| |
| | |
Change-Id: Iee19b36ae2032112e0097dc6eb2e4592697c2a1c
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update text input support to upstream text-input protocol v2 from
wayland-protocols. Remove support for input-method protocol for now.
Map text-input protocol on compositor side to the Qt input method API,
this allows to use any qt platform input method on compositor side
(especially qtvirtualkeyboard). Add support for qtvirtualkeyboard to
pure-qml example.
Implement all missing functions of the text-input protocol.
Change-Id: I597451ff65454a63dff86026b6a8d1ffbe07ce02
Done-with: Zeno Endemann <zeno.endemann@kdab.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/client/qwaylanddisplay_p.h
Change-Id: I602b90a055d1322af369fb7b77a68583154b660f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the compositor sends events to us while the main thread is blocked
the socket notifier in the events thread would keep sending out the
activated() signal, but no events would actually be read until the
main thread starts to run again. That causes the event thread to keep
queueing new events, and so allocating memory, potentially forever.
This patch fixes the issue in maybe a bit radical way, that is by removing
the event thread. The socket notifier now runs in the main thread so it
will block if the events are not being read.
Nowadays there is no real reason to keep the event thread around, as every
thread that needs to receive wayland events can dispatch them on its own,
we don't need a central dispatcher thread anymore.
Change-Id: Ib7885e4b038b82719d78d193f465618a72cbe6af
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/client/qwaylandintegration.cpp
Change-Id: I29120f06d33c2d383a41cf35ca4a59f5d8548ad7
|
| |\
| | |
| | |
| | | |
Change-Id: Ib3c5bec85a09d92e37a3af8e1c749a80cb40c056
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When calling ::exit() the socket notifier in the events thread may still
fire before the process actually exits, using objects that are being
destroyed and resulting in a segfault.
Stop the events thread before calling ::exit().
Change-Id: I187762da2a7efa83db1e62b0e28dfab89f478c7d
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/client/qwaylandwindow.cpp
Change-Id: I80ead87f3e1f36299b1bf9cc9c7db6cd48c0e86f
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It is a bit dangerous to call wl_display_dispatch() in the event thread,
since it may race with the dispatch called e.g. in QWaylandDisplay's
blockingReadEvents() and lead to a dead lock. Instead, use wl_display_prepare_read()
and wl_display_read_events() in the event thread, which doesn't block, and only
dispatch in QWaylandDisplay.
As a result we don't need the additional wayland queue anymore, so remove it.
Change-Id: I9fbbe5d2f38d06773beb7847df1a0212cca92c37
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|