20419 Commits (15993fa6bb595b5d0fa027a8b9f40e211fe8fd58)
 

Author SHA1 Message Date
Vlad Zahorodnii b2f879eb33 effects/overview: Use strict equality operator in DesktopBar
It yields better performance.
3 years ago
Vlad Zahorodnii b7d0f292f3 effects/overview: Load desktop name editor on demand
It's most likely going to be unused, so don't bother loading it.
3 years ago
David Redondo 3bebd3dce4 Start pointer gestures with fingerCount fingers not time fingers 3 years ago
Vlad Zahorodnii ca4e643d67 effects/overview: Move Escape key handling to ScreenView
With this, no individual component has to handle the Escape key to
deactivate the effect.
3 years ago
Fushan Wen 25b035e84c effects/overview: Press Enter to create a new desktop
Add `Keys.onReturnPressd` and `Keys.onEnterPressed` to PC3.Button in
DesktopBar, so user can trigger the action by pressing Enter.
3 years ago
Oleg Solovyov cd4bdaa8fe Use NewStuff Elements 3 years ago
Weng Xuetian 83a036e9d4 Fix XWayland abstract socket address.
NUL-termination byte is not needed for abstract socket. This leads to
XWayland listening to a wrong address.

Confirmed with lsof.

BUG: 442362
3 years ago
Xaver Hugl 0afd0aa4be backends/drm: some simplifications for multi gpu
There is only one type of egl backend now, so the abstract backend can be
removed
3 years ago
Xaver Hugl c68f7f13f3 backends/drm,wayland: require gbm
The ifdefs for have_gbm obfuscate the code unnecessarily - the drm backend
is not a great experience with qpainter, so in practice noone should ship
it without gbm anyways.
3 years ago
Bharadwaj Raju 87afdb3e01 effects/overview: Make pressing Esc after closing label edit end the effect 3 years ago
Vlad Zahorodnii affb640bcb Move OverlayWindow getter to RenderBackend 3 years ago
Vlad Zahorodnii b8b8f93ca3 Drop Workspace::m_compositor
The Compositor is a singleton, there's no need to cache the return value
of Compositor::self().
3 years ago
Vlad Zahorodnii 9fca6209b7 Make Scene responsible for handling Workspace::deletedRemoved() 3 years ago
Vlad Zahorodnii 1fe8a18844 Make Scene responsible for scheduling repaint when current activity changes 3 years ago
Vlad Zahorodnii 6d0cca5c7f Move all dirty region scene repaint scheduling to Scene
The Compositor contains nothing that can potentially get dirty and need
repainting.

As is, the advantages of this move aren't really noticeable, but it
makes sense with multiple scenes.

Backend parts are far from ideal, they can be improved later on as we
progress with the scene redesign.
3 years ago
Vlad Zahorodnii 158fb016a4 Add Workspace::geometryChanged() signal
The new signal can be used to monitor workspace geometry changes. It can
be used by the Scene.
3 years ago
Vlad Zahorodnii 48f943bd75 Introduce explicit base render backend type
The main idea behind the render backend is to decouple low level bits
from scenes. The end goal is to make the render backend provide render
targets where the scene can render.

Design-wise, such a split is more flexible than the current state, for
example we could start experimenting with using qtquick (assuming that
the legacy scene is properly encapsulated) or creating multiple scenes,
for example for each output layer, etc.

So far, the RenderBackend class only contains one getter, more stuff will
be moved from the Scene as it makes sense.
3 years ago
Vlad Zahorodnii f3071707f9 Simplify no compositing code path in Compositor::setupStart()
If either the render backend or the scene has failed to initialize,
both m_backend and m_scene will be null.
3 years ago
Nicolas Fella 44dff155b4 Remove unneeded X-Plasma-API from KCM metadata
It doesn't serve any purpose
3 years ago
Aleix Pol bfe5c73541 Install the org.kde.KWin.TabletModeManager.xml 3 years ago
Fushan Wen c517e6cebd xwl: Fix unused warning in xwldrophandler.cpp 3 years ago
Xaver Hugl bad5752110 platforms/drm: kill the EglStreams backend
The proprietary NVidia driver now supports gbm, which vastly improves the
user experience. For older devices that will not get gbm support dropping
EglStreams will likely not have a big impact as it has several session breaking
issues anyways.

By removing the backend a lot of logic can be simplified, most notably multi-gpu.
3 years ago
Aleix Pol f91ae3e975 xwayland: Also follow the primary output
We want to update the XRandR information so that X11 apps know which is
the primary display, since some of them make use of it to position
themselves.
3 years ago
Vlad Zahorodnii 7580d6c6e0 scenes/opengl: Remove NPOT extension check
NPOT textures are in core spec in OpenGL 2.0+.
3 years ago
Xaver Hugl 258b8b9bce WaylandServer: replace quotes with qstring 3 years ago
l10n daemon script 773de94486 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
Nate Graham 6b949cac02 Use "Centered" window placement by default
The current "Minimize Overlapping" window placement tends to position
windows in locations that seem completely random, typically in a screen
corner. It is doing this because, true to its name, it is trying to
avoid overlapping other windows as much as possible. However in practice
this is rarely helpful. When the user opens a new window, it's because
they want to use it, and positioning the window far from where the
user is likely to be looking is counter-productive. This is even more
true on today's large and wide displays, where placing the window in a
corner may position it entirely outside the user's current field of
vision. We get bug reports about this exact issue for notifications
(which always appear in a corner by default) by users of such screens.
For notifications, this can be justifiable because notifications are
designed to be ignorable; app windows on the other hand, are not.

As a result, I commonly see Plasma users open windows and then
immediately, reflexively grab the window's titlebar and drag it to the
center of the screen. I have seen my wife do this. I have seen every
YouTube reviewer of Plasma do this. I have even see fellow KDE
developers at sprints do this. It seems like quite a common impulse
to want a newly-opened window to appear in the center of the screen,
which is where the user is likely to already be looking.

Thankfully, KWin already has a window placement mode that does this
automatically: "Centered". Accordingly, this commit changes the default
KWin window placement mode from "Minimize Overlapping" to "Centered".

No kconf migration script is provided because this is a better default
for most people in most cases, and existing users are highly likely to
appreciate this change.
3 years ago
Xaver Hugl 23d9341f6f platforms/drm: remove property blob handling from DrmProperty
It's no longer used
3 years ago
Xaver Hugl 3f62ea44dd platforms/drm: move gamma blob ownership to DrmPipeline::Gamma 3 years ago
Vlad Zahorodnii 02bb276ebf platforms/drm: Move ownership of mode blob to connector mode
The main motivation behind this change is to move management of drm
blobs out of property wrappers in specialized wrappers to simplify state
management with blobs.

Connector mode blobs are created on demand.
3 years ago
Xaver Hugl 1b5009ae2b platforms/drm: improve logging a bit
Only print the flags once for all pipelines and include changed unused objects
as well.
3 years ago
Xaver Hugl 7283c98f27 platforms/drm: disable unused resources on modesets
When we switch CRTCs it can happen that a CRTC would stay enabled yet has
no connectors anymore. In this case the kernel may reject our atomic commit,
which would cause the modeset to fail. To counteract that, properly disable
unused drm objects
3 years ago
Xaver Hugl 102fb3d5f2 platforms/drm: keep disconnected DrmConnectors around 3 years ago
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