EGL_WL_bind_wayland_display definitions are needed only in one cpp file,
so move them there instead.
We need to duplicate EGL_WL_bind_wayland_display definitions because
libepoxy doesn't define them for us.
At the moment, the render backend provides its specific implementation
of LinuxDmaBufV1ClientBuffer. This has some of its limitations. For
example, due to the strong coupling, compositing restarts must be
handled carefully. It's hard to have a generic code path to import
dmabufs, which would be nice to have in order to unify graphics buffer
allocation across various backends; currently, it's all scattered.
To make the code simpler, this change drops the commented out YUV import
code path for now. Given that Mesa implicitly handles it, the need for
it is no longer so urgent.
ending a drag will update focus. Kwin explicitly resets it to whatever
is now under the mouse now that the implicit grab has ended.
This means no-one sends a pointer up.
Clients (xwayland) don't automatically make leave events count as a
mouse up, because typically you don't get a leave event whilst we have a
grab.
Xwayland also can't track the status of the wl_datasource as it didn't
use it.
This patch shouldn't affect any wayland clients as we don't send a frame event
until the focus changes which is after the dnd_finished events.
BUG: 465444
Testing done:
- dragged firefox under xwayland tabs out from firefox to the desktop
- confirmed a new window appeared
When showing the window RHI will realise the window has no underlying
platform window and create a temporary offscreen surface, different from
the offscreen surface we'll eventually be rendering into. This will use
the format of the main window.
If this offscreen surface format does not match the format of the
context we can fail in makeCurrent calls.
When a window is removed from the deleted list, some effects can perform
cleanup. In its turn, it means that they can call some Window methods.
If those methods happen to be virtual, kwin can crash because calling
virtual methods in the destructor of a base class has undefined behavior.
maliit creates a fullscreen overlay window which doesn't go along well
with out geometry abstractions. For example, raw frame geometry can't be
used to displace normal windows otherwise they will be pushed offscreen.
Some of the maliit quirks are leaked in the InputMethod class. After
extending the lifetime of the InputPanelV1Window, they can cause
problems.
In order to make code in InputMethod more intuitive and encapsulate
maliit quirks, this change makes InputPanelV1Window interpret the
bounding rectangle of the input shape as the window geometry. This
lets us get rid of the hack in inputGeometry() too.
The size checks in Mode::VirtualKeyboard case have been removed because
they should be irrelevant. When reposition() is called, the wl_surface
is mapped, so its size cannot be 0x0.
Prior to dropping Deleted, we implicitly relied on the fact that the
QPointer storing the focused window will be reset to null when the
window is closed so we didn't include any cleanup logic.
After dropping Deleted and extending the lifetime of the original
window, it's no longer the case and we have to explicitly handle closing
the window otherwise kwin can encounter unexpected cases.
When client fails to import a DMABuf with a certain modifier, it will
remove it from offerings on his side and offer a new set of modifiers
for us to use. In case the list ends up being small enough that even we
won't be able to use any of the modifiers, we would still keep these
modifiers on our list and offering them to the client. With this we
would end up in a loop renegotiating and never actually fallback to use
MemFD buffers instead. We should also offer modifier-less DMABufs as
in the past. Using these we just need to avoid offering them as they
should be used as the last option.
BUG: 448839
Hiding the QWindow handle confuses QWidget, which results in user
actions menu not showing up on second launch. Might be a Qt bug.
On the other hand, it makes sense to close dismissed popups, so let's do
it.
This reverts commit 08e392f368.
It appears like with RHI, user code can't mess with its current opengl
context, so let's update shadows immediately.
Just to be sure, shadow cleanup logic in ShadowItem has been hardened to
avoid disturbing the current opengl context unnecessarily.
BUG: 467926