Commit graph

17984 commits

Author SHA1 Message Date
Roman Gilg
b8b9f78b37 Revert "[platforms/x11] Remove triple buffering detection"
This reverts commit ad892ce3a6.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 10:00:20 +01:00
Roman Gilg
a15624dcc5 Revert "[platforms/x11/standalone] Remove SGI swap control and video sync"
This reverts commit 285adc1950.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 10:00:15 +01:00
Roman Gilg
bcf64af49b Revert "Remove vsync detection and configurability"
This reverts commit b3a19f9e5b.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 10:00:12 +01:00
Roman Gilg
ac05dd01c8 Revert "[platforms/x11] Never block on retrace, always present after paint"
This reverts commit 8d13729031.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 10:00:08 +01:00
Roman Gilg
b972159ddf Revert "Add hasSwapEvent getter"
This reverts commit a55dee3bd3.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 10:00:03 +01:00
Roman Gilg
fbb7c241c7 Revert "Composite without timer on swap events"
This reverts commit 00bf75d06e.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 09:59:58 +01:00
Roman Gilg
14702651b3 Revert "[platforms/x11/standalone] Use intel swap events by default"
This reverts commit e7da4d65ec.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 09:59:54 +01:00
Roman Gilg
63898fc569 Revert "Reset buffer swap state on stop"
This reverts commit ba2c0324d2.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 09:59:48 +01:00
Roman Gilg
2dabd0b112 Revert "Fix buffer swap assert"
This reverts commit be01ba0ae7.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 09:59:33 +01:00
Roman Gilg
a5c2f23e92 Revert "Flexible composite swap and timer events"
This reverts commit 1e3128b0db.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 09:59:21 +01:00
Roman Gilg
396ef7100e Revert "Remove buffer flip pending assert for now"
This reverts commit af3fbf343b.

See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
2020-01-16 09:58:28 +01:00
l10n daemon script
bfc6361f15 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"
2020-01-16 05:56:10 +01:00
Vlad Zahorodnii
b8368fdf6f [scenes/opengl] Merge window classes
Summary:
Legacy OpenGL 1 compositing backend had been dropped quite a while ago
so some of OpenGL scene classes can be merged back.

Test Plan: Compiles, windows are rendered as before.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26700
2020-01-16 01:13:04 +02:00
Vlad Zahorodnii
1565910c40 [nightcolor] Expose transition timings to d-bus
Summary:
These timings can be useful for the night color applet. For example, it
could show "Next transition will start at XXX" or something like that.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26666
2020-01-15 21:15:26 +02:00
Vlad Zahorodnii
8e89308a33 [plugins/windowsystem] Fix compilation with no-deprecated build of KWindowSystem
Summary:
This change ensures that KWin can be built with a version of KWS that
doesn't have any deprecated stuff. I assume that no distro ships such
builds of KWS and it's only a developer thing.

I didn't backport KWINDOWSYSTEM_BUILD_DEPRECATED_SINCE macro because
the next release of Plasma (5.18) depends on KF 5.66.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26642
2020-01-15 21:02:55 +02:00
l10n daemon script
7e298531e2 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"
2020-01-15 06:14:46 +01:00
Vlad Zahorodnii
91d89a9840 [effects/flipswitch] Add a const ref
Summary: Add a const reference to match prototype of KGlobalAccel::globalShortcutChanged.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26668
2020-01-14 18:46:10 +02:00
Vlad Zahorodnii
55b4912004 Update my email address 2020-01-14 18:17:18 +02:00
Cyril Rossi
687fcd8203 KCM KWinDecoration port to KConfigXT
Summary: Port to KConfigXt and also consider immutable element

Reviewers: #kwin, ervin, bport, mart, davidedmundson

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25949
2020-01-14 11:01:10 +01:00
l10n daemon script
7c8431af23 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"
2020-01-14 06:00:17 +01:00
Björn Feber
3bc10be3bb Add default shortcut to switch to the desktop to the left/right/top/bottom
Summary:
Very useful when you use virtual desktops. See T11520 for more information.

This reverts commit d72e96802b.

Test Plan: Have 2 or more virtual desktops and use the new shortcut.

