Commit graph

24667 commits

Author SHA1 Message Date
Vlad Zahorodnii
39d269008f Avoid rounding coordinates of motion events more 2023-05-06 06:43:08 +00:00
l10n daemon script
fdae03ee62 GIT_SILENT Sync po/docbooks with svn 2023-05-06 02:41:18 +00:00
Vlad Zahorodnii
16e46e19e0 wayland: Avoid losing precision in tablet events
globalPos() is rounded version of globalPosF().
2023-05-05 20:54:37 +03:00
Ismael Asensio
9d8d7e28a1 TabBox: Allow switchers to handle the tabbox hiding
Previously, the switcher item got hidden immediately after
selecting a window, so it wasn't possible to show an exit
transition.

Emit instead an `aboutToHide` signal and let the switchers
that opt-in to handle when to hide the tabbox by just setting
its `visible` property to `false`. In the default case we handle
that signal by immediately hiding the tabbox as usual.

For symmetry, add also a new `aboutToShow` signal which
simplifies setting an enter transition.
2023-05-05 18:40:35 +02:00
Nate Graham
98198dc77a tabbox: fall back to "compact", not "informative"
Informative is being deleted in Plasma 6 because it's worse than
Compact; see
https://invent.kde.org/plasma/plasma-desktop/-/issues/63#note_592077
2023-05-05 15:57:09 +02:00
Vlad Zahorodnii
d2b0ed0c5a wayland: Implement wl_surface.preferred_buffer_scale and wl_surface.preferred_buffer_transform
The new events provide a way to tell the client what buffer scale and
buffer transform to use as they may lack the context to make a proper
decision.
2023-05-05 12:52:32 +00:00
Vlad Zahorodnii
cad72753f0 wayland: Rename SurfaceInterface::preferredScale to preferredBufferScale
This is to match the wording in the core spec.
2023-05-05 12:52:32 +00:00
Nicolas Fella
53d19fbb9a Implement sticky keys on Wayland
Sticky keys allow to trigger key combinations one key at a time.

This is an accessibility feature used by people that cannot press
multiple keys simultaneously.

On X11 this is handled by the X server, configured via kaccess.

On Wayland we get to handle this ourselves.

wl_keyboard events already carry the modifier's latched/locked state, so
all we need to do is to
make sure the right state is set

Xkb gains a new method to set the state. The business logic is
implemented in a new plugin
that filters for keys and sets the Xkb state accordingly.

BUG: 444335
2023-05-05 12:05:17 +00:00
Vlad Zahorodnii
e6b5cf283e core: Batch pointer input device events
This change introduces InputDevice::pointerFrame(). The main motivation
behind it is to allow batching multiple pointer events within a single
event frame.

BUG: 454428
2023-05-05 10:27:08 +00:00
Vlad Zahorodnii
60205c1348 backends/wayland: Fix wl_seat version
It should be 5.
2023-05-05 10:27:08 +00:00
Ismael Asensio
a9a58b1ed5 Port usage of kcmshell5 to kcmshell6
Just two instances:
- in useractions for the menu action "Configure Window Manager"
- in the docbook about the key shortcuts
2023-05-05 09:22:55 +00:00
Vlad Zahorodnii
7c91c4bad9 wayland: Avoid pointer warp if constraint region is invalid
It may happen that the constraint region doesn't include the specified
cursor hint anymore. If that's the case, avoid warping the pointer.

