Commit graph

26478 commits

Author SHA1 Message Date
Vlad Zahorodnii
0dc3f4906f opengl: Harden GLRenderTimeQuery against opengl providing bad timestamps
The end render timestamp can be slightly in the past before the start
render timestamp. This results in negative render times, which can make
kwin wait way more than just one vblank interval before starting the
next frame.

It appears that there is no way to detect if the gpu has performed a
disjoint operation in OpenGL. It's available only in GLES. As a way
around, this change makes the GLRenderTimeQuery insert two probes: one
queries gl timestamps when starting rendering and ending rendering;
another one just queries std::steady_clock before and after painting.
This hardens the GLRenderTimeQuery against OpenGL providing nonsensical
results sometimes.

BUG: 481721
2024-02-29 17:58:17 +00:00
Vlad Zahorodnii
79b7545840 backends/x11: Make SwapEventFilter report presentation feedback to OutputFrame 2024-02-29 16:46:05 +02:00
Vlad Zahorodnii
64dc01c640 effect: Drop WindowPaintData::screen
It's unused.
2024-02-29 13:33:52 +00:00
Marco Martin
86ede0ecf2 Remove invalid tabbox configs from defaults
We know that org.kde.breeze.desktop is invalid as LayoutName for the
tabbox, it will break the default button in the tabbox kcm.
Also the DesktopListLayout and DesktopLayout aren't valid anymore

BUG:481640
2024-02-29 11:14:31 +00:00
Fushan Wen
d377b5cdab plugins/outputlocator: show physical size in output locator
Make sure the effect shows the same sizes as the KScreen KCM.
2024-02-29 09:29:51 +00:00
l10n daemon script
bd88801de4 GIT_SILENT Sync po/docbooks with svn 2024-02-29 01:22:07 +00:00
Shubham Arora
e89bd802a2 kwin/rules: update placeholder text and add icon 2024-02-28 21:58:15 +00:00
Shubham Arora
52349491af kcm/rules: move kcm actions to top 2024-02-28 21:58:15 +00:00
Aleix Pol Gonzalez
bf1ce85474 Make it possible to build KWin without libxcb
Now that we have Wayland around, there's a whole branch of dependencies
that shouldn't be necessary anymore.
This allows to build KWin without all of it, allowing us to have a much
more compact alignment for cases where all the legacy software isn't
necessary anymore.

Bundle KWindowSystem X11-specific headers into it too, since it's part
of the same process.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2024-02-28 16:03:50 +00:00
Aleix Pol Gonzalez
94121c2a42 Unify the format for #include "config.h" 2024-02-28 16:03:50 +00:00
Nate Graham
26a7af5e5f {kcms,plugins}: Use real ellipsis character for user-facing translated strings
This is better for screen readers.
2024-02-28 08:58:37 -07:00
Vlad Zahorodnii
e84d5bb666 examples: Add binary plugin example 2024-02-28 15:38:05 +00:00
Vlad Zahorodnii
38fae969a9 examples/quick-effect: Clean up metadata 2024-02-28 15:27:50 +00:00
Jin Liu
7d7344a983 plugins: add a "hidecursor" effect
This hides the mouse cursor on inactivity or keypress (configurable in the KCM).

BUG: 465119
2024-02-28 11:23:21 +00:00
l10n daemon script
494daab3d5 GIT_SILENT Sync po/docbooks with svn 2024-02-28 01:20:33 +00:00
l10n daemon script
6004ffe228 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-02-28 01:14:13 +00:00
Vlad Zahorodnii
d8e8f952a2 Allow maximizing the window by double clicking borders
It's a more intuitive way to maximize a window either horizontally or
vertically.

