| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Change-Id: Ie6ec1ae90396619214cf1f29ae9595c5f1915e10
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
| |
When setting a transient window also evaluate the state of the window
attribute WA_ShowWithoutActivating. If that flag is set the transient
should get the inactive flag as well.
Task-number: QTBUG-55403
Change-Id: I757e5527e78f730a440e26abb52e84c9b2bb2f3a
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
This is a backported fix from the 5.7 branch.
Original patches: 93ca929fb9caf347150 and d6fe7b6165859e17f03
Change-Id: Iaec5acb314d3bbc199e962a5dc27a70f0d2df655
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Popups used xdg_surface instead of xdg_popup. It's not possible to set a
position for an xdg_surface, because it's supposed to be a top level window (in
xdg shell v5). Consequently, popups were treated as top level windows and
positioned randomly on Weston.
Using xdg_popup instead solves the problem.
Task-number: QTBUG-55063
Change-Id: I223348677ef8a1ef1eee6a4c389276a6c802bcb5
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Also add drag-and-drop tests for both touch and mouse.
Task-number: QTBUG-54756
Change-Id: Ibfff48b1f2377022a8624e28e9f638076187ddca
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
| |
Change-Id: Ic66faf02f7d4eb82aa898a2858a0271a007460a0
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
|
|
|
|
|
| |
Change-Id: I6833ab86ffdb4e37dad5108baddb7a54cfb5e9fa
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Iee19b36ae2032112e0097dc6eb2e4592697c2a1c
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
|
|
|
|
|
|
| |
Change-Id: I10e550a25ce498bbeedc242ac73059cc6fdcef30
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
|
|
| |
The previous code seems to have been written under the impression that
QWindow::width() included frame margins, causing the resizing areas of the
window decoration to be too large.
Change-Id: Ia13f12afd88a4017d01853798226455b84290d01
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When maximizing xdg_shell clients, the clients would call
QPlatformWindow::setGeometry() with frame margins included, resulting in a
window that was bigger than what was requested by the compositor.
The reason for this, was that QWaylandXdgSurface would subtract the frame
margins from the width and height only when the resizing state was set, not
when the maximized state was set.
Later, margins were added again before QWaylandWindow::configure was called.
This resulted in margins being subtracted and then added back for the resizing
state, while for the maximized state margins were only added and never
subtracted.
This behavior has now been simplified so only size including window frame is
tracked. This is what we receive in the XdgSurface::configure event anyway, and
also what QWaylandWindow::configure expects.
Change-Id: I0629e7e79a5367fa872743c6d025bfab8a4f2866
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
| |
Change-Id: I40d96362131124effd9405cdad4e3dea79e6ebe3
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Only the width and height were scaled previously, causing an incorrect
offset from the lower left corner, resulting in a small transparent gap
to form between the decoration and the content on the right and top.
Change-Id: I0b253c05c9b260d9ff3a6ab5f8aea42370561959
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Weston stopped sending the wl_data_device.drop event if the data offer
was not accepted, which was the case when it was coming from the same
client that was receiving the offer. So now always accept the offer
even if we will bypass the offer when retrieving the data.
Change-Id: If825f4dbc962a7812e379f36a42ceabe3eb3096f
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
This fixes a protocol error the compositor would send when a window
changes its parent, because we were creating a new subsurface without
destroying the old one.
Change-Id: I0855d0582153e0aff37be508d9fb43d22c9ad0b5
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.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>
|
|
|
|
|
|
|
|
|
| |
The implementation of attached() method was removed in commit 'Fix SHM
drawing logic' (19260d9846861212881e374229798b3863d1a78d) but the
definition in the header file was not.
Change-Id: Ib850bc7101a661882078be95011d75660f621622
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
... or equivalent.
QtBase 5.6 headers already compile that way, so let the other
modules follow suit.
Change-Id: Iddf561087189ece6dd34b42605842dfafdbd8b4e
Task-number: QTBUG-45291
Reviewed-by: Johan Helsing <johan.helsing@theqtcompany.com>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
|\
| |
| |
| | |
Change-Id: If2caca2463ef6815d2cc9a8f05ccd78c867c95d2
|
| |
| |
| |
| |
| |
| |
| | |
qwaylandinputdeviceintegration_p.h:64:85: error: ‘uint32_t’ has not been declared
Change-Id: Ic747cc2ab45e4dc6bb70ffff143843d1ed4a341b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.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 code used sizeof(state) when it should have been sizeof(*state).
Change-Id: Id1714a5e90e6c58850023424726de26719a69046
Reviewed-by: Paul Olav Tvete <paul.tvete@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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Check the surface hasn't been deleted before initiating the ping so
that an invalid resource isn't dereferenced when printing a warning
after the operation inevitably fails.
Change-Id: I18c82de280d5a7a5339e3179c2bba49800626bb6
Reviewed-by: Johan Helsing <johan.helsing@theqtcompany.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
| |
| |
| |
| |
| | |
Change-Id: If46406b4129b464e8ccfa0b4cf6ff2989402ca74
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
this fixes static builds by ensuring that all dependencies are exported.
Task-number: QTBUG-51071
Change-Id: Ie9e89fa47696244e8ee478ed1a019765c835533e
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ia3dd8627c1b96a88d308dc7fa85d936f809c7856
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Let Ctrl+A cause a key event with text Ctrl+A (0x01), like we do on
the other platforms. Previously we would use 'A', which would confuse
some applications.
Task-number: QTBUG-50398
Change-Id: Ie3def4bd9c96e538b2572b88fae029d347e08814
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was too aggressive, if there is a queued buffer the current one
needs to be invalidated or the compositor will hold references to
both buffers while the scene graph is stopped which will block
clients in eglSwapBuffers.
This reverts commit 438063af85d0999f9dead6f04a3285edb175e24c.
Change-Id: I3247cfc94e12322fcccc07b5dd64146b055ab431
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
contains(QT_CONFIG, egl) and CONFIG += egl is the only sane way to test
for and pull in EGL headers and libs. This is particularly important when
trying to be robust and guard against half-broken sysroots on embedded
where a naive PKGCONFIG += egl breaks.
Also add an EGL_WAYLAND_BUFFER_WL define to keep wayland-egl compiling.
We are not testing for that in any config tests may cause a failure in sysroots
that have parts of Mesa thrown in but pick ip an older EGL header from the
vendor's driver.
Change-Id: I7b7e6a7a91e78dbda5b6954ad08761298c538efc
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Directly calling eglCreateGlobalImageBRCM and friends is not ideal due to the
messy RPi distro setups: shipping Mesa (sw rasterizer only) in standard locations
may cause picking up those EGL/GLES libs instead of the Broadcom ones from /opt/vc
when building Qt. While this is something that should be fixed in the sysroot (since
it is a problem at runtime anyway), let's make life easier by resolving via
eglGetProcAddress, which is the right approach in any case.
Change-Id: I73f7698b638691d97743a6f819bc7c8ee6ebd245
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
|
|
|
|
|
|
| |
qwaylandinputcontext.cpp:57:16: warning: unused parameter 'sym' [-Wunused-parameter]
qwaylanddatadevice.cpp:173:135: warning: 'dragData' may be used uninitialized in this function [-Wmaybe-uninitialized]
Change-Id: Id654360fd9b7fdb572565ad39b664af3355b5e79
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Also add unit tests
Change-Id: I66de887607f73b318884e4a35f18510b90cf0315
Task-number: QTBUG-47357
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
|
|
|
|
|
| |
Allows to get the wl_shell_surface for a QWindow, if it exists.
Change-Id: I16b1c578a1c605e58c96e94ae55a3331ecfa353d
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
|
|
|
|
|
|
|
|
| |
With commit c55a36cb9015cf1eebd49eaa5b1b4f4ec9b28451 in qtbase the
QSimpleDrag code changed in a way that caused a deadlock due to
drawing a window without a role. However, thanks to that we can
now remove that start/cancel hack and simplify the code.
Change-Id: Icba6e7c9c4927855e48fb21632db1a10332c4ffb
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For Wayland on NVIDIA. Tested with a Jetson TK1 Pro and Vibrante Linux.
With just the hw integration no compositors would work out of the box
since EGL_KHR_stream_consumer_gltexture only allows connecting to the
texture bound to GL_TEXTURE_EXTERNAL_OES, meaning that assumptions about
the target always being GL_TEXTURE_2D break horribly both in C++ and in
shader code.
In addition, buffers have to be extended with an additional updateTexture()
operation as EGLStream requires to call ConsumerAcquire on every
frame. Previously there was no concept of this as calling
createTexture() on attach() was sufficient.
Qt Quick bits are omitted since the refactored compositor API is pretty
different. This means that QML compositors will not currently function
in this environment.
The qwindow-compositor example is enhanced to support the external
texture target, but this won't apply for the refactored branch
either. It is provided for testing purposes for the time being, and to
show how C++ compositors can support different texture targets and
correct operation with EGLStreams.
Done-with: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Change-Id: I0e209fc0cbcf435cca83528d938eb50e4bdceb82
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a QtWayland compositor gives focus to a surface right after its
creation during the client startup, the keyboard resource may not be
bound yet by the client.
In this case, the surface is correctly marked as focused, but the
keyboard resource is never marked as focused, and thus no keys are
ever sent to the client.
To fix this, the focusResource is updated if needed after wl_keyboard
is bound.
This can be reproduced with weston-simple-im (patched to use wl_shell
instead of xdg_shell) and qml-compositor, modified to enable
TextInputExtension and call takeFocus() at the end of windowAdded().
Change-Id: I551cb5bc56c05a1e5187b23108f4ef80468782dc
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
|
|
|
|
|
|
|
| |
When no keyboard resource is bound, the destruction handler for the
focused surface was not called, and the pointers to focused objects
were not reset. Thus the m_focus surface pointer could become invalid.
Change-Id: Iee404219304ae7b2bae87131ab140ab134e98118
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
|
|
|
| |
Change-Id: I2a7b82bd2705919a91492edfccac02f4d8fc2c9b
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I70c01453b3939d1d645d626ae84c21ab4c9d267a
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|\ |
|
| |\
| | |
| | |
| | | |
Change-Id: Ib3c5bec85a09d92e37a3af8e1c749a80cb40c056
|