BUG: 457021
2023-05-05 09:01:06 +00:00
Nicolas Fella
271d758f8c Add wayland to third-party deps 2023-05-05 10:16:23 +02:00
l10n daemon script
e63a3f93b5 GIT_SILENT Sync po/docbooks with svn 2023-05-05 02:55:17 +00:00
l10n daemon script
6499d2bc15 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"
2023-05-05 02:37:27 +00:00
l10n daemon script
041bb6369e GIT_SILENT Sync po/docbooks with svn 2023-05-04 02:44:25 +00:00
Vlad Zahorodnii
70d76791d8 cmake: Correct gbm version check
It appears like gbm_VERSION can be a list, which if() does not like. So
pass the variable to the if() rather than its value. While on this, also
change GREATER_EQUAL to VERSION_GREATER_EQUAL so cmake compares
individual version components.
2023-05-03 12:40:42 +00:00
Vlad Zahorodnii
1e848ac302 Remove PipeWire_FOUND in config-kwin.h
It's unused.
2023-05-03 14:51:57 +03:00
Vlad Zahorodnii
1f2a060a5e autotests: Remove WAYLAND_ONLY leftovers 2023-05-03 11:40:01 +00:00
Vlad Zahorodnii
0a82f33db5 Drop XCB_ICCCM_FOUND checks
Qt requires xcb-icccm 0.3.9. On the other hand, 0.3.9 contains all the
types and functions used by kwin, so remove the corresponding
XCB_ICCM_FOUND checks to simplify the code.
2023-05-03 11:40:01 +00:00
Vlad Zahorodnii
076493cc05 autotests: Improve running time of testPointerInput 2023-05-03 11:21:53 +00:00
Vlad Zahorodnii
785fa5c172 plugins/overview: Allow switching between desktops inside effect
At the moment, clicking desktop thumbnails in the desktop bar results in
switching to that virtual desktop, which is not ideal because the
overview effect allows sending windows to another virtual desktop by drag
and dropping them to its thumbnail but you can't jump to that
desktop unless you leave the overview effect.

BUG: 448668
2023-05-03 10:00:36 +03:00
Vlad Zahorodnii
892edf94d5 Remove unused "output_interface.h" include
output_interface.h used to be included because of its output transform
enums. It's not needed after switching to Output::Transform.
2023-05-03 06:36:53 +00:00
l10n daemon script
7fa87079e3 GIT_SILENT Sync po/docbooks with svn 2023-05-03 02:41:23 +00:00
Kai Uwe Broulik
48fe3f633e kwineffects: Initialize m_reason
It is not initialized in the default constructor.
2023-05-02 19:53:25 +02:00
Vlad Zahorodnii
1e0141851e backends/wayland: Remove KWayland::Client::Buffer leftovers 2023-05-02 13:14:30 +00:00
Vlad Zahorodnii
ce2b4c0bee {core,backends/wayland}: Refactor shm buffer allocator 2023-05-02 13:14:30 +00:00
l10n daemon script
2288f39469 GIT_SILENT Sync po/docbooks with svn 2023-05-01 02:57:57 +00:00
Vlad Zahorodnii
0d2e361eca wayland: Drop ClientBuffer
The ClientBuffer type is empty now, most of the things have been
upstreamed to the GraphicsBuffer type. So let's drop it to simplify the
type hierarchy.
2023-04-30 15:39:31 +03:00
Vlad Zahorodnii
82c6538ee4 wayland: Refactor ClientBuffer
ClientBufferIntegration was introduced to work around the fact that some
client buffers are not created by us.

In addition to that, DisplayPrivate::registerClientBuffer() was
introduced to register client buffers created by us.

This change get rids of the ClientBufferIntegration type and further
simplifies the ClientBuffer type to make wayland-specific client buffer
code less messier.
2023-04-30 15:39:10 +03:00
l10n daemon script
043bf8deef GIT_SILENT Sync po/docbooks with svn 2023-04-30 03:59:14 +00:00
l10n daemon script
2e72d81c62 GIT_SILENT Sync po/docbooks with svn 2023-04-29 02:41:55 +00:00
Vlad Zahorodnii
f410819fff Remove "Default implementation ..." comments
These methods are not virtual anymore.
2023-04-28 14:51:01 +00:00
Vlad Zahorodnii
7b6eca612e Stop quick tile combine timer when activating a window
The quick tile test waits 1s to ensure that the quick tile combine timer
is not active. On the other hand, if the active window changes, it makes
sense to reset quick tile combine status. That also lets us get rid of
the QTest::qWait() in QuickTilingTest::testShortcut().
2023-04-28 14:30:49 +00:00
Aleix Pol
660ad887ee screencast: Disable screencasting when a window closes
There were still some cases where we might have queried the window,
leading to a crash.

