Commit graph

25981 commits

Author SHA1 Message Date
Vlad Zahorodnii
4f8c941bff scripting: Fix a crash in useGlThumbnails() when compositing is off
BUG: 479791
2024-01-15 14:07:51 +00:00
Vlad Zahorodnii
2d71d7cada plugins: Hide "Drag Down to Close" when using a pointing device
BUG: 479802
2024-01-15 15:35:03 +02:00
Vlad Zahorodnii
0ddcc85f68 plugins/shakecursor: Ignore motion events with at least one pressed button
It reduces the chances of false triggering the plugin, for example if
the user presses a mouse button and chaotically moves the pointer
because they navigate in 3D space and what not.
2024-01-15 08:24:29 +00:00
Yifan Zhu
1f74e9a5c5 scene/cursordelegate_opengl: undo ortho() flip y
Flip y axis before and after applying renderTarget.transform to undo
ortho() flipping the y axis. Otherwise the cursor is invisible on
rotated screen.

BUG: 479764
FIXED-IN: 6.0
2024-01-14 20:48:58 -08:00
Joshua Goins
e00a26d72d Fix link to Frameworks Coding Style in CONTRIBUTING
The double parenthesis may trip up certain markdown viewers, and the
location of the wiki page has changed too.
2024-01-14 21:15:26 +00:00
Weng Xuetian
1fd5a6555e
inputmethod: Ensure InputPanelV1Window is always within the screen
Currently when input panel is using overlay mode and the cursor rectangle
is below or above the screen area, the input panel may be placed off the
screen. The change ensure it is always placed within the screen area
using similar math like xdg_popup's slide_y constrain.
2024-01-13 22:39:15 -08:00
l10n daemon script
4f512c6571 GIT_SILENT Sync po/docbooks with svn 2024-01-14 01:37:02 +00:00
Yifan Zhu
faab23e914 kcms/options: port to KCModule methods
Remove code that duplicates functionality of KCModule.

Previously the various config items were not fully ported to using
KCModule methods, and kept custom versions of isSaveNeeded and
isDefault. When called from KWinOptions::updateUnmanagedState, these
methods incorrectly reports that there are still changes to be saved.
This patch set ports all configs in window behavior to methods provided
by KCModule, solving the problem.

BUG: 477940
2024-01-13 10:04:52 -08:00
Ismael Asensio
3353ed87ef kcms/tabbox: Mock-up closeable role for previews
Fixes a qml warning and wrong representation when trying to
access this model property
2024-01-13 15:26:13 +01:00
Ismael Asensio
3572e6f0e7 kcms/tabbox: Add mock-up object for KWin.DesktopBackground
The window switcher previews don't use the actual quick components
the KWin plugin provides, but mock-up objects of those.

Add a mock-up component for `KWin.DesktopBackground`, which is just
a thumbnail of the desktop default image but stretched to cover the
whole parent size.

This fixes the previews for flip&cover window switchers.

BUG: 479552
FIXED-IN: 5.93.0
2024-01-13 15:26:13 +01:00
Xaver Hugl
c1e09f65c9 opengl/glshader: use gamma 2.2 for sRGB render targets
The sRGB global colordescription uses gamma 2.2, so this function also has to do
it, or the shader will end up doing a colorspace conversion where there shouldn't
be one.
This also meams that HDR content will be wrongly encoded, but fixing that while
also dealing with sRGB content correctly requires a lot more invasive changes, in
KWin and in the screenshot and screencast APIs.

BUG: 478967
2024-01-13 13:28:03 +00:00
Ismael Asensio
20bee00681 kcms/tabbox: Fix preview for show desktop option
Use the correct config option to decide whether to show the desktop
thumbnail on preview. "DesktopMode" refers to filter by desktop.
2024-01-13 13:32:50 +01:00
Alexander Lohnau
7d1db53f6b Remove unneeded includes from headers and cpp files 2024-01-13 11:34:45 +01:00
Alexander Lohnau
d8012cf00c decorationbridge: Slight code cleanup 2024-01-13 10:59:17 +01:00
l10n daemon script
24168aebdb GIT_SILENT Sync po/docbooks with svn 2024-01-13 01:27:27 +00:00
l10n daemon script
2a07aa238f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-01-13 01:15:23 +00:00
Ismael Asensio
b08a4a1896 kcms/tabbox: Fix tabbox preview not getting dismissed
On X11 we would dismiss the tabbox preview when clicking outside
of the switcher. This doesn't work on Wayland because the popup
cannot globally grab the mouse and doesn't get notified.