Reviewers: #kwin, #plasma, #vdg, romangg, ngraham, davidedmundson

Reviewed By: #vdg, ngraham, davidedmundson

Subscribers: alexisd, alexde, ognarb, hpereiradacosta, broulik, davidedmundson, thiagosueto, ngraham, romangg, zzag, #vdg, #plasma, kwin, #kwin

Tags: #kwin

Maniphest Tasks: T11520

Differential Revision: https://phabricator.kde.org/D24281
2020-01-13 09:55:38 -07:00
Kai Uwe Broulik
efb2f356ac [kcmkwin/kwincompositing] Remove "animation speed" keyword
While the slider is still there for non-Plasma, inside Plasma, where you would use System Settings, the slider is in Workspace Options.

Differential Revision: https://phabricator.kde.org/D26625
2020-01-13 17:23:20 +01:00
l10n daemon script
f5b018cc82 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"
2020-01-13 05:53:53 +01:00
Victor Ryzhykh
6c549cbead Extract messages from cpp files in colorcorrection/ 2020-01-12 21:24:17 +02:00
Laurent Montel
797b477138 Already added by kaboutdata 2020-01-12 14:36:17 +01:00
l10n daemon script
04979d892f 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"
2020-01-12 06:02:49 +01:00
David Edmundson
212d87a32e [scenes/opengl] Remove outdated hack to reset vertex buffers
Summary:
Scene opengl has a callback for when we have a GL error. One of the
handlers for an error calls scheduleVboReInit the history shows it was a
forerunner to the GLX_NV_robustness_video_memory_purge but resetting
only one tiny part based on debug output.

When we get here we schedule a reset of the vertex buffer, via a timer.
When the timer is caled we have no idea what GL context was last
current, if it's not the currect context then the main scene
GLVertexBuffer will be deleted but not correctly re-initialised.

We have two very common crashes with a corrupted
GLVertexBuffer::streamingBuffer() which would match up perfectly.

Given that we now have a proper mechanism to reset the entire scene, we
don't need this timer based hack and resolve that problem.

BUG: 399499
BUG: 372305

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26556
2020-01-10 14:24:54 +00:00
Vlad Zahorodnii
6e910c455d Return correct shape for Unmanaged clients
Summary:
Currently EffectWindowImpl::shape() falls back to the frame geometry
because isX11Client() returns invalid value for Unmanaged clients.

BUG: 415475

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26542
2020-01-10 12:05:55 +02:00
David Edmundson
928554698b [colormanager] Fix build on older glib
Summary:
Copies the approach we do for various GL calls not existing on the
system headers.

See D25962

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26553
2020-01-09 20:59:15 +00:00
Vlad Zahorodnii
af71763be5 [scene] Fix decoration texture bleeding
Summary:
Quite long time ago, window decorations were painted on real X11 windows.
The nicest thing about that approach is that we get both contents of the
client and the frame window at the same time. However, somewhere around
KDE 4.2 - 4.3 times, decoration rendering architecture had been changed
to what we have now.

I've mentioned the previous decoration rendering design because it didn't
have a problem that the new design has, namely the texture bleeding issue.

In the name of better performance, opengl scene puts all decoration parts
to an atlas. This is totally reasonable, however we must be super cautious
about things such as the GL_LINEAR filter.

The GL_LINEAR filter may need to sample a couple of neighboring texels
in order to produce the final texel value. However, since all decoration
parts now live in a single texture, we have to make sure that we don't
sample texels that belong to another decoration part.

This patch fixes the texture bleeding problem by padding each individual
decoration part in the atlas. There is another solution for this problem
though. We could render a window into an offscreen texture and then map
that texture on the transformed window geometry. This would work well and
we definitely need an offscreen rendering path in the opengl scene,
however it's not feasible at the moment since we need to break the window
quads API. Also, it would be great to have as less as possible stuff going
on between invocation of Scene::Window::performPaint() and getting the
corresponding pixel data on the screen.

There is a good chance that the new padding stuff may make you vomit. If
it does so, I'm all ears for the suggestions how to make the code more
nicer.

