20436 Commits (aba9440780b5af6ef8ab0015285ca8eb02ad23bc)
 

Author SHA1 Message Date
Xaver Hugl a07aae8282 platforms/drm: delay presentation for modesets
Currently KWin is combining modesets with presentation, which causes problems
when multiple monitors are used and crtcs need to be switched around, because
taking away a CRTC from another output causes the driver to disable the
other output. In order to avoid such problems, delay presentation until
all pipelines are ready to present and then do a modeset with a single atomic
commit. To process the resulting page flip events properly this commit also
ports KWin to page_flip_handler2 and changes how the pageFlipped and
notifyFrameFailed signals are processed.
3 years ago
Xaver Hugl e2a0863843 platforms/drm: more dynamic crtc assignment
Hardware constraints limit the number of crtcs and which connector + crtc
combinations can work together. The current code is searching for working
combinations when a hotplug happens but that's not enough, it also needs
to happen when the user enables or disables outputs and when modesets are
done, and the configuration change needs to be applied with a single atomic
commit.

This commit removes the hard dependency of DrmPipeline on crtcs by moving
the pending state of outputs from the drm objects to DrmPipeline itself,
which ensures that it's independent from the set of drm objects currently
used. It also changes requests from KScreen to be applied truly atomically.
3 years ago
Xaver Hugl 29e5864402 waylandserver: fix logout crash
When we shut down we can have zero outputs, and thus a nullptr
primary output.
3 years ago
Vlad Zahorodnii 1d96b41bb4 build: Move software vsync helpers to libkwin
Compile software vsync helpers into libkwin for the consistency sake
with other helpers.
3 years ago
Fushan Wen cc42e47ec5 Do not check m_inited again in focusUpdatesBlocked()
We have already checked m_inited in `InputDeviceHandler::update()`, and
`focusUpdatesBlocked()` will be only called by it.
3 years ago
Aleix Pol c1e9cc283d Implement Primary Displays on the wayland session
Adopts the kde_outputmanagement_v2 hooks for it
3 years ago
Vlad Zahorodnii 2e8f811d3f Remove bogus full repaint in EffectsHandlerImpl::isEffectSupported()
It makes no sense to schedule a full repaint when somebody checks if the
specified effect is supported.
3 years ago
Vlad Zahorodnii 99bcb0eea7 Remove some redundant Toplevel::updateShadow() calls
Toplevel::setupCompositing() calls updateShadow().
3 years ago
Vlad Zahorodnii c478722655 scenes/opengl: Remove redundant debug message
The Compositor will print whether opengl compositing has been
initialized successfully.
3 years ago
Vlad Zahorodnii 3ade20eea5 Make Compositor responsible for syncing the GlStrictBinding flag
The GlStrictBinding flag indicates whether it's okay not to re-bind the X11
pixmap to the OpenGL surface texture if the corresponding window is damaged.
It doesn't really affect the SceneOpenGL, only low level backend stuff.
3 years ago
Vlad Zahorodnii dabcb558b4 Move opengl debug output initialization to kwinglutils
kwinglutils is a better place as the debug output is initialized for the
render backend's context, not scene's context.
3 years ago
Vlad Zahorodnii 2560288e4b wayland: Check workspace position when preferred deco mode changes
This ensures that the window will have correct geometry if a maximized
window changes preferred decoration mode. X11Client does something
similar, see X11Client::updateShape().

In hindsight, perhaps, AbstractClient::{create,destroy}Decoration() must
preserve the old frame geometry, but it's not clear how to do that
because it requires decoration updates to be truly async, otherwise
there will be ugly flickering.
3 years ago
l10n daemon script 268d799636 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"
3 years ago
Vlad Zahorodnii cff74b568b Decouple render backend from scene
Currently, the scene owns the renderer, which puts more
responsibilities on the scene other than painting windows and it also
puts some limitations on what we can do, for example, there can be only
one scene, etc.

This change decouples the scene and the renderer so the scene is more
swappable.

Scenes are no longer implemented as plugins because opengl backend
and scene creation needs to be wrapped in opengl safety points. We
could still create the render backend and then go through the list
of scene plugins, but accessing concrete scene implementation is
much much simpler. Besides that, having scenes implemented as plugins
is not worthwhile because there are only two scenes and each contributes
very small amount of binary size. On the other hand, we still need to
take into account how many times kwin accesses the hard drive to load
plugins in order to function as expected.
3 years ago
Vlad Zahorodnii 3485eb6200 cmake: Move base render backend classes to libkwin
This allows using base opengl backends in libkwin, which can be useful
later on for the purpose of moving the ownership of render backends from
the Scene class to the Compositor class.
3 years ago
Vlad Zahorodnii c5477011ed Add missing KWIN_EXPORT in QPainterBackend 3 years ago
Xaver Hugl 6ff4de2e05 port everything away from Q_FOREACH 3 years ago
Xaver Hugl e1942cfa41 qpainter: remove outdated comment 3 years ago
Xaver Hugl c01c15f241 AbstractClient: split up hideClient into hide and show
This makes the purpose of the method call more clear
3 years ago
Xaver Hugl f522540e33 AbstractClient: remove placeIn
The method was only there to set the geometry restore. Instead, call on
Placement directly
3 years ago
Aleix Pol b44f33c7ed DecorationItem: Prevent crash
We are calling a QPointer without checking it first.
3 years ago
Vlad Zahorodnii 0eb56fff6e kwineffects: Remove ShaderManager::selfTest()
It has been disabled with Mesa for almost half a decade due to false
positives and even if it weren't disabled, it contributes to the startup
time.

