Summary:
using the same trick as elsewhere, set the currentIndex
and move the view to currentIndex right at startup
the only way to be sure is onContentHeightChanged
as there are no signals for when "the view has been
populated and settled up"
Test Plan:
the view is at the right state since the first frame shown,
no more jumping around effect
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4703
Summary:
So far KWin put a version requirement on Breeze which is the current
version number of KWin. This is technically correct, but distributions
seem to have problems with it. E.g. I noticed twice in Debian testing
that kwin defaults to Plastik which happens when Breeze is not found.
I reported it, it got fixed, now it's again broken.
Thus I think that distributions have problems with the requirement of
building Breeze prior to KWin. As KWin does not depend on the minor
version, let's depend only on the actual required version, which is
5.8 in the 5.8 branch, 5.9 in the 5.9 branch and master.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4644
Summary:
As described in https://bugreports.qt.io/browse/QTBUG-57714 exposing a
QWidget as a context item to QtQuick can crash. Especially as the
engine's context property gets deleted whilst deleting the parent item.
This patch reworks the code so that the models are exposed to QML
directly rather than going through a QWidget.
CCBUG: 373628
Test Plan:
Pressing back whilst in the decoration KCM used to crash every time, now it doesn't.
I still have the buttons.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: graesslin, cfeck, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4533
Summary:
So far we didn't trigger modifier-only-shortcuts when capslock was
enabled. In fact we even ensured that the shortcuts did not trigger.
This seems not to be what our users expect. Meta should still trigger
if capslock is on.
This change modifies the logic to determine which modifier is currently
pressed by using the modifiersRelevantForGlobalShortcuts. The difference
to the "normal" modifiers is that this excludes capslock from modifiers
and excludes consumed modifiers. The latter is not really relevant as
modifier-only-shortcuts do not trigger if multiple keys are pressed,
which is required to have a modifier consumed.
BUG: 375355
FIXED-IN: 5.8.6
Test Plan: Only with adjusted autotest
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4241
Summary:
Xkbcommon does not localize the layout names. We always get the US
English variant. KWin so far passed the strings from xkbcommon directly
to UI visible parts such as the Plasma OSD. This results in not
translated elements in our UI.
As I figured out today the translations exist in the domain
xkeyboard-config. Passing the strings from xkbcommon through this domain
gives us translated layouts.
Unfortunately the xkeyboard-config is not installed by default on all
distributions. E.g. on ubuntu/neon one needs to install xkb-data-i18n
to have the translations available.
Test Plan: Untested as I fail to start Plasma/5.8 KWin on my dev system
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4243
This extends the testCapsLock to ensure that modifier only shortcut
trigger when capslock is enabled. So far the test only ensured that
capslock doesn't trigger the shift modifier only shortcut.
As the test shows currently when capslock is on, the meta key doesn't
trigger any more.
CCBUG: 375355
Typically after deselecting "Show caps" option, the associated options "Cap color" and "Display image on caps" are grayed out (triggered by signal). The bug was when Desktop Cube settings were closed and opened again then the options were not grayed out.
Succesfully compiled and tested by deselecting "Show caps" option in Desktop Cube settings, closing the settings window and opening it once again. The options "Cap color" and "Display image on caps" were then grayed out.
REVIEW: 129194
In case we need to set the SwitcherItem model in
`TabBoxHandlerPrivate::show()`, remember the current index row,
otherwise it gets reset to the first item.
Reviewers: #kwin, graesslin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4162
BUG: 333511
Summary:
Currently the configure button is aligned to the win decoration in the
background. This is bound to 40 - the inactive decorations shadow.
This means the configure button ends up in different places across each
item,
looking a bit weird and potentially not even on top of the right
delegate.
This patch aligns the configure button relative to the overall delegate
so that it's in the same place on every item
Test Plan: Looked at KCM
Reviewers: #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3526
BUG: 372685
Summary:
The method is supposed to return the AbstractClient's size for a given
client size. That is the size including the window decoration.
The default implementation returned the passed in client size without
adjusting for the decoration. This resulted in ShellClient getting a
wrong size especially when AbstractClient::adjustedClientSize (which
calls sizeForClientSize) was called.
The result of the incorrect size was for example a shrinking of the
window when starting to resize a window.
BUG: 370345
FIXED-IN: 5.8.4
Reviewers: #kwin, #plasma_on_wayland, broulik, subdiff
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3414
Summary:
When windows get added some effects grab the window and want to be the
only one animating this window. For this the grab roles exists. An
effect being notified later on evaluates the grab state and does not
start the animation.
This process failed due to being dependent on the order the effects are
loaded. Window Added/Closed are signals emitted by EffectsHandler, thus
first come, first serve. The requested effect order does not play into
it.
Due to that it could happen that an Effect which should not animate,
started to animate as the grab was still there.
This change adds the possibility to be notified whenever the window data
changes. A new signal is added to EffectsHandler which is emitted
whenever the windowData changes. The interested effects connect to it
and cancel their (just started) animation for the window.
Adjusted effects are:
* ScaleIn
* Fade
* WobblyWindows
In case of WobblyWindows an additional logical error was fixed that the
animations were only run when an effect grabbed instead of the other way
around.
BUG: 336866
FIXED-IN: 5.8.4
Reviewers: #kwin, #plasma, broulik
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3211
Summary:
The QStyle might interact with our internal Wayland connection. If the
cleanup happens after destroying our internal Wayland connection KWin
will crash at tear-down.
With this change the QStyle can perform cleanup already prior to the
deconstruction of the Wayland connection.
CCBUG: 372001
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3241
Summary:
The killer can only kill X11 windows. It is also only invoked for Client
and not for ShellClient. The tool interacts with QX11Info which means it
would crash if tried to use on Wayland.
Thus force platform xcb on the tool.
Test Plan: Killer shows for Xwayland windows.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3228
Summary:
So far KWin used the window title provided from the window directly
without any sanitizing. This could result in broken window decorations
if the title included line breaks. Those were passed to the decoration
and depending on the way how the decoration renders the title, it could
result in visual breakage.
Having line breaks in a window title doesn't make sense. Given that KWin
now simplifies the title when copying it to it's own structure. This
also ensures that the title passed to e.g. task manager does not have
any line breaks on Wayland.
BUG: 323798
FIXED-IN: 5.8.4
Test Plan: Opened the web page in a nested KWin, properly rendered now.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3215
Summary:
Desktop Grid has a feature that right or middle clicking a window toggles
the on all desktop state. If that is done for a desktop window, things
obviously start to fail.
KWin internally allows to change virtual desktop for all windows, even
for windows like the desktop or docks. Changing in KWin core is not a
solution.
Thus a special casing in desktop grid is added to disallow the selection
for desktop windows.
BUG: 372037
FIXED-IN: 5.8.4
Test Plan: Tried right clicking desktop window and other windows.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3253
Summary:
For whatever reason Qt scrolled the wrong way on internal windows. As a
new QWheelEvent is constructed anyway, just multiply by -1 to get the
direction fixed.
BUG: 371999
FIXED-IN: 5.8.4
Test Plan: Tried debug console in nested setup, scrolled correctly now.
Reviewers: #kwin, #plasma_on_wayland, broulik
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3247
Summary:
This change ensures that the DebugConsole does not have a minimize
button.
BUG: 372000
FIXED-IN: 5.8.4
Reviewers: #kwin, #plasma_on_wayland, broulik
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3244
Summary:
When moving windows we don't want to snap against not visible windows
like auto-hidden panels.
BUG: 365892
FIXED-IN: 5.8.4
Test Plan: So far only auto-test, manual test will follow.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3225
The export of the WorkspaceWrapper was changed to be a subclass with all
the elements still being in the parent class. But the "workspace" was
exported with QScriptEngine::ExcludeSuperClassContents. Thus all usages
of workspace were broken and our tests started to fail on build.kde.org.
This change removes the ExcludeSuperClassContents which means that also
the QObject properties and slots are now exposed which was previously
not the case.
CCMAIL: github@chilon.net
Summary:
The version provided is only compatible with QtScript so it became
necessary to split WorkspaceWrapper into a base class and two child
classes, one for QtScript and one for QmlScript.
BUG: 340125
FIXED-IN: 5.8.4
REVIEW: D3185
Summary:
QSpinBox can't handle plural suffixes. Something previously done by
KIntSpinBox.
Using setSuffix(ki18np("pixel", "pixels")).toString() does nothing, as
at the time of conversion we don't know which one to use.
This patch uses KPluralHandlingSpinBox and correct ki18np.
Note, "new" dependency was already linked implicitly in other kwin, but
we need to add it for this KCM.
Test Plan:
Opened KCM (in English) set counter to 1 pixel and 2 pixels.
No longer had a big warning. Also appropriate number of s's appeared.
Reviewers: #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3222
The test illustrates that special characters like a line break are not
removed from the window caption, which results in a line break added in
the window decoration.
Test case uses a title from a web page triggering it in Firefox.
CCBUG: 323798
Summary:
When triggering a move resize all following pointer events are grabbed
by KWin itself. Thus the correct behavior is to informe the client about
it and send a pointer leave.
This ensures that after the move resize ended the pointer gets a new
enter. By sending anew pointer enter the position gets updated to the
new position which so far did not happen and the client generated events
on the wrong position.
BUG: 371573
FIXED-IN: 5.8.3
Reviewers: #kwin, #plasma_on_wayland, broulik
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3154
The first test case was sometimes failing due to the time value in the
first render pass being too high. So that the effect ended directly for
the window.
This change adds a small waiting time for the compositor to render prior
to the creation of the window. Ideally we would connect to frameRendered
signal, but the OpenGL compositor doesn't emit it yet.
Test more combinations of other effects together with sliding popups.
The problem does not only exist for scale in but for pretty much any
effect that the ordering in which the effects get loaded makes the test
pass or fail.
Some effects require OpenGL, as build.kde.org does not support OpenGL
compositing (yet), the tests only do the OpenGL cases if an OpenGL
compositor could be created.
CCBUG: 336866
The test case loads the sliding popups effect and the scale in effect
which also operates on added windows. As the test case shows depending
on the sequence how the effects are loaded, the window gets animated by
both effects (wrong) oor only sliding popups.
CCBUG: 336866
Summary:
registerShortcut is available to javascript KWin scripts but was not
available to those written in declarative script.
BUG: 340225
FIXED-IN: 5.8.4
REVIEW: 129250
Summary:
It can happen that startAnimation is invoked multiple times for a
window. In case it was invoked a second time the previous animation was
not cancelled. This resulted in the set-animation to never end. When
closing a window, it would stay around as a translucent, non-interactive
window zombie.
This change ensures that existing animations get cancelled.
BUG: 342716
FIXED-IN: 5.8.3
Test Plan: Tested through autotest and manually.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3190
Summary:
When the decoration size changes the textures get recreated and need to
be properly filled. So far KWin used the scheduled repaint geometry in
this situation. If the decoration didn't schedule the complete geometry
for repain there will be an empty area in the decoration texture.
This change ensures that the complete texture gets repainted when they
are recreated. Thus the decoration rendering is more fault tolerant
towards potential bugs in the decoration. With no-compositing and XRender
compositing this problem was not reproducable and already fault tolerant,
so OpenGL just catches up with the other modes.
BUG: 371735
FIXED-IN: 5.8.3
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3186