23477 Commits (7fffe99328f35aa62d446ac0c3bd97742720fe3a)
 

Author SHA1 Message Date
Vlad Zahorodnii 7fffe99328 build: Add -Wno-unused-parameter compiler option
Due to being a compositor, kwin has to conform to some certain
interfaces. It means a lot of virtual functions and function tables to
integrate with C APIs. Naturally, we not always want to use every
argument in such functions.

Since we get -Wunused-parameter from -Wall, we have to plumb those
unused arguments in order to suppress compiler warnings at the moment.

However, I don't think that extra work is worth it. We cannot change or
alter prototypes in any way to fix the warning the desired way. Q_UNUSED
and similar macros are not good indicators of whether an argument is
used too, we tend to overlook putting or removing those macros. I've
also noticed that Q_UNUSED are not used to guide us with the removal no
longer needed parameters.

Therefore, I think it's worth adding -Wno-unused-parameter compiler
option to stop the compiler producing warnings about unused parameters.
It changes nothing except that we don't need to put Q_UNUSED anymore,
which can be really cumbersome sometimes. Note that it doesn't affect
unused variables, you'll still get a -Wunused-variable compiler warning
if a variable is unused.
2 years ago
Xaver Hugl c308a262be kcmkwin/compositing: remove tearing prevention and scaling options
The option are confusing and noone should ever need to touch them.

BUG: 450279
2 years ago
Nicolas Fella 378006cc73 [effects/overview] Don't allow setting non-global shortcuts
Only global shotcuts make sense here
2 years ago
Xaver Hugl 3d7e926c94 autotests/drm: add autotest for common modes 2 years ago
Xaver Hugl 3f3d41f259 backends/drm: fix common mode generation
There were overflows in the bandwidth estimation calculation. To simplify things,
also only generate common modes if the display doesn't advertise them on its own
already.
2 years ago
Aleix Pol f649363a4e Address warnings
|-operator on bool
Comparison on technically different enums.
2 years ago
Albert Astals Cid a9f5b56804 Make gettext happier
Seems we can't have a plural with an argument in singular and not in the
plural

a format specification for argument 2, as in 'msgstr[0]', doesn't exist in 'msgid_plural'
msgfmt: found 1 fatal error
2 years ago
l10n daemon script 332ea380e6 GIT_SILENT Sync po/docbooks with svn 2 years ago
l10n daemon script 365dfaa4c0 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
Aleix Pol 8417492781 Include org.freedesktop.locale1 support
Makes it possible to follow the dbus service for locale configuration,
making it possible to have third parties integrate with Plasma.

This is done opt-in for now, it can be adopted generally in the future,
if necessary.
2 years ago
Yunus Erdem Ergül 96cfc411f0 scripting: Expose cursor position to the API
Added cursorPos property and cursorPosChanged signal to WorkspaceWrapper
2 years ago
l10n daemon script 88991f9355 GIT_SILENT Sync po/docbooks with svn 2 years ago
Aleix Pol 47c3c2d143 libinput: Support switching the targetted output with a shortcut
I was told it's how artists are used to using these tablets so it makes
sense to support the workflow.
2 years ago
Aleix Pol 77c5198dc8 libinput: Allow setting an empty output name
For tablets, it signifies "follow the active output".
2 years ago
Aleix Pol a11681918a OSD: Fix OSD::show from the non-main thread
If it's issued from a different thread, pass it to the main one so it's
eventually displayed.
Otherwise, it would just crash kwin.
2 years ago
l10n daemon script af983dba42 GIT_SILENT Sync po/docbooks with svn 2 years ago
l10n daemon script ef60c8e53c 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
Xaver Hugl b3d0698126 backends/drm: rewrite most of EglGbmLayerSurface
This rewrite ensures that
- formats are tested for multi-gpu transfer
- dmabuf with either 10bpc or 8bpc buffers are preferred to cpu copy
- formats where drmModeAddFB2 fails are skipped
2 years ago
Xaver Hugl cd6a219961 backends/drm: make the buffer target constant
There's no reason for it to be dynamic
2 years ago
Xaver Hugl 228575f0ae backends/drm: store creation flags in GbmBuffer 2 years ago
Kai Uwe Broulik 0902d91a42 nightcolormanager: Emit timing change only when they have actually changed
Avoids pointless DBus traffic.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2 years ago
Vlad Zahorodnii d89feb33b2 Remove some Q_UNUSED
It's weird to wrap a return value in Q_UNUSED macro.
2 years ago
Vlad Zahorodnii 57eb60122b Make Atoms code more readable
It improves readability by making calling getReply() explicit.
2 years ago
Vlad Zahorodnii b30e81cb22 x11: Keep compositing mode untouched if kwin crashes
kwin can crash for reasons that have nothing to do with compositing. If
that's the case, after two crashes compositing will be permanently
disabled and you would need to go to system settings to reenable it, the
timestamp based check in the x11 backend won't be effective.

CCBUG: 452344
2 years ago
Vlad Zahorodnii fd978838cc qpa: Geometry handling fixes
We don't need to emit {x,y,width,height}Changed signals ourselves. We
also need to send an expose event otherwise the window can be rendered
incorrectly if it's resized. The logic follows QtWayland implementation.
2 years ago
Vlad Zahorodnii 9774eacbbe Remove ServiceTypes info
Binary plugins don't need it. KPackage packages have "KPackageStructure"
property instead.
2 years ago
l10n daemon script f19e3d5425 GIT_SILENT Sync po/docbooks with svn 2 years ago
Vlad Zahorodnii 61644305f0 wayland: Drop unused field in XdgOutputManagerV1Interface 2 years ago
Vlad Zahorodnii 0c34957625 wayland: Hide XdgOutputV1Interface class
With the pull approach, the XdgOutputV1Interface class doesn't have to
be exposed in the public api and can be made private to simplify the
implementation of the xdg-output-v1 protocol.
2 years ago
Vlad Zahorodnii b40d76d35c wayland: Prevent matching dnd actions after drop
Currently, kwin will continue matching dnd actions after a drop. This is
mainly needed in order to make "ask" action work.