BUG: 480848
2024-02-27 23:27:22 +02:00
Vlad Zahorodnii
bc62e7e094 Drop Window::{windowShown,windowHidden}
They serve the same purpose as Window::hiddenChanged, so drop these
signals instead of having multiple signals to indicate the same thing.
2024-02-27 20:58:52 +00:00
Vlad Zahorodnii
a8a53c651b Port away the remaining users of windowShown/windowHidden to hiddenChanged 2024-02-27 20:58:52 +00:00
Vlad Zahorodnii
5a32f012c3 Drop Workspace::windowHidden
Its name is misleading. Use activateNextWindow(), it's more readable.
2024-02-27 20:58:52 +00:00
Vlad Zahorodnii
2ed54ee10f wayland: Port "show under cursor" to Window::readyForPaintingChanged 2024-02-27 20:58:52 +00:00
Vlad Zahorodnii
6fb8eac890 plugins/{nightcolor -> nightlight} 2024-02-27 22:35:50 +02:00
Vlad Zahorodnii
0dd2012d4f plugins/screenedge: Port to ImageItem 2024-02-27 20:14:05 +00:00
Vlad Zahorodnii
e40f632c9b plugins/zoom: Port to CursorItem 2024-02-27 20:14:05 +00:00
Vlad Zahorodnii
fe45c99e99 plugins/trackmouse: Port to ImageItem
It reduces the amount of manual OpenGL code, and it's better to use
ImageItem because that way the ItemRenderer will take care of snapping
to the pixel grid or colorspaces.
2024-02-27 20:14:05 +00:00
Vlad Zahorodnii
191b0e7b6d plugins/shakecursor: Port to CursorItem
It reduces the amount of manual OpenGL code, and it's better to use
ImageItem because that way the ItemRenderer will take care of snapping
to the pixel grid or colorspaces.
2024-02-27 20:14:05 +00:00
Vlad Zahorodnii
bcba59a7f5 scene: Use hardware clipping when painting overlay items
It's needed to properly render transformed overlay items. Ideally, the
ItemRenderer would split items that can be rendered with and without the
scissor test on its own. But we are not there yet, so pass the
PAINT_SCREEN_TRANSFORMED flag to force the ItemRendererOpenGL to use
hardware clipping.
2024-02-27 20:14:05 +00:00
Vlad Zahorodnii
916710ea01 scene: Export CursorItem 2024-02-27 20:14:05 +00:00
Vlad Zahorodnii
207bc1d9e6 scene: Introduce WorkspaceScene::overlayItem
The overlay item is the parent for all overlay contents above windows.
2024-02-27 20:14:05 +00:00
Vlad Zahorodnii
c153fc719a scene: Make top left corner of CursorItem match the hotspot
It's more convenient if one wants to paint cursor at the specified
location. For example, when drawing the cursor on your own.
2024-02-27 20:14:05 +00:00
Vlad Zahorodnii
f6b605daf2 scene: Add support for item transformations 2024-02-27 20:14:05 +00:00
Xaver Hugl
9e70c2a21c backends/drm: always prefer 10bpc buffers when supported
The environment variable is primarily meant as a workaround for displays
and drivers that misbehave when more than 8 bits per color is used. To simplify
the code, this commit makes the environment variable only control the bpc
used for displays, instead of also controlling which buffer formats get
used.
2024-02-27 21:01:28 +01:00
Vlad Zahorodnii
33e971cc09 wayland: Move popupOffset() back to xdgshell.cpp
The InputPanelV1Window doesn't actually need popupOffset(). Its popup
positioning is not data driven like xdg-positioner. It will be simpler
and more readable to compute the desired popup geometry explicitly.
2024-02-27 18:28:46 +00:00
Vlad Zahorodnii
693cd16b12 effect: Drop WindowPaintData::projectionMatrix() 2024-02-27 17:47:39 +00:00
Vlad Zahorodnii
18628131df plugins/sheet: Port to OffscreenEffect 2024-02-27 17:47:39 +00:00
Vlad Zahorodnii
5f043f2d61 plugins/glide: Port to OffscreenEffect
The main motivation behind this change is to make the glide effect stop
setting a custom projection matrix in order to assist with making the scene
2d only.
2024-02-27 17:47:39 +00:00
Xaver Hugl
36f6f2fb2d compositor: only set content type if window is on the current output 2024-02-27 16:13:23 +00:00
Patrik Fábián
c11eeabc86 plugins/overview: Search bar can be clicked without closing effect 2024-02-27 15:32:45 +00:00
Xaver Hugl
765cd82613 autotests/test_colorspaces: add an autotest for non-normalized primaries 2024-02-27 15:14:20 +00:00
Xaver Hugl
dd53576fe2 core/colorspace: normalize XYZ values before using them in calculations
Otherwise ICC profiles where the primaries are normalized to different values than what
KWin needs may cause too dark or bright results.

BUG: 481034
2024-02-27 15:14:20 +00:00
Xaver Hugl
af4e12c5fc comopsitor: only activate VRR if the active window is on the current screen
BUG: 481750
2024-02-27 14:20:32 +00:00
Xaver Hugl
d55f012537 backends/drm: support HDR content while an ICC profile is set better
The brightness of the screen is read from the luminance tag, and through
the color management protocol(s) passed to apps, so that they can adjust
their content accordingly
2024-02-27 13:50:36 +00:00
Oliver Beard
183637502d xwayland: Add option to additionally eavesdrop on mouse buttons
BUG: 466448
2024-02-27 13:34:14 +00:00
Vlad Zahorodnii
d13b6db706 x11: Refuse starting move/resize operation with no pressed buttons
If the client is slow, kwin can receive _NET_WM_MOVERESIZE requests
after user has released mouse buttons. Ideally, the window manager
should refuse starting an interactive move/resize operation in such a
case so it's still possible to finish moving or resizing the window
by releasing mouse buttons.
2024-02-27 12:12:32 +02:00
l10n daemon script
677ce4014a GIT_SILENT Sync po/docbooks with svn 2024-02-27 01:21:41 +00:00
l10n daemon script
deb17ded8a 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-02-27 01:14:32 +00:00
Vlad Zahorodnii
4d6f6223bc plugins/overview: Provide a way to reserve a screen edge for grid mode
BUG: 478137
2024-02-26 14:12:26 +00:00
Vlad Zahorodnii
329c5de451 xwayland: Ignore somebody else claiming WM_S0 selection
If somebody else claims the selection, it's unclear what we should do.
kwin can't give up its selection as it's the one who is responsible for
window management and compositing. If anything, Xwayland should ensure
that no client can claim WM_S0.
2024-02-26 15:58:13 +02:00
Vlad Zahorodnii
13c092d671 Fix a crash in eglDestroyImageKHR()
Apparently, libepoxy requires a current EGL display in order to resolve
EGL functions. This is unexpected as most of the EGL functions require no
current opengl context.

This change makes kwin bypass libepoxy for problematic cases.

BUG: 470980
2024-02-26 15:31:30 +02:00
Ser Freeman
192ec437df Window: Don't reset quick tile mode on interactive move start
Quick tile mode reset should be done in the interactive move handler,
where the new move offset is set. Only reset it on resize to unsnap
the window from the tile.

BUG: 472366
2024-02-26 11:11:53 +00:00