BUG: 257566
BUG: 360549
CCBUG: 412573
FIXED-IN: 5.18.0

Reviewers: #kwin

Subscribers: fredrik, kwin, fvogt

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25611
2020-01-09 15:13:07 +02:00
David Edmundson
d1cfcf4c97 Avoid texture bleed rendering X11 window
Summary:
We currently see a gap on transformed windows between the window and the
top decoration.

This is partly the atlas bleed on the decoration, and partly a bleed on
the window content itself.

On X11, the window we composite is the frame window - which is a larger
texture containing a transparent border where the frame normally would
be. When we sample with a linear filter we include these texels. Hence
GL_CLAMP_TO_EDGE doesn't work.

Vlad's patch to composite the correct window, not the frame was my
preferred approach, but we had to revert it as it caused an issue with
xwayland :(

Half pixel correction nearly worked, but caused blurry fonts.

This patch resolves it in the fragment shader used by effects doing
transforms. We pass the real texture geometry of the window to the
client with a half pixel correction. Any samples outside the outer half
pixel are then clamped within bounds.

Arguably a hack, but solves the problem in a comparatively
non-invasive way.

BUG: 360549
BUG: 257566

Test Plan:
X11:
Using Vlad's atlas padding for decoration
Slowed animations, wobbled a dark window over a light background
No artifacts

Wayland:
This isn't needed. Now tested that everything still renders the same.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, jgrulich, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25737
2020-01-09 13:03:48 +00:00
l10n daemon script
0b1e9cfb2c 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"
2020-01-09 05:53:26 +01:00
Vlad Zahorodnii
976730a4fd Use geometry conversion helpers from AbstractClient in InternalClient
Summary:
mapFromClient and mapToClient are equivalent to clientRectToFrameRect and
frameRectToClientRect, respectively.

Test Plan: Compiles.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26508
2020-01-08 13:12:31 +02:00
Roman Gilg
2632e4182c [platforms/drm] Allow running without outputs
Summary:
Set outputs enablement also when none outputs are present. This patch is
similar to earlier attempt at D17985.

BUG: 402827
BUG: 389551
BUG: 398680
BUG: 413758

Test Plan:
Starting without outputs, manual disconnects and DPMS changes. There is still
an issue when an output gets disconnected while the DPMS is off. But it's an
improvement already.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T10016

Differential Revision: https://phabricator.kde.org/D26511
2020-01-08 10:12:39 +01:00
Sefa Eyeoglu
ee5f63c070 [effects/slidingpopups] Tweak effect to make animation smoother and more consistent
Summary:
- Easing function for slide-in changed to InQuad
- Easing function for slide-out changed to OutQuad
- Opacity is now interpolated, too.

Reviewers: #vdg, zzag, #kwin, sefaeyeoglu, ndavis, davidedmundson

Reviewed By: #vdg, zzag, #kwin, sefaeyeoglu, ndavis, davidedmundson

Subscribers: niccolove, ngraham, abetts, davidedmundson, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18000
2020-01-07 09:39:32 -07:00
Vlad Zahorodnii
e728460ac6 [nightcolor] Use a dedicated class for detection of system clock changes
Summary:
The ClockSkewNotifier provides a convenient way for monitoring system
clock changes. One of the key ideas was to hide platform details from
users of the class. This allows us to add a QTimer fallback path for
operating systems that don't provide anything to detect system clock
changes.

In long term, I would like to move the new class to Frameworks.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25962
2020-01-07 17:12:14 +02:00
Vlad Zahorodnii
33f46f6d6c [nightcolor] Expose some properties to d-bus
Summary:
Currently, in order to retrieve the current screen color temperature
applied to all screen as well other attributes of night color manager,
one has to call nightColorInfo() periodically. This goes against well
established patterns in d-bus world. It is recommended to expose a
bunch of d-bus properties rather than have a method that returns all
relevant properties stored in a JSON object.

The ugliest thing about this patch is that a lot of code is duplicated
to emit the PropertiesChanged signal. Unfortunately, QtDBus doesn't
take care of this and we are left with only two options - either do
weird things with QMetaObject or manually emit the signal. I have
picked the second option since it's more comprehensible and less magic
is going on, but I have to admit that the chosen approach is ugly.

I hope that "Qt 6 will fix it."

CCBUG: 400418

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25946
2020-01-07 17:12:14 +02:00
Vlad Zahorodnii
5bec89ac90 [nightcolor] Introduce inhibition API
Summary:
The new API allows to block Night Color temporarily. This can be useful
for applications such as video games and plasma applets.

CCBUG: 400418

Test Plan: Called inhibit() and uninhibit() from D-Feet.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25786
2020-01-07 17:12:14 +02:00
Vlad Zahorodnii
216c005e28 Merge branch 'Plasma/5.17' 2020-01-07 15:32:13 +02:00
Vlad Zahorodnii
5646c781c8 [nightcolor] Fix division by zero
Summary:
If qAbs(targetTemp - m_currentTemp) is less than TEMPERATURE_STEP, then
it will result in a division by zero.

FIXED-IN: 5.17.5
BUG: 415359

Reviewers: #kwin, apol

Reviewed By: apol

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26493
2020-01-07 15:30:53 +02:00
David Edmundson
89024e2bcc Clamp XdgShellClient::clientSize to surface size, not m_windowGeometry
Summary:
It's perfectly legitimate to call setWindowSize before a buffer is
attached. This seems to have happen with plasma surfaces that commit
when attaching a shadow, but technically could happen anywhere.

By clamping to the applied surface here, we get the wrong window size
cached and not re-evaluated when a surface is eventually applied. This
leaves us thinking the windowsize is empty but with a massive margin
which actually holds the content.

We want all internal usages of xdgshellclient to use the window geometry
set. Only the wider kwin part needs to care about clamping it to the
surface.

This fixes popup placement in the plasma panel
BUG: 415317

As well as ghost notification popups with no background contrast that
you can't interact with.

Test Plan: Ran kwin

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26233
2020-01-06 15:10:50 +00:00
l10n daemon script
ab85638946 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"
2020-01-04 06:12:32 +01:00
Roman Gilg
af3fbf343b Remove buffer flip pending assert for now
The assert is still not always true.

BUG: 415750
2019-12-31 20:34:02 +01:00
Laurent Montel
d3cbacd451 convert endl to \n (in qt5.15 it's Qt:: namespaced) 2019-12-31 07:44:21 +01:00
Roman Gilg
514a95f1e4 Set Qt::KeypadModifier depending on current keysym
Summary:
The Qt::KeypadModifier should only accompany a keysym when this specific keysym
originates from the keypad not in general for every keysym while numlock is
engaged.

BUG: 400658
FIXED-IN: 5.18.0

Test Plan: Manually with the Thumbnail Grid task switcher and numlock enabled.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26283
2019-12-30 14:41:26 +01:00
Roman Gilg
1e3128b0db Flexible composite swap and timer events
Summary:
The GLX backend might need a combination of swap and composite timer events for
continous painting.

The reason for that is that if the buffer age extension is not available we
fall back to copies in case not the whole screen is repainted.

The timer logic is adapted to make this possible in a lean way what cleans up
the Compositor class in several ways.

Test Plan: Tested on X11 (with/without swap events, buffer age enabled)  and Wayland.

Reviewers: #kwin

Subscribers: hurikhan77, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26216
2019-12-30 14:29:46 +01:00
Méven Car
2bb4acf760 KCM/Effects: convert a couple C-style cast
Summary: Followup after D26040

Reviewers: ervin, zzag, davidedmundson

Reviewed By: davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26286
2019-12-30 11:32:30 +01:00
Laurent Montel
9b41e93540 Don't use nullptr as default flags 2019-12-30 06:54:08 +01:00
Yuri Chornoivan
054cfc1c8a Fix trivial Doxygen warning 2019-12-25 11:37:17 +02:00
Roman Gilg
be01ba0ae7 Fix buffer swap assert
After paint in case we have swap events the buffer swap should be pending.

This is not always the case with the X11 standalone plugin what needs to be
investigated some more. This is for now a quick fix to make sessions work
again without failing on the assert.
2019-12-24 17:43:30 +01:00