24552 Commits (8c9c45b8f101f1d90b3084530f9e463a2b5915ab)
 

Author SHA1 Message Date
Nate Graham fec40b7163 Revert "backends/libinput: don't multiply v120 value by scroll speed"
This reverts commit 9cd52b4060.

This commit broke the adjustable scroll speed feature on Wayland. That
feature may not have been implemented in the most technically ideal way,
but simply breaking it and leaving the mouse KCM with UI control that
does nothing isn't great. Besides, there was always a simple way to
avoid any scroll-related regressions caused by this feature: reset the
scroll speed to its default value, which internally is a multiplier of 1
and exercises the same codepath that 9cd52b40 imposes on everyone.

We can come up with a better implementation for Plasma 6.

BUG: 464592
FIXED-IN: 5.27.4
2 years ago
Vlad Zahorodnii c6035115f9 Drop ReleaseReason enum 2 years ago
Vlad Zahorodnii 3e766e8d5e Move Window::{frameId,window} to X11Window 2 years ago
Vlad Zahorodnii 1334b38ee1 Move X11-specific "skip close animation" handling to X11Window 2 years ago
Vlad Zahorodnii d35f88adee Move Window::wmClientLeader to X11Window 2 years ago
Vlad Zahorodnii e403c5bf63 Move Window::info to X11Window 2 years ago
Vlad Zahorodnii bf19234df3 Move Window::detectShape to X11Window 2 years ago
Vlad Zahorodnii fa8bd5c0d9 Move Window::{opaqueRegion,shapeRegion} to X11Window 2 years ago
Vlad Zahorodnii 46d0c04f91 Move Window::{depth,hasAlpha,visual} to X11Window 2 years ago
Vlad Zahorodnii 87bfdcf1d6 scene: Port WindowItemX11 to X11Window 2 years ago
Vlad Zahorodnii 551e4a8233 Move Window::propertyNotifyEvent to X11Window 2 years ago
Vlad Zahorodnii 005b098707 Move xwayland surface association logic to X11Window 2 years ago
Vlad Zahorodnii 2d275e16ec Merge XwaylandWindow with X11Window 2 years ago
Friedrich W. H. Kossebau c395afde9b KIdleTime plugin: adapt to new name KAbstractIdleTimePoller 2 years ago
l10n daemon script 2a4eccdbf4 GIT_SILENT Sync po/docbooks with svn 2 years ago
l10n daemon script 4bf7fdf8e0 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"
2 years ago
Vlad Zahorodnii dbbcf31d0d x11: Merge Unmanaged into X11Window
Currently, managed and override-redirect windows are split in two types:
X11Window and Unmanaged. While looking at it strictly from type
perspective, this is great. But it creates other problems, e.g. we need
to put shared X11-specific code in the base Window class or mess with
"base" classes.

As an alternative solution, this change merges the Unmanaged class into
the X11Window class and disables some functionality based on the value
of isUnmanaged().

X11Window::manage() is used to create a managed Window. X11Window::track()
is used to create an unmanaged Window.
2 years ago
Xaver Hugl 062f092f38 workspace: prevent dangling pointers in output order list
An output can be still enabled but also scheduled for deletion
2 years ago
Xaver Hugl c51824b535 Add OutputManager for taking care of output settings in KWin
As a first step to move away from having an external service remember output settings
for KWin, this commit introduces an output manager that can load configuration files
and generate new output configurations.
2 years ago
Xaver Hugl 6b8e08dfa9 core/outputconfig: store output properties with std::optional 2 years ago
Vlad Zahorodnii 08bebd1c4a Drop supported_types parameter in Window::windowType()
It's unused mostly.
2 years ago
Vlad Zahorodnii 902c2feb12 scripting: Drop Window.shaped property
It should be irrelevant to the scripts and there's no matching
abstraction on wayland.

is_shape is made protected, but it will be eventually moved to an X11
specific subclass.
2 years ago
Vlad Zahorodnii 94f0e564be Move internal window fbo and pixmap to InternalWindow 2 years ago
Vlad Zahorodnii 10b5236cfa Unvirtualize some Window properties 2 years ago
Vlad Zahorodnii e31ec802f4 Drop Deleted
Currently, the normal window lifecycle looks as follows: create Window,
wait until it's shown, add it to Workspace, wait until it's closed,
create a Deleted, copy properties from the original window to the
deleted one, destroy the original window, wait until the last deleted
window reference is dropped.

There are a couple of issues with this design: we can't nicely
encapsulate X11 or Wayland specific implementation details if they need
to be accessed for closed windows; manual copying of properties is
cumbersome and error prone and we've had a dozen of cases where effects
worked incorrectly because some properties had not been copied.

The goal of this patch is to drop Deleted and extend the lifetime of the
original window, but with a special state set: Window::isDeleted().

The main danger is that somebody can try to do something with deleted
windows that they should not do, but on the other hand, such code needs
to be guarded with relevant checks too.
2 years ago
Vlad Zahorodnii 5454cc47c3 Preserve stacking order constraints when closing a window
When closing a window, we may need to change parent-child relationship
between windows, but we need to preserve stacking order constraints so
dialogs are placed above their parents when they're closed.
2 years ago
Vlad Zahorodnii 2510bf0439 wayland: Cache WaylandWindow::isScreenLocker()
This is needed to ensure that Window::isScreenLocker() returns a good
value for closed windows. Also, it's needed to get rid of
ClientConnection::aboutToBeDestroyed() connection, which can cause
problems with window teardown.
2 years ago
Nicolas Fella 008bdd18e4 Remove wrong prefixes from includes 2 years ago
l10n daemon script d91426c170 GIT_SILENT Sync po/docbooks with svn 2 years ago
Alexander Lohnau 8fc8bf89b5 Remove unneeded KCMUtils prefix for KCModule include
This was a temporary fix that is no longer needed
2 years ago
Vlad Zahorodnii 70a5052587 Remove commented out code 2 years ago
Vlad Zahorodnii d45d8b5f98 Simplify X11Window::removeTransient()
If a transient parent is removed, X11Window::removeTransient() will try
to upgrade the transient to a group transient.