BUG: 469055
2023-04-28 14:03:15 +00:00
Aleix Pol
cf8b2195bb screencast: Do not push frames when not in a streaming state
It seems to cause issues and there's no good reason to do that
2023-04-28 14:03:15 +00:00
Alexander Volkov
64ce247104 Use non-rotated physical size of an output when required
1. In wl_output and kde_output_device_v2 protocols.
This should fix dpi calculation in
KScreen::Generator::bestScaleForOutput() when panel_orientation
is set to rotate a screen by 90 or 270 degrees.

2. When comparing with physical size of libinput device.

3. In calculations with mode sizes which are not rotated.

This change makes Output::physicalSize() return the raw
physical size, which is used in most of cases. It should
be rotated manually if needed.
2023-04-28 13:41:00 +00:00
Vlad Zahorodnii
8bfb0b1ff7 ENABLE_GLX -> HAVE_GLX 2023-04-28 15:14:14 +03:00
Vlad Zahorodnii
a293c39105 Merge contents of effects/, scripts/ and plugins/
It's confusing to have three directories that refer to extensions. To
clear things up, let's move them in the same directory.
2023-04-28 10:46:22 +00:00
Vlad Zahorodnii
bbc7caaae7 scripts: Encapsulate cmake code 2023-04-28 10:46:22 +00:00
Vlad Zahorodnii
f4af66d167 scene: Don't touch texture sampling params in ItemRendererOpenGL
Items must be responsible for choosing texture sampling parameters.
Doing so in the ItemRendererOpenGL breaks the encapsulation.
2023-04-28 10:28:46 +00:00
Liu Jie
9241252c67 update keyboard focus when grabbing popup closed
For example, a wayland qt widget has an qlineedit with qcompleter.
    1. Input some words make qcompleter's popup window show. PopupInputFilter::keyEvent will set keyboard focus on the qcompleter's popup window.
    2. Continue to press a key which can make the qcompleter's popup window hidden and do not release it.
    3. Press the backspace key to make the qcompleter's popup window show again.
Result:
    Qcompleter's popup window will be created as an independent xdg_toplevel.This is because QT sets the surface of the focused window as the transient parent window of the popup window. If not found, QT will create a independent toplevel window.
After step 2, the focused window is the qcompleter's popup window which has be hidden. QT can not find the transient parent of the qcompleter's popup window, finally creat the popup window as a independent xdg_toplevel.

Signed-off-by: Liu Jie <liujie01@kylinos.cn>
2023-04-28 06:20:20 +00:00
l10n daemon script
d2aee0a1a2 GIT_SILENT Sync po/docbooks with svn 2023-04-28 02:27:47 +00:00
Xaver Hugl
4575234859 backends/drm: remove timer for updating outputs
It's not necessary anymore, as outputs will be updated once the GPU is active again
2023-04-27 19:49:02 +00:00
Xaver Hugl
46c8ca34b9 backends/drm: don't update outputs while the session isn't active
BUG: 468715
2023-04-27 19:49:02 +00:00
Xaver Hugl
8c412c229b backends/drm: track device active status per GPU 2023-04-27 19:49:02 +00:00
Andreas Cord-Landwehr
258e9d8426 Extend GLX switch to check if QtGui was being built with GLX plugin
Even though epoxy with GLX may be present, Qt's native interface only
exposes GLX API when it was being built with GLX support.
2023-04-27 18:29:51 +00:00
ivan tkachenko
d80120fe7e
effects/overview: Use standard naming for the main QML source
Makes it easier to navigate project, especially when filtering through
all files by partial name.
2023-04-27 15:53:53 +05:00
Mike Noe
38ad317f27 kcms: Port away from Kirigami.Action.iconName 2023-04-27 06:51:28 +00:00
l10n daemon script
182fcb1791 GIT_SILENT Sync po/docbooks with svn 2023-04-27 02:32:10 +00:00