The code for placeSmart uses ints to store coordinates and dimensions,
but the various methods of QRectF return qreal types, which can be
non-integers under fractional scaling, causing multiple issues.
This commit explicitly converts the needed quantities to ints,
avoiding the issues.
Previously, the code relied on the assumption that
y = area.y() + area.height(); implies !(y < area.y() + area.height()).
This doesn't always hold when mixing qreals and ints, causing infinite loops
under fractional scaling when attempting to open large windows, as
reported in BUG 477820.
This commit also extends the fix in 5502ce9 to fractional scaling scenarios.
The ceiling of client widths and height is used, instead of the implicit
floor, which caused BUG 477886.
BUG: 477820
BUG: 477886
The initial value was being initialized to true despite the setting
being off by default, and the default checker was highlighting when it
was false, not when it was true.
BUG: 477329
FIXED-IN: 6.0
Makes it possible to easily target things in a window near your panel edge,
without bringing up your panel.
The `m_client` condition this MR removes appears to have been added solely to make autohiding panels appear instantly. See c4140d6f4e.
BUG: 267277
Indent target_link_libraries of kwin to improve code readability. As is,
PUBLIC and PRIVATE blend with target names and therefore they are harder
to spot.
Backends dependending on the wayland server is not great, it makes them
less reusable and creates a strict instantion order that doesn't fully
make sense.
The shift key doesn't make sense to be one of the keys that will trigger
KWin to allow XWayland apps to process all keys when it's pressed,
because there aren't generally global shortcuts that consist of Shift
plus an alphanumeric character key. That's because this key combination
is used to type capital letters.
So we can safely exclude the shift key to improve security against key logging and not break any global
shortcut-using XWayland apps for people using this feature.
The shift key on it's own is still forwarded as that's a non-character key.
We need to be careful about the target rect when painting a hidpi image
onto a lodpi image.
This is the case when the startup feedback generates bouncing frames.
The icon pixmap may be hidpi, while the result image has device pixel
ratio 1.
Currently hidpi region screencasting is broken because output textures
are inappropriately scaled.
The orthographic projection is set up with logical pixels, but the
remaining rendering code uses "1 / m_scale" scale factor, which is wrong.
In order to fix hidpi and also simplify rendering logic, this change
makes rendering code use logical coordinate system. It's okay to do in
screencasting because we don't need to worry about snapping to the pixel
grid.
BUG: 476858
BUG: 476859
If there were no open windows KWin would wait until the timer ran
out and return false signifying that some windows didnt close.
BUG:477573
FIXED-IN:6.0
This change enables the use of HW cursors on Nvidia GPUs. The problem
with the current approach is that the cursor plane requires a linear
buffer to be attached on the Nvidia hardware. However, Nvidia GPUs
cannot render to a linear texture, this is why DRM_FORMAT_MOD_LINEAR is
marked as "external only" when the supported modifiers are queried by
eglQueryDmaBufModifiersEXT(). Since the EGL render backend in KWin
cannot find a common DRM format modifier between what the cursor plane
needs and what the GPU can render to, it falls back to the SW cursor
implementation.
With this change, when the EGL renderer detects that a plane only
supports linear buffers but rendering directly to a linear buffer is not
possible, it copies the rendered content into a linear dumb buffer, and
attaches that buffer to the plane instead of using the rendered buffer
directly.
This overhauls the kill prompt UI to make it more modern and more
easily to grasp.
* Reduce the amount of text and redundancy.
Give the window a title and drop the "app is not responding" heading.
Try to remove the application name from the displayed window title.
Also use the bold emphasis used in other places like deleting files.
* Use the application icon if available with a warning overlay.
This makes it easier to grasp which application it's talking about.
* Move technical information (like PID and hostname) into an
expandable "Details" section.
KGuiAddons has been implicitly pulled in by KConfigWidgets already.
Instead of killing the window without asking, show the kill prompt
like it's done for X11 windows.
The window in question is exported through XDG foreign so the kill
helper can parent itself to it, and an activation token is also provided.
Also, the more contemporary desktop file name is now used for
identification rather than window class.
A no-display desktop file is installed for the kill helper so that it
can get a proper window icon and suppress startup notification.
Without a client asking for it. This way we can send a surface
to another helper application, such as the window killer.
An ExportedSurface wrapper class is introduced which represents
an exported surface in a windowing-system independent way.
This makes it consistent with the timeout used on X11.
The current ping timeout was also generally quite short, causing apps
to desaturate for brief moments when they were busy e.g. starting up
or loading large files.