However, it appears like there are clients in the wild that update offer
actions after receiving wl_data_source.dnd_drop_performed and wl_data_device.drop
events.

One could argue that's a client bug, and perhaps it is, but the spec is
vague about that. In meanwhile, let's make sure that dnd action matching
is active after drop only when the selected data source action is "ask."
2 years ago
Łukasz Patron a9acef8573 x11: Don't force QT_QPA_PLATFORM=xcb
This is basically a cherry pick of 77ec43d5e (Don't force
QT_QPA_PLATFORM=wayland), except for X11.
2 years ago
Łukasz Patron c2b4f03f96 x11: Don't force QT_NO_GLIB=1
This breaks certain apps, e.g. KDE System Settings when launched from
overview effect.

BUG: 460980
2 years ago
Vlad Zahorodnii a9833dc9dd scripting: Prefer metadata.json over metadata.desktop in GenericScriptedConfig
KPluginMetaData in KF 6 doesn't load desktop files anymore. It means
that plasma packages need to come with json metadata files.

This change adjusts the generic scripted config loader so it can load
configuration even for packages with no metadata.desktop files.
2 years ago
l10n daemon script 0e393b8fe0 GIT_SILENT Sync po/docbooks with svn 2 years ago
l10n daemon script 109bdf8f42 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
Xaver Hugl 2997fb24bb x11window: revert more from 3a28c02f
BUG: 461032
2 years ago
Xaver Hugl 1dcbc3c6f8 backends/drm: fix format sorting
As the drm format number of 10 bit colors is lower, the fallback sorting
preferred those formats, even if KWIN_DRM_PREFER_COLOR_DEPTH=24 was set.
To fix that, prefer 8 bit colors over something random.
2 years ago
Vlad Zahorodnii 8fa1883cd9 effects/invert: Make it fully responsible for inverting the screen
The X11 standalone backend has an obscure fallback to hw screen
inversion if compositing is disabled. While it's great, it conflicts
with existing features such as night color.

In order to make code cleaner and clean up dependencies, this change
moves screen inversion shortcut to the invert effect. While it can
potentially affect users that don't use compositing, I think the number
of such affected people is very small.

In hindsight, preferring hw over sw transform is nice, but I think we
need to analyze it first and then come up with a proper solution that
integrates with color management and works great both on x11 and wayland.
2 years ago
Vlad Zahorodnii b18c6a4c52 backends/virtual: Drop VirtualBackend::captureOutput()
It's unused. Bring it back when there are usecases.
2 years ago
Vlad Zahorodnii 6b253074f3 autotests: Drop testSceneQPainter
The entire approach behind that test is wrong. Even slight changes in
one pixel can make the test fail. There's no human-friendly way to
determine what the difference between reference and actual frames are.
The reference frame is generated in code rather than from an image on
the disk, which makes the tests even more error-prone.

The test is flaky too and constantly blocks merging patch submissions.

We need a different way to test rendering results, not what
testSceneQPainter currently does. Normally, I would say that we need
to add such an infrastructure before dropping the test, but it makes the
merging process so inconvenient and the test doesn't really bring any
value, it tests really basic cases which are noticeable right away after
launching kwin.
2 years ago
Arjen Hiemstra 11dc73c6ce effectshandler: Reset iterators when active effects changes
Clearing and resizing m_activeEffects invalidates iterators, so we need
to ensure we reset any iterators that were stored.
2 years ago
Arjen Hiemstra 4c8fd4b8ca OffscreenEffect: Use drawWindow instead of renderWindow when rendering contents
renderWindow bypasses all other effects and simply calls the code that
is responsible for the final render of the window. This means that any
effects that are active on the window are skipped, including things that
may change how the window is rendered like the invert effect. To fix
that, ensure we render the window with all effects applied.

BUG: 459417
2 years ago
Xaver Hugl 580396e377 x11window: partially revert 3a28c02f
In some cases it can cause rather than fix problems with maximization
2 years ago
Xaver Hugl f6d14f1b44 effects/kscreen: don't stop effect when fade out animation is done
The screen needs to stay black until it gets enabled again, otherwise
slight timing differences can cause the screen to turn on full brightness
again immediately before turning off.

BUG: 460902
2 years ago
Vlad Zahorodnii a4cb0e7fd8 Forward declare QAction in src/input.h 2 years ago
Vlad Zahorodnii daa351a398 Remove KGlobalAccel bits from Platform
With the addition of KGlobalAccel::globalShortcutActiveChanged(),
there's a way to monitor all triggered actions without adding any
boilerplate code.

This change removes the KGlobalAccel bits from the Platform class. This
reduces the amount of boilerplate code; currently we need to be careful
about ensuring that Platform::setupActionForKGlobalAccel() is called.
Another reason behind this change is to simplify the api of Platform and
remove things that don't have anything to do with outputs.
2 years ago
l10n daemon script abf24cec4a GIT_SILENT Sync po/docbooks with svn 2 years ago
l10n daemon script fcc0b10fee 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
Nicolas Fella 56c2afc749 Bump PlasmaWindowManagement version to 16
Needed for resource name
2 years ago
Vlad Zahorodnii 3de852cd4f wayland: Drop DataDeviceInterface::updateProxy()
It's unused.
2 years ago