The commit message that added the self test doesn't explain why it was
added, but if it was added to detect unstable drivers, it's not worth it.
3 years ago
Vlad Zahorodnii aead97c39f Move scenes to the src directory
Similar to the backends, it's far more intuitive to have scenes in the
toplevel source directory rather than the plugins directory.
3 years ago
Kristen McWilliam efa08b1f30 helpers/wayland_wrapper: Move crash increment to not count restarts
The current behaviour has the crash counter immediately incremented
to 1 after a restart, this change has it set to 0 as expected.
3 years ago
Andrey Butirsky 43aec9ca18 fixup! [wayland] fix ignored keyboard RepeatRate
Ceiling so that it repeats on minimal 0.x rates accessible via UI

BUG: 443721
3 years ago
Vlad Zahorodnii 2fd93e329a scenes/opengl: Stop pushing map shader in SceneOpenGL constructor
KWin can work just fine even without an initially pushed MapTexture
shader. This simplifies the initialization of the SceneOpenGL.
3 years ago
Vlad Zahorodnii 350144cde6 scenes/opengl: Remove viewport check
It's unreliable and it sometimes produces false positives (due to buggy
drivers).
3 years ago
Vlad Zahorodnii 1cf1703dec scenes/opengl: Remove Mesa 10 check
Mesa 10 is a really old driver.
3 years ago
Kristen McWilliam 2a531847c7 dbusinterface: Add doc comment for replace() method
Replace can be in reference to anything, this should definitely
help to provide better context.
3 years ago
Xaver Hugl 75863454a0 RenderLoop: restrict repaint scheduling with fullscreen windows
With an opaque fullscreen window we can be sure that items under it don't
actually require us to repaint. This should yield some small efficiency
improvements and resolves stutter with adaptive sync.

BUG: 443872
FIXED-IN: 5.23.3
3 years ago
l10n daemon script 84a5c7b314 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"
3 years ago
Vlad Zahorodnii 22b7ac02b4 scripts/minimizeall: Try to preserve last active window
Windows in workspace.clientList() are sorted in the map order. This
means that the minimize all script will try to activate the last mapped
window when unminimizing windows, which is a bit annoying.

This change ensures that the minimize all script doesn't activate wrong
window by minimizing and unminimizing windows in the stacking order.
It's not a bullet-proof solution though, but it should produce good
enough results.
3 years ago
Vlad Zahorodnii 89067ff9db scenes/opengl: Remove backend failed check
If the backend has failed to initialize, the constructor won't run.
3 years ago
Vlad Zahorodnii 0f6f4ee624 scenes/opengl: Merge SceneOpenGL and SceneOpenGL2
There's no OpenGL 1 renderer anymore so we can have only one scene
class now.
3 years ago
Fushan Wen 2d93b625e2 effects/overview: Always show the delete button when tablet mode is on
It's very difficult for touch screen users to discover the delete
button,  so make the delete button always visible when tablet mode
is on.
3 years ago
Fushan Wen f4ca7a43c1 effects/overview: Give the editor of desktop name a background
Show background to indicate the name of a virtual desktop is being edited.
3 years ago
Fushan Wen 61f7b2e499 effects/overview: Save desktop name when the text field loses focus
Replace onAccepted with onEditingFinished.
3 years ago
Aleix Pol f0f2f0f469 screencast: Support reporting damage regions 3 years ago
Aleix Pol 76d53a0ce7 screencast: No need to describe the cursor while it's outside the viewport 3 years ago
Aleix Pol d054b12123 screencast: Skip frames with no damage
Instead of issuing a full redraw. We'll be calling outputChanged when
uploading to drm, there's no need to stream that as well.
3 years ago
Andy Gebauer f7bd6ef6c1 Update layers.cpp to compile with clang + libcxx 3 years ago
Vlad Zahorodnii 3eb5fa18fb backends/x11: Remove unused KWaylandServer includes 3 years ago
Vlad Zahorodnii 2870e4295b backends/wayland: Remove unused KWaylandServer includes 3 years ago
Vlad Zahorodnii d89501a079 Move platform backends to backends directory
This improves file organization in kwin by putting backends in a single
directory.

It also makes easier to discover kwin's low level components for new
contributors because the plugins directory may come as the last place to
look for. When one hears "plugin", the first thing that comes to mind is
regular plugins, not low level backends.
3 years ago
Kristen McWilliam ab09fdf0b2 dbusinterface: add doc comment for queryWindowInfo()
Adds a simple doc comment to explain what the method does.
3 years ago
Vlad Zahorodnii 94de28bfbe Move input backends in their own directory 3 years ago
Vlad Zahorodnii 9fc2f04c75 platforms/virtual: Port to InputDevice 3 years ago
Vlad Zahorodnii 69bca8cf71 platforms/wayland: Port to InputDevice
This ports the nested wayland platform plugin to the InputDevice
abstractions.

Some global handling logic has been simplified to make porting more
straightforward.
3 years ago
Vlad Zahorodnii 6c0b5be99d platforms/x11: Port to InputDevice and InputBackend 3 years ago
Vlad Zahorodnii 7f72e5627e wayland: Port fake input integration to InputDevice
This ensures that the cursor will be properly shown/hidden when a fake
pointer is added on a system with no physical pointer connected.
3 years ago