Instead of using a DmaBufAttributes instance to communicate the settings
to create a new dmabuf, use a smaller DmaBufParams class that only
contains the information we need after destroying the BO.
Don't disable the main drag handler when canclosewindows is disabled,
that one is not used to close windows but to drag them on other desktops or screens
BUG: 455268
At the moment, blur shader code is barely readable because the code is
constructed at runtime.
Since ShaderManager handles opengl context profiles when loading shaders
from files, we can improve code readability by splitting shader code in
the corresponding files.
Note that ShaderManager adds "precision highp float;" for convenience
(whether using "highp" is okay is up for debate).
Redirect key events to search field so user can search for windows
without manually focusing the search field. It matches the behavior of
the overview effect.
BUG: 455100
In the case of an assert, for example a wayland error Xwayland will
exit, but with an exitStatus of "normal exit".
We also trigger a shutdown should kwin encounter an error on the X11
side, this would be a clean exit from an XwaylandLauncher point of view.
It makes sense to try to restart.
Deliberate shutdown is handled by destroying the XwaylandLauncher. This
means it's not an issue for final kwin teardown.
If a window is added and then the current virtual desktop changes, we
can encounter the following situation:
* desktopChanged signal is emitted, and the slide effect starts
animation. SlideEffect::prepareSwitching() will setup windows; note
that the new window may be present in effects->stackingOrder()
* windowAdded signal is emitted, and slide effect tries to ref the
window again
In order to ensure that there's only one reference, maintain visibility
refs in a hashtable.
BUG: 455237
Currently, if the screen edge is blocked and the cursor is inside its
approach geometry, kwin is going to paint screen edge glow.
It doesn't look good and it can have some performance penalties with
fullscreen video games because the direct scanout path will be blocked.
BUG: 454503
At the moment, dmabuf importing is scattered all over the place in kwin.
It would be great if we had one function that takes dma-buf attributes
and returns an EGLImage if successful.
As the first step, make linux-dmabuf-v1 implementation provide dmabuf
attrs compatible with KWin::DmaBufAttributes.
QSize() will construct an invalid size. An invalid size has width and
height set to -1. In other words, QSize() != QSize(0, 0). This can create
issues when computing the bounding rect of a surface that has invisible
subsurfaces.
For example, if the subsurface rect is QRect(0,0 -1x-1), the top-left
corner of the bounding rect will be affected.
In order to make computation of the bounding rect robust, initialize the
surface size to 0 explicitly.
BUG: 454535
Originally, DeformEffect was meant to be used in effect that deform
windows, but its usage has become wider than anticipated. This change
renames the DeformEffect to OffscreenEffect to accommodate for that.
In Gtk's text-input-v3 implementation it expect done to update the
client serial after every commit. Though it is unclear whether this is a
protocol requirements, do the same thing like mutter for more
compatiblity, especially Gtk3 is in EOL not likely to be patched any
time soon.
To do so, we will need to keep track of the last active preedit,
otherwise only send_done() will clear the preedit.
Behaviour was fixed in c3f5f8ce01. If an
item starts at 0,0 and is 100 pixels wide in normal geometry the 100th
pixel is not inside the rectangle.
SubSurface::testSurfaceAt was adjusted correctly but this was missed as
we test the same thing twice!
QRectF::contains includes all edges. If two subsurfaces are next to each
other ::contains will treat it as having a singularity where a value is
on 2 subsurfaces rather than either one of the other, which isn't what
we want for our purposes.
The unit test is extended but also featured some wrong values, the
biggest clue that it was wrong was that we used different test
co-ordiantes for surfaceContains and inputContains.
Anything in xcb_ structs are always in X local, all member variables
aside from buffers are in kwin local space.
This patch ignores a few paths that are not relevant on wayland.
This allows for compositor managed different co-ordinate space between kwin's
logical co-ordinate space and a client's logical co-ordinate space.
When combined with a modified kwin!1959 this allows us to set a DPI in xrdb and
mark all xwayland windows as being 2x (or other) and avoid upscales for xwayland
clients in a way that doesn't impact other wayland clients or require
third-party changes. Any use of fractional values is in layers we control
instead of over the wire. kwayland-server is the right place for this
abstraction as we need Outputs to differ on a per resource basis. Something we
can't control from within kwin.
Right now only protocols used by Xwayland are covered. If we covered
remaining protocols we can offer user-control on all remaining clients which
could open up other possibilities such as a user controlled dynamic resizing,
or adapt to possible future protocol changes with wayland scaling.