19295 Commits (f881170a1ec88681297b919c51347ef84ccf1fe7)
 

Author SHA1 Message Date
Andrey Butirsky 91f47c9092 fix global shortcuts for non-Latin symbols
Re-use Qt's implementation of handling non-Latin layouts here
For full ASCII range support (Alt+`, etc.) Qt needs to be patched still,
see QTBUG-90611

BUG: 375518
4 years ago
Jan Blackquill bc3ac17141 GlobalShortcuts: clang-format 4 years ago
Jan Blackquill ccca3b2af2 GlobalShortcuts: refactor
I consider this a prerequisite commit to improving the quality of touchpad gestures provided by KWin.
In short, this breaks apart a weird all-in-one class into an std::variant for the different types
of shortcuts in order to make it easier to add new types of global shortcuts. For the byte shavers, this
roughly halves the size of the GlobalShortcut class as well. On top of all this, the code is about half
the size it was before, mostly due to newer C++ concepts being used that allow us to let the compiler
do more work for us.
4 years ago
Jan Blackquill 9f215a06fa Fix crash on hotplugging displays while switched to another TTY
Currently, we inhibit renderloops when switching to another TTY, and unhibit
when switching back. When we hotplug a display while switched to another TTY,
its renderloop isn't inhibited by default, yet when we switch back, we try
to uninhibit the fresh renderloop, which triggers an assert.

Inhibiting newly created outputs while switched to another TTY fixes this crash.

BUG: 435388
FIXED-IN: 5.21
4 years ago
David Edmundson c53b2fa3c5 Fix crash in Unmanaged without compositing
Without compositing we don't have surfaceItems

BUG: 435322
4 years ago
Xaver Hugl 8bbd186f8e platform/drm: add dpmsFinishOn to atomicEnable
Without it the output will stay blank after enabling
4 years ago
Xaver Hugl b2653c45c8 platforms/drm: drop connector name from modelName with serial
The connector name is not relevant to applications or
users - expectation is that the same physical monitor always gets the
same name, regardless of how it's connected. If no serial is available,
fall back to the old scheme to prevent multiple connected outputs from
having the same name.
4 years ago
Alexander Lohnau 002c4612e3 kwinscripts kcm: Only delete entries once changes are applied
This makes it consistent with other QML KCMs
4 years ago
Vlad Zahorodnii d1b537b587 Move insertion of safety points to X11Compositor
Safety points only work on X11. On Wayland, we gain nothing from them.
4 years ago
Nicolas Fella dcdca9be6a Remove unused include 4 years ago
Vlad Zahorodnii 9168ced30f wayland: Make KWinDisplay less chatty
There is no point for printing a warning if kwin cannot read the exe
symlink in /proc. It may happen for processes such as polkit agent.
4 years ago
Vlad Zahorodnii 7054f6b2d6 platforms/drm: Drop stream operator for DrmOutput
There is already one that works for all AbstractOutput classes and
properly restores the state of QDebug.
4 years ago
Vlad Zahorodnii dd9a1e5320 platforms/drm: Rename DrmCrtc::resIndex()
The value that the DrmCrtc::resIndex() function returns is better known
as "pipe index." This change renames the method to match the terminology
used by kernel developers and other compositor developers.
4 years ago
Vlad Zahorodnii 53796aacb2 platforms/drm: Remove unused parameter in DrmCrtc constructor 4 years ago
Vlad Zahorodnii d883cccfd3 platforms/drm: Minor coding style fixes
This reformats some code according to the KF coding style.
4 years ago
Vlad Zahorodnii 7926fce598 platforms/drm: Make DrmObject::m_id private
There's already a getter for the object id.
4 years ago
Vlad Zahorodnii 2ea66eb4c3 platforms/drm: Remove unused field in DrmObject 4 years ago
Vlad Zahorodnii f534b64e5c platforms/drm: Associate drm objects with their gpus
This makes the code more consistent. At the moment, we initialize drm
objects either with the corresponding gpu object or with its fd.
4 years ago
Vlad Zahorodnii 75e7562953 platforms/drm: Fix handling of missing EDID
drmModeGetPropertyBlob() may return null and we should handle that. In
addition to that, m_conn is not initialized in DrmConnector so kwin will
crash whenever the connector info is accessed.
4 years ago
Vlad Zahorodnii 53f7bda7d2 platforms/drm: Make DRM backend less chatty
These warnings can be safely ignored, their priority can be lowered.
4 years ago
Xaver Hugl 2efb9c473d Move Edid and DPMS into DrmConnector 4 years ago
Vlad Zahorodnii 326d211691 platform: Use damage tracked by SurfaceItem
There is no need for both kwin and kwaylandserver track damage.
4 years ago
Vlad Zahorodnii 2ade92d69b platform: Make OpenGLBackend::scanout take SurfaceItem
This allows removing SurfaceInterface::trackedDamage().
4 years ago
Vlad Zahorodnii 36b55261da Drop AbstractClient::addRepaintDuringGeometryUpdates()
It's not needed since the scene keeps track of repaints.
4 years ago
Vlad Zahorodnii 98b0b13f98 libkwineffects: Drop windowPaddingChanged signal
It makes no sense on Wayland.
4 years ago
Vlad Zahorodnii a9d5b84596 scene: Refactor damage teardown in X11SurfaceItem
This introduces the markedAsZombie signal, which is emitted when the
window is about to become deleted. The X11SurfaceItem uses this signal
to determine when the damage must be destroyed.
4 years ago
Vlad Zahorodnii 47113e09b8 scene: Introduce window items
Currently, dealing with sub-surfaces is very difficult due to the scene
design being heavily influenced by X11 requirements.

The goal of this change is to re-work scene abstractions to make improving
the wayland support easier.

The Item class is based on the QQuickItem class. My hope is that one day
we will be able to transition to QtQuick for painting scene, but in
meanwhile it makes more sense to have a minimalistic internal item class.

The WindowItem class represents a window. The SurfaceItem class represents
the contents of either an X11, or a Wayland, or an internal surface. The
DecorationItem and the ShadowItem class represent the server-side deco and
drop-shadow, respectively.

At the moment, the SurfaceItem is bound to the scene window, but the long
term plan is to break that connection so we could re-use the SurfaceItem
for things such as software cursors and drag-and-drop additional icons.

One of the responsibilities of the Item is to schedule repaints as needed.
Ideally, there shouldn't be any addRepaint() calls in the core code. The
Item class schedules repaints on geometry updates. In the future, it also
has to request an update if its opacity or visibility changes.
4 years ago
Vlad Zahorodnii b61c800cee libkwineffects: Introduce windowExpandedGeometryChanged()
This signal can be useful if you want to know when the visible geometry
has changed to update cached repaint region during an animation.
4 years ago
Vlad Zahorodnii c6d2eee3c1 Introduce signals to notify about Shadow changes
These signal can be useful if you need to know when the shadow must be
repainted or its geometry has changed.
4 years ago
Vlad Zahorodnii 0f1afdbdc0 scene: Pass dirty region to SceneOpenGLTexture::updateTexture 4 years ago
Vlad Zahorodnii 369b768f36 wayland: Mark Xwayland windows ready for painting when mapped
This makes the logic that determines when Xwayland windows can be marked
as ready for painting more robust.

At the moment, we call setReadyForPainting() when the surface is damaged,
but we want Toplevel stop managing damages.
4 years ago
Vlad Zahorodnii 0bb5a51da8 x11: Move damage fetching code to X11Compositor
This is needed to make damage fetching specific to X11 surfaces.
4 years ago
Xaver Hugl c0c3ec09af Refactor DrmObject 4 years ago
Xaver Hugl e262c8df33 Move pageFlipHandler to DrmGpu 4 years ago
Vlad Zahorodnii 72cc1daf22 wayland: Introduce an environment variable to disable Xauthority
This is primarily intended for debugging purposes.
4 years ago
David Edmundson a7aee99a23 Port kwin from Plasma Components2
Testing done:
 - ran present windows, checked the button
 - changed desktop with the OSD enabled
 - toggled nightcolour (which shows the other OSD)
4 years ago
Ismael Asensio 3048d92c09 kcm/kwinrules: Unify windows properties methods in KCM class
Put together the two methods about window properties and rules
into the same class, since they are tightly related and they seem
a bit out of place within RuleBookModel

Small refactor patch. No behavior changes
4 years ago
Vlad Zahorodnii 6fdfd8be5f wayland: Switch to new keyboard event notify methods in SeatInterface 4 years ago
Aleix Pol 57aec19744 Remove cleanTabBox duplicated code 4 years ago
Xaver Hugl ad7a826ea1 Drag'n'drop: only activate clients after still hover
BUG: 395368
4 years ago
Jan Blackquill 1f39c45a10 PopupEventFilter: handle keyboard events too
XDG popups want keyboard events routed to the topmost popup
as well as the pointer-outside-of-popup-cancels functionality.
4 years ago
Nate Graham 63b96d7c0d Correct use of KUIT markup in kill dialog text
<p> is HTML; the correct KUIT tag is <para>.
4 years ago
Vlad Zahorodnii 0683597099 effects/screenshot: Introduce dbus interface version 2
With the new interface, the compositor sends raw image data instead of
encoding it as a png image, which causes a lot of overhead on Wayland.

In addition to that, the new interface is more extensible, for example
we can add new options or change the written image data format, however
the latter is less likely to happen.

BUG: 433776
4 years ago
Xaver Hugl eb7703cd64 Only use drmModeAddFB2WithModifiers if supported 4 years ago
Xaver Hugl c1635c1179 Explicitly preserve buffer contents in EglDmabuf 4 years ago
Xaver Hugl c737fde3da DRM: Use QSharedPointer 4 years ago
Vlad Zahorodnii 5c15cca190 wayland: Switch to SeatInterface::notifyPointerButton() 4 years ago
Vlad Zahorodnii ade861d6de Refactor session code
At the moment, the session code is far from being extensible. If we
decide to add support for libseatd, it will be a challenging task with
the current design of session management code. The goal of this
refactoring is to fix that.

Another motivation behind this change is to prepare session related code
for upstreaming to kwayland-server where it belongs.
4 years ago
Vlad Zahorodnii aad767f91f Fix initialization of ColorManager
There might be some outputs during the initialization of the color
manager, we need to handle this case.
4 years ago
Vlad Zahorodnii 343338049c Drop libinputtest
There's little practical value behind it. If there are input related
issues, we will ask for WAYLAND_DEBUG output.
4 years ago