On the other hand, that code is broken because Window::removeTransient()
will unset transientFor() so we never hit the code path in the if
statement.

While we could fix it, I think it's not worth it because transient
handling code is already mental and making group transients and normal
transients disjoint will help to keep the things simpler.
2 years ago
Aleix Pol fb3018b711 dpms: Make sure we are not calling the interface after the output is gone
It seems it's possible at times, as described in the bug.

BUG: 466346
2 years ago
Vlad Zahorodnii 71956e1bb5 effects/mouseclick: Fix warning about unhandled QPointingDevice::PointerType enum
AllPointerTypes is used as a filter in pointing input device handlers in
QML. I don't think we should hit this case in real world.
2 years ago
Vlad Zahorodnii a1703ab97e Remove kwincompositingdata.moc include 2 years ago
Vlad Zahorodnii 9e4ed75e8e Remove kwinoffscreenquickview.moc include
It's not needed anymore.
2 years ago
Vlad Zahorodnii f20cf30693 Fix populating CMAKE_AUTOMOC_MACRO_NAMES with kwineffects macros
Apparently CMAKE_AUTOMOC_MACRO_NAMES modifications are not visible in
sibling directories. To work around that, populate
CMAKE_AUTOMOC_MACRO_NAMES with libkwineffects plugin macros in the
top level CMakeLists.txt file.
2 years ago
Vlad Zahorodnii 4b343698c3 scripting: Drop registerWindow() workaround
desktopchangeosd appears to stop updating because kwin fails to deselect
XShape events.
2 years ago
Vlad Zahorodnii 983a0bc599 Prefer QThreadPool over QtConcurrent where we don't care about result
QtConcurrent::run()'s return type is marked with [[nodiscard]], which is
not nice to code that just needs to move some tasks to a worker thread.

On the other hand, QThreadPool satisfies our needs too and Qt doesn't
need to construct futures that we won't use.

One remark about the screenshot plugin: the task lambda is mutable so it
cannot be represented using a std::function.
2 years ago
l10n daemon script a2ef5cb1a7 GIT_SILENT Sync po/docbooks with svn 2 years ago
l10n daemon script 26c9a5534e GIT_SILENT Sync po/docbooks with svn 2 years ago
Vlad Zahorodnii a9ad59b32a Improve Workspace::outputAt()
Workspace::outputAt() casts vectors to four rectangle corners and uses
the shortest one to decide which output is the closest to the given
point.

This works poorly on dual monitor setups where on the left side you have
a monitor with landscape orientation and one with portrait orientation
on the right hand side. In that case, outputAt() will prefer the left
monitor even though the right monitor is the closest one if you cast a
perpendicular from the given point to the right monitor.

In order to improve the handling of that case, this change makes
Workspace::outputAt() compute the closest point to the output geometry
rectangle and use the squared distance as the score.
2 years ago
Vlad Zahorodnii cbd50a1e08 libkwineffects: Install headers in libkwineffects/
This improves the scoping of libkwineffects header files and it helps to
make `#include "libkwineffects/foobar.h"` code work in user code.
2 years ago
Vlad Zahorodnii 1211d8e3d6 Prefix more kwineffects includes with libkwineffects/ 2 years ago
Vlad Zahorodnii c049d5afb1 tabbox: Provide raw window caption
Use "textFormat: Text.PlainText" in window switchers instead.
2 years ago
Vlad Zahorodnii c5eabfa4d1 tabbox: Drop TabBoxClient
The indirection contributes unnecessary complexity. The usage of
std::weak_ptr and std::shared_ptr complicates the things further, e.g.

![Screenshot_20230325_170226](/uploads/d8b68a9eff47c93c4463bb230b5bbe49/Screenshot_20230325_170226.png)

---

Ideally, same should be done with TabBox and TabBoxHandler, but that can be done in another MR.
2 years ago
Vlad Zahorodnii fc890340d9 Fix warning about duplicate names in debug_console.ui
"label" is already used.

    Warning: The name 'label' (QLabel) is already in use, defaulting to 'label1'.
    Warning: The name 'label' (QLabel) is already in use, defaulting to 'label2'.
2 years ago
Xaver Hugl 67dc0c5c48 backends/drm: restrict common mode generation to drivers that support scaling
Also set the scaling mode property to "full aspect", which should reduce
the number of cases where the feature can cause issues
2 years ago
Vlad Zahorodnii cf1d66ef59 tabbox: Drop support for _KDE_FIRST_IN_WINDOWLIST
LXR search shows that _KDE_FIRST_IN_WINDOWLIST is not used anywhere in
KDE codebase besides KWin.
2 years ago
Vlad Zahorodnii 09cc312f31 Drop irrelevant Deleted cleanup in Workspace
Deleted windows are no longer destroyed using deleteLater(). They will
be destroyed immediately as Workspace goes through the window list
because the effects will be unloaded by that time.
2 years ago