From 1b31bb23d6f3ab3ee6cbc1e8b5f729f6ea472bb8 Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Tue, 28 Jan 2020 09:42:15 +0100 Subject: [PATCH 1/3] 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" --- effects/sessionquit/package/metadata.desktop | 2 ++ kcmkwin/kwincompositing/kwincompositing.desktop | 1 + 2 files changed, 3 insertions(+) diff --git a/effects/sessionquit/package/metadata.desktop b/effects/sessionquit/package/metadata.desktop index 355c139787..cbed4f8cbb 100644 --- a/effects/sessionquit/package/metadata.desktop +++ b/effects/sessionquit/package/metadata.desktop @@ -11,6 +11,7 @@ Name[gl]=Saída de sesión Name[ia]=Abandona session Name[id]=Sesi Berhenti Name[it]=Chiusura sessione +Name[ko]=세션 종료 Name[lt]=Seanso baigimas Name[nl]=Afsluiten van sessie Name[nn]=Avslutt økt @@ -35,6 +36,7 @@ Comment[fi]=Pidä työpöydän tausta käynnissä aina uloskirjautumisen loppuun Comment[gl]=Manter vivo o fondo de escritorio durante a saída ata o final Comment[id]=Jaga latarbelakang desktop tetap nyala selama logout sampai akhir Comment[it]=Mantieni attivo lo sfondo del desktop durante la chiusura della sessione fino alla fine +Comment[ko]=로그아웃이 끝날 때까지 데스크톱 배경 그림 유지 Comment[lt]=Atsijungiant, išlaikyti darbalaukio foną reaguojantį iki pat galo Comment[nl]=De achtergrond van het bureaublad tot het einde levend houden gedurende afmelden Comment[nn]=Hald skrivebordsbakgrunnen i live heilt til utlogginga er fullført diff --git a/kcmkwin/kwincompositing/kwincompositing.desktop b/kcmkwin/kwincompositing/kwincompositing.desktop index 5c1dcd4246..2ddaf54922 100644 --- a/kcmkwin/kwincompositing/kwincompositing.desktop +++ b/kcmkwin/kwincompositing/kwincompositing.desktop @@ -111,6 +111,7 @@ X-KDE-Keywords[fi]=kwin,window,manager,compositing,effect,3D effects,2D effects, X-KDE-Keywords[fr]=Gestionnaire de fenêtres KWin, kwin,window,manager,compositeur, effet, effets 3D,effets 2D,OpenGL,XRender,paramétrage video,effets graphiques ,effects du bureau X-KDE-Keywords[ia]=kwin,window,manager,compositing,effect,3D effects,2D effects,OpenGL,XRender,video settings,graphical effects,desktop effects X-KDE-Keywords[it]=kwin,finestra,gestore,composizione,effetto,effetti 3D,effetti 2D,OpenGL,XRender,impostazioni video,effetti grafici,effetti del desktop +X-KDE-Keywords[ko]=kwin,window,manager,compositing,effect,3D effects,2D effects,OpenGL,XRender,video settings,graphical effects,desktop effects,3D 효과,2D 효과,비디오 설정,그래픽 설정,그래픽 효과,데스크톱 효과 X-KDE-Keywords[lt]=kwin,langas,langai,tvarkytuvė,tvarkytuve,komponavimas,kompozicionavimas,efektas,efektai,3D efektai,2D efektai,trimačiai efektai,trimaciai efektai,dvimačiai efektai,dvimaciai efektai,OpenGL,XRender,vaizdo nustatymai,vaizdo nuostatos,video nustatymai,video nuostatos,grafiniai efektai,grafikos efektai,darbalaukio efektai,darbastalio efektai X-KDE-Keywords[nl]=kwin,window,manager,beheerder,compositing,effecten,3D-effecten,2D-effecten,OpenGL,XRender,video-instellingen,grafische effecten,bureaubladeffecten X-KDE-Keywords[pt]=kwin,janela,gestor,composição,efeito,efeitos 3D,efeitos 2D,OpenGL,XRender,configuração do vídeo,efeitos gráficos,efeitos do ecrã From 827578577ff90e85773fe5ac57b63197f12a811c Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 27 Jan 2020 15:16:02 +0200 Subject: [PATCH 2/3] [decoration] Implement the size property Summary: See D26937 Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D26939 --- decorations/decoratedclient.cpp | 6 ++++++ decorations/decoratedclient.h | 1 + .../declarative-plugin/previewclient.cpp | 10 ++++++++++ .../kwindecoration/declarative-plugin/previewclient.h | 1 + 4 files changed, 18 insertions(+) diff --git a/decorations/decoratedclient.cpp b/decorations/decoratedclient.cpp index 92fe7b5f17..6e150d8043 100644 --- a/decorations/decoratedclient.cpp +++ b/decorations/decoratedclient.cpp @@ -67,6 +67,7 @@ DecoratedClientImpl::DecoratedClientImpl(AbstractClient *client, KDecoration2::D if (oldSize.height() != m_clientSize.height()) { emit decoratedClient->heightChanged(m_clientSize.height()); } + emit decoratedClient->sizeChanged(m_clientSize); } ); connect(client, &AbstractClient::desktopChanged, this, @@ -273,6 +274,11 @@ int DecoratedClientImpl::height() const return m_clientSize.height(); } +QSize DecoratedClientImpl::size() const +{ + return m_clientSize; +} + bool DecoratedClientImpl::isMaximizedVertically() const { return m_client->requestedMaximizeMode() & MaximizeVertical; diff --git a/decorations/decoratedclient.h b/decorations/decoratedclient.h index 735748a6c4..576b62c3c4 100644 --- a/decorations/decoratedclient.h +++ b/decorations/decoratedclient.h @@ -66,6 +66,7 @@ public: QPalette palette() const override; QColor color(KDecoration2::ColorGroup group, KDecoration2::ColorRole role) const override; bool providesContextHelp() const override; + QSize size() const override; int width() const override; WId windowId() const override; diff --git a/kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp b/kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp index 852d326d09..8319ccb9ae 100644 --- a/kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp +++ b/kcmkwin/kwindecoration/declarative-plugin/previewclient.cpp @@ -111,6 +111,11 @@ PreviewClient::PreviewClient(DecoratedClient *c, Decoration *decoration) connect(this, &PreviewClient::bordersLeftEdgeChanged, this, emitEdgesChanged); connect(this, &PreviewClient::bordersRightEdgeChanged, this, emitEdgesChanged); connect(this, &PreviewClient::bordersBottomEdgeChanged, this, emitEdgesChanged); + auto emitSizeChanged = [this, c]() { + emit c->sizeChanged(c->size()); + }; + connect(this, &PreviewClient::widthChanged, this, emitSizeChanged); + connect(this, &PreviewClient::heightChanged, this, emitSizeChanged); qApp->installEventFilter(this); } @@ -133,6 +138,11 @@ int PreviewClient::height() const return m_height; } +QSize PreviewClient::size() const +{ + return QSize(m_width, m_height); +} + QString PreviewClient::caption() const { return m_caption; diff --git a/kcmkwin/kwindecoration/declarative-plugin/previewclient.h b/kcmkwin/kwindecoration/declarative-plugin/previewclient.h index ced66cadef..c37db74854 100644 --- a/kcmkwin/kwindecoration/declarative-plugin/previewclient.h +++ b/kcmkwin/kwindecoration/declarative-plugin/previewclient.h @@ -90,6 +90,7 @@ public: int width() const override; int height() const override; + QSize size() const override; QPalette palette() const override; QColor color(ColorGroup group, ColorRole role) const override; Qt::Edges adjacentScreenEdges() const override; From bd52b6791e8b75690a4bfa9fa89d8dc88fe3c925 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 26 Jan 2020 15:08:52 +0200 Subject: [PATCH 3/3] Schedule a decoration repaint when client is resized Summary: If a client has been resized, it doesn't necessarily mean that the decoration theme will schedule full repaint of the window frame. In OpenGL and Xrender scene, we have a little hack that forces a full repaint of window borders. However, we don't have one in QPainter scene which causes all sorts of weird looking artifacts when resizing a server-side decorated client. We could add yet another hack in the QPainter scene, but a better approach to tackle this problem would be to make DecoratedClient schedule a full repaint of the decoration. It makes code in scene plugins more straightforward and prevents us from repeating the same mistake again. Test Plan: No longer able to see invisible decoration borders when using QPainter render backend. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D26927 --- decorations/decorationrenderer.cpp | 4 ++-- plugins/scenes/opengl/scene_opengl.cpp | 9 ++++----- plugins/scenes/xrender/scene_xrender.cpp | 1 - 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/decorations/decorationrenderer.cpp b/decorations/decorationrenderer.cpp index ef753f27c4..5e28e40b71 100644 --- a/decorations/decorationrenderer.cpp +++ b/decorations/decorationrenderer.cpp @@ -40,12 +40,12 @@ Renderer::Renderer(DecoratedClientImpl *client) , m_imageSizesDirty(true) { auto markImageSizesDirty = [this]{ + schedule(m_client->client()->rect()); m_imageSizesDirty = true; }; connect(client->client(), &AbstractClient::screenScaleChanged, this, markImageSizesDirty); connect(client->decoration(), &KDecoration2::Decoration::bordersChanged, this, markImageSizesDirty); - connect(client->decoratedClient(), &KDecoration2::DecoratedClient::widthChanged, this, markImageSizesDirty); - connect(client->decoratedClient(), &KDecoration2::DecoratedClient::heightChanged, this, markImageSizesDirty); + connect(client->decoratedClient(), &KDecoration2::DecoratedClient::sizeChanged, this, markImageSizesDirty); } Renderer::~Renderer() = default; diff --git a/plugins/scenes/opengl/scene_opengl.cpp b/plugins/scenes/opengl/scene_opengl.cpp index 3b5d2432d0..d15e503174 100644 --- a/plugins/scenes/opengl/scene_opengl.cpp +++ b/plugins/scenes/opengl/scene_opengl.cpp @@ -2562,11 +2562,10 @@ static void clamp(QImage &image, const QRect &viewport) void SceneOpenGLDecorationRenderer::render() { const QRegion scheduled = getScheduled(); - const bool dirty = areImageSizesDirty(); - if (scheduled.isEmpty() && !dirty) { + if (scheduled.isEmpty()) { return; } - if (dirty) { + if (areImageSizesDirty()) { resizeTexture(); resetImageSizesDirty(); } @@ -2579,8 +2578,6 @@ void SceneOpenGLDecorationRenderer::render() QRect left, top, right, bottom; client()->client()->layoutDecorationRects(left, top, right, bottom); - const QRect geometry = dirty ? QRect(QPoint(0, 0), client()->client()->size()) : scheduled.boundingRect(); - // We pad each part in the decoration atlas in order to avoid texture bleeding. const int padding = 1; @@ -2634,6 +2631,8 @@ void SceneOpenGLDecorationRenderer::render() m_texture->update(image, (position + dirtyOffset - viewport.topLeft()) * image.devicePixelRatio()); }; + const QRect geometry = scheduled.boundingRect(); + const QPoint topPosition(padding, padding); const QPoint bottomPosition(padding, topPosition.y() + top.height() + 2 * padding); const QPoint leftPosition(padding, bottomPosition.y() + bottom.height() + 2 * padding); diff --git a/plugins/scenes/xrender/scene_xrender.cpp b/plugins/scenes/xrender/scene_xrender.cpp index 1afeeedcb2..acab174a56 100644 --- a/plugins/scenes/xrender/scene_xrender.cpp +++ b/plugins/scenes/xrender/scene_xrender.cpp @@ -1229,7 +1229,6 @@ void SceneXRenderDecorationRenderer::render() if (areImageSizesDirty()) { resizePixmaps(); resetImageSizesDirty(); - scheduled = client()->client()->decorationRect(); } const QRect top(QPoint(0, 0), m_sizes[int(DecorationPart::Top)]);