It makes the behavior of the ItemRendererQPainter compatible with the
behavior of the ItemRendererOpenGL. It is needed to ensure that the
cursor layer is properly cleared too.
This is needed to establish explicit connection between an item and the
scene it belongs to. For now, the scene must be known at the item
construction time. Perhaps it can be improved in the future by items
inheriting their scene from the parent item, but the scene would need to
be refactored more so there's a root item or something like that.
Currently, Item schedules repaints taking output geometry into account,
but that's going to work poorly for cases other than workspace scene.
Moving from Output to SceneDelegate also allows us to unify some X11 and
Wayland specific code paths in Item.
Furthermore, it ensures that effects->paintScreen() won't remove pending
repaints for the output.
It makes more sense for an output layer to return the render target fbo.
The user of the render target will then take appropriate steps to bind
the fbo. It reduces the amount of boilerplate code in output layers too.
The goal is to create surface items for things that are not in the
workspace scene. RenderBackend perhaps is not a great place for these
factory functions. On the other hand, this change merely rewires code
from Scene to RenderBackend. I think that in distant future we could
make surface items pick surface texture type on their own, for what it's
worth that's what we would do in QtQuick.
Remove "kwin", it's repetitive and doesn't add new information. In
addition to that, prefixing commits that change kcms will become more
straightforward. There's more than one scheme people use, some include
"kwin", some don't.
In the QML code we set the text of the KNS button to `i18n("Get New Desktop Effects...")`.
Consequently we should use the same terminology in the knsrc file.
BUG: 463021
There's no any way to integrate OffscreenQuickView into the scene graph.
So make the EffectsHandlerImpl responsible for drawing quick views until
the corresponding item is introduced (requires a lot and a lot of
refactoring in effects) or the design of kwin changes so much that we
don't need this special code path.
ItemRenderer class provides Item rendering facilities. The main
motivation behind this change is to extract code that can be used to
render both normal windows as well as the cursor.
With current and broken behavior in Mesa, the timeout will always be
reached. GPU resets don't take anywhere near even a second, making
the user wait for 10s has no use.
This kind of code doesn't belong in the SceneOpenGL. Moving it to the
Compositor class allows us to make the Scene class less central and
permit running with more than one scene, e.g. one for the workspace and
the other one for the cursor, etc.
This reverts commit e60f26e0ab.
Cancelling the primary selection breaks text selection in applications
such as gedit. In those apps, you can't select text neither with your
mouse nor keyboard.
BUG: 461498
These settings are highly technical, and users are likely to feel
completely lost or intimidated when they see them if they're just
browsing around. Let's add some text to explain what the heck this is
for.
This is the typical way we do this. The result looks the same in a
width-constrained window, but uses the more common FormLayout
appearance for big windows.
- obey rule of 5
- always initialize variables at declaration
- don't be needlessly explicit about things
- prefer std::array over c arrays
- don't else if after return
Currently, kwin blits the dnd icon onto the cursor image. This doesn't
work on mobile because the cursor is usually hidden there.
As a short term solution, put the dnd icon in the Scene. In the future,
it needs to be put in its own render layer.
It's somewhat popular for voice communication applications to support
Push-to-Talk. This means that the process itself expects to get all of
the system input. This behaviour albeit sound does not work on Wayland
systems.
This commit adds an option to let legacy X11 applications that assume
they will be getting all information to do so until these apps are
properly ported to the XDP GlobalShortcuts.
Right now, when `paintBackground()` is called to clear the background,
we use custom geometry and render that when the damage region isn't
infinite. Rather than using geometry, we can instead use `glScissor()`
to set the area that needs to be cleared and then use `glClear()` to
clear it.
In addition, if we have only one rect in the damage region and that rect
matches the render target rect, we can completely skip all that setup
and use `glClear()` directly.