Use `QEvent::FocusOut` instead which works on both platforms.

We also get rid of a warning message.

BUG: 374971
FIXED-IN: 5.93.0
2024-01-12 23:10:06 +01:00
Xaver Hugl
427ce522a2 opengl/glshader: print the shader source if compilation fails
The shader log is almost entirely useless without the source

CCBUG: 479279
2024-01-12 20:42:05 +00:00
Xaver Hugl
d4a3d6689e backends/drm: wait for the pageflip to be done with the condition variable
...instead of busy looping, which is causing several percent CPU usage in some cases

BUG: 479126
2024-01-12 19:15:25 +01:00
Xaver Hugl
56fc8f83ac backends/drm: don't call QThread::currentThread in a loop
We're always in the same thread, so there's no need to check it
2024-01-12 17:00:01 +01:00
Xaver Hugl
a89d1f8058 opengl/openglcontext: require support for RGBA16F framebuffers
It's effectively already required, this just checks it earlier
2024-01-12 15:19:25 +01:00
Vlad Zahorodnii
c59f385996 wayland: Fix handling of unminimization for not fully initialized xdg-toplevels
If setMinimized(false) is called for a not fully initialized
XdgToplevelWindow, we don't want to emit the windowShown signal.

BUG: 479234
2024-01-12 12:29:33 +00:00
Vlad Zahorodnii
1c15a6dd88 Fix software cursor stucking on old monitor
When the software cursor leaves an output, its RenderLayer is marked
as invisible and the area corresponding to the layer is scheduled to
be repainted in the output layer. However, the composite function only
checks whether the root RenderLayer needs a repaint, not the output
layer too.

BUG: 479668
2024-01-12 14:14:53 +02:00
Xaver Hugl
260bc0a61d input: remove the terminate server shortcut
Accidentally pressing any shortcut shouldn't take down the whole session.
If KWin isn't reponsive but can still process shortcuts for some reason,
you can still switch to a different virtual terminal to explicitly kill
it from there
2024-01-11 23:21:22 +00:00
Xaver Hugl
451b878bb9 backends/drm: don't allow implicit modifiers for multi gpu transfers
As we translate DRM_FORMAT_MOD_LINEAR to implicit modifiers + linear flag, the
egl import path should still work without implicit modifiers too.

BUG: 478921
2024-01-11 19:07:51 +00:00
Vlad Zahorodnii
36222adb25 scene: Fix software cursor clip region
The dirty region is in the output local coordinate space.

BUG: 479583
2024-01-11 18:10:04 +00:00
Vlad Zahorodnii
571e4026ac core: Add Output::rectF 2024-01-11 18:10:04 +00:00
Vlad Zahorodnii
c314705d53 core: Rename Output::fractionalGeometry()
In Qt, if an overloaded function returns QRectF/QSizeF/QPointF, it
usually has F suffix. Do the same in kwin for the consistency sake.
2024-01-11 18:10:04 +00:00
Xaver Hugl
bc58d13ee8 opengl: don't crash in GLTexture::toImage with OpenGL ES
OpenGL ES 2 doesn't support glGetTexImage
2024-01-11 16:58:04 +00:00
Bart Ribbers
a879c59a08 Fix building of tests on Musl by making sure to include sys/select.h
Required for access to fd_set
2024-01-11 17:00:09 +01:00
Vlad Zahorodnii
bc30ca64dc Fix evaluating window rules for closed windows
gedit changes its caption from "Untitled document - gedit" to "gedit"
when it closes. This schedules Window::evaluateWindowRules() to be
called when the window is already marked as deleted. kwin then crashes.

In order to prevent that, a direct connection can be used instead. But
then the caption must be initialized extra carefully because if the
window rule changes the window type, "<N>" can be lost.
2024-01-11 14:17:31 +00:00
Vlad Zahorodnii
4ab504c994 Add Window::captionNormalChanged()
This signal notifies when the client specified caption changes, not when
kwin changes it because it changed the suffix, etc.
2024-01-11 14:17:31 +00:00
Vlad Zahorodnii
68f1570d45 scene: Fix alpha channel of offscreen cursor texture
When running with 10bpc, the alpha channel has only 2 bits for it, which
is too low for the cursor.

BUG: 479637
2024-01-11 13:44:36 +00:00
Vlad Zahorodnii
3a5ba58a45 effect: Install xcb.h
BUG: 479584
2024-01-11 09:10:06 +00:00
Jin Liu
18ba622c40 Update keyboard focus when exiting from a keyboard-grabbing effect
BUG: 479628
2024-01-11 16:40:44 +08:00
Jie Liu
e427ad73aa update keyboard focus when window switcher is closed.
BUG:477885

Signed-off-by: Jie Liu <liujie01@kylinos.cn>
2024-01-11 01:28:52 +00:00
l10n daemon script
4d3779f061 GIT_SILENT Sync po/docbooks with svn 2024-01-11 01:19:25 +00:00
Xaver Hugl
a05a6d8727 effect/offscreenquickview: always use GL_RGBA8
GL_RGB8 isn't supported by OpenGL ES

BUG: 479055
2024-01-10 20:56:15 +01:00
Vlad Zahorodnii
66b1462cf8 xwayland: Make xinerama index -> Output mapping more robust with fractional scaling
xdg-output-v1 uses the fractional geometry, so also use it when mapping
a xinerama screen index to an Output.
2024-01-10 15:18:48 +00:00
Jonathan Esk-Riddell
61699e9ed3 Update version number for 6.0.80
GIT_SILENT
2024-01-10 14:03:49 +00:00
Vlad Zahorodnii
3f1e57de1c xwayland: Fix primary output identification
Output::geometry() returns a logical geometry, while the crtc rect is in
the device pixels.
2024-01-10 12:41:31 +00:00
Jonathan Esk-Riddell
cc49e25eac Update version number for 5.92.0
GIT_SILENT
2024-01-10 12:28:48 +00:00
l10n daemon script
f3618ffe9d GIT_SILENT Sync po/docbooks with svn 2024-01-10 02:15:23 +00:00
Xaver Hugl
0ed66ed5d2 move more opengl related files to the opengl folder 2024-01-09 19:45:59 +01:00
Vlad Zahorodnii
b214251f81 Force software cursor on Intel devices
kwin randomly freezes for a second when calling glFlush or glFenceSync.
In principle, this should not happen.

BUG: 474725
2024-01-09 18:03:45 +00:00
Vlad Zahorodnii
f7e8d3cefb scene: Add SurfaceItem::destinationSize()
Its main purpose is to reroute surface size updates through SurfaceItem
so it can invalidate quads cache. Not all SurfaceItems currently discard
them when needed. When proper item transform support lands,
setDestinationSize() could also change the surface scale instead.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
6510fe6e5d scene: Fix SurfaceItem::bufferTransform()
The wayland spec is not quite clear about the transforms, but the buffer
transform indicates a transform from wl_surface to wl_buffer or compositor
global coordinate space to composited buffer.

On the other hand, SurfaceItem assumes that the order is vice versa.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
f8df72497f opengl: Replace TextureTransform with OutputTransform
It reduces duplication of same math code.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
27821e3c76 plugins/screenshot: Invert render transforms in the correct order
The render transform is applied first, after that, the texture is
flipped implicitly by opengl.

So in order to undo these transforms, we need to flip the image
vertically first, then undo the render target transform.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
16809e6b15 core: Port RenderTarget to OutputTransform 2024-01-09 17:42:09 +00:00