Drop resize effect
After recent refactor changes to improve resizing of xdg-toplevel surfaces with an aspect ratio, the resize effect got really broken. The resize effect has always been a problem child on wayland. Unlike X11, geometry updates are performed asynchronously on Wayland. It's not possible to have a smooth transition after finishing interactive resize from the resized state to the normal state, geometry will jump from last moveResizeGeometry() to the current frameGeometry() and when the client repaints the window, the window size will jump back to the move resize geometry size. There are no ways to fix that without contradicting to how the effect is advertised to work, e.g. sending configure events behind the back. Keeping the frame geometry out of sync with the xdg_surface window geometry size is also not the option, geometry updates are already too complex (due to being async). Another wayland related issue with the resize effect is that the compositor doesn't know about aspect ratio or any other size constraints, except min and max size. The client can provide a smaller buffer to account for various geometry constraints. It will be confusing to have a mismatch between resize outline and the final real geometry. Aspect ratio or other geometry constraints won't be exposed to the compositor, it's a common decision of many wayland devs (including KDE). To some extent, the wayland issues can be addressed by performing content updates, with active feedback, the mismatch between outline and the final geometry would become less severe, but it won't be any different than resizing without the effect. Given the wayland issues and in part maintenance costs, this change drops the resize effect. Note that it can be still reimplemented without kwin core changes, but it would still suffer from the aforementioned issues. BUG: 443434
This commit is contained in:
parent
d18e631d47
commit
81f9da17fd
15 changed files with 3 additions and 507 deletions
|
@ -18,7 +18,6 @@
|
|||
#include "decorations/decoratedclient.h"
|
||||
#include "decorations/decorationpalette.h"
|
||||
#include "decorations/decorationbridge.h"
|
||||
#include "effects.h"
|
||||
#include "focuschain.h"
|
||||
#include "outline.h"
|
||||
#include "platform.h"
|
||||
|
@ -991,7 +990,6 @@ bool AbstractClient::startInteractiveMoveResize()
|
|||
}
|
||||
}
|
||||
|
||||
updateHaveResizeEffect();
|
||||
updateInitialMoveResizeGeometry();
|
||||
checkUnrestrictedInteractiveMoveResize();
|
||||
Q_EMIT clientStartUserMovedResized(this);
|
||||
|
@ -1452,9 +1450,7 @@ void AbstractClient::handleInteractiveMoveResize(int x, int y, int x_root, int y
|
|||
if (isInteractiveMove()) {
|
||||
move(moveResizeGeometry().topLeft());
|
||||
} else {
|
||||
if (!haveResizeEffect()) {
|
||||
doInteractiveResizeSync();
|
||||
}
|
||||
doInteractiveResizeSync();
|
||||
}
|
||||
|
||||
Q_EMIT clientStepUserMovedResized(this, moveResizeGeometry());
|
||||
|
@ -2130,13 +2126,6 @@ void AbstractClient::leaveInteractiveMoveResize()
|
|||
}
|
||||
}
|
||||
|
||||
bool AbstractClient::s_haveResizeEffect = false;
|
||||
|
||||
void AbstractClient::updateHaveResizeEffect()
|
||||
{
|
||||
s_haveResizeEffect = effects && static_cast<EffectsHandlerImpl*>(effects)->provides(Effect::Resize);
|
||||
}
|
||||
|
||||
bool AbstractClient::doStartInteractiveMoveResize()
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -1187,14 +1187,6 @@ protected:
|
|||
*/
|
||||
Position mousePosition() const;
|
||||
|
||||
static bool haveResizeEffect() {
|
||||
return s_haveResizeEffect;
|
||||
}
|
||||
static void updateHaveResizeEffect();
|
||||
static void resetHaveResizeEffect() {
|
||||
s_haveResizeEffect = false;
|
||||
}
|
||||
|
||||
void setDecoration(QSharedPointer<KDecoration2::Decoration> decoration);
|
||||
void startDecorationDoubleClickTimer();
|
||||
void invalidateDecorationDoubleClickTimer();
|
||||
|
@ -1326,8 +1318,6 @@ private:
|
|||
QKeySequence _shortcut;
|
||||
|
||||
WindowRules m_rules;
|
||||
|
||||
static bool s_haveResizeEffect;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -136,7 +136,6 @@ add_subdirectory(screentransform)
|
|||
add_subdirectory(magiclamp)
|
||||
add_subdirectory(overview)
|
||||
add_subdirectory(presentwindows)
|
||||
add_subdirectory(resize)
|
||||
add_subdirectory(screenedge)
|
||||
add_subdirectory(showfps)
|
||||
add_subdirectory(showpaint)
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
#######################################
|
||||
# Effect
|
||||
|
||||
set(resize_SOURCES
|
||||
main.cpp
|
||||
resize.cpp
|
||||
)
|
||||
|
||||
kconfig_add_kcfg_files(resize_SOURCES
|
||||
resizeconfig.kcfgc
|
||||
)
|
||||
|
||||
kwin4_add_effect_module(kwin4_effect_resize ${resize_SOURCES})
|
||||
|
||||
#######################################
|
||||
# Config
|
||||
set(kwin_resize_config_SRCS resize_config.cpp)
|
||||
ki18n_wrap_ui(kwin_resize_config_SRCS resize_config.ui)
|
||||
kconfig_add_kcfg_files(kwin_resize_config_SRCS resizeconfig.kcfgc)
|
||||
|
||||
kwin_add_effect_config(kwin_resize_config ${kwin_resize_config_SRCS})
|
||||
|
||||
target_link_libraries(kwin_resize_config
|
||||
KF5::ConfigWidgets
|
||||
KF5::I18n
|
||||
Qt::DBus
|
||||
KWinEffectsInterface
|
||||
)
|
|
@ -1,17 +0,0 @@
|
|||
/*
|
||||
SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include "resize.h"
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
KWIN_EFFECT_FACTORY(ResizeEffect,
|
||||
"metadata.json.stripped")
|
||||
|
||||
} // namespace KWin
|
||||
|
||||
#include "main.moc"
|
|
@ -1,56 +0,0 @@
|
|||
{
|
||||
"KPlugin": {
|
||||
"Category": "Window Management",
|
||||
"Description": "Resizes windows with a fast texture scale instead of updating contents",
|
||||
"Description[ar]": "يغيّر حجم النوافذ بتحجيم نقش سريع بدلًا من تحديث المحتويات",
|
||||
"Description[az]": "Pəncərənin ölçüsünü tərkiblərini yeniləmək əvəzinə teksturasını miqyaslamaqla dəyişir",
|
||||
"Description[ca@valencia]": "Redimensiona les finestres amb un escalat de textura ràpid en lloc d'actualitzar els continguts",
|
||||
"Description[ca]": "Redimensiona les finestres amb un escalat de textura ràpid en lloc d'actualitzar els continguts",
|
||||
"Description[cs]": "Změní velikost okna s využitím rychlého škálování textury místo aktualizace obsahu",
|
||||
"Description[en_GB]": "Resizes windows with a fast texture scale instead of updating contents",
|
||||
"Description[es]": "Cambia el tamaño de las ventanas con un escalado de textura rápido en lugar de actualizar su contenido",
|
||||
"Description[fi]": "Muuttaa ikkunoiden kokoa nopealla pintakuvioskaalauksella sisällön päivittämisen sijaan",
|
||||
"Description[fr]": "Redimensionne les fenêtres à l'aide d'une échelle texturée rapide au lieu de mettre à jour les contenus",
|
||||
"Description[hu]": "Gyors textúraskálázással méretezi át az ablakokat a tartalom frissítése helyett",
|
||||
"Description[ia]": "Redimensiona fenestras con un rapide scala de textura in vice de actualisar contentos",
|
||||
"Description[it]": "Ridimensiona le finestra con una scalatura rapida della trama invece di aggiornarne i contenuti",
|
||||
"Description[ko]": "내용을 갱신하는 대신 빠른 텍스처 스케일링으로 창 크기 조절하기",
|
||||
"Description[nl]": "Wijzigt vensterafmetingen met een snelle textuurschaling in plaats van het bijwerken van de inhoud",
|
||||
"Description[pl]": "Zmienia rozmiar okna metodą szybkiego skalowania tekstur zamiast uaktualniania zawartości",
|
||||
"Description[pt_BR]": "Redimensiona as janelas com uma escala rápida com textura em vez de atualizar o conteúdo",
|
||||
"Description[sl]": "Spremeni velikost oken s hitro teksturo, namesto da posodobil vsebine",
|
||||
"Description[sv]": "Ändrar storlek på fönster med en snabb strukturskalning istället för att uppdatera innehållet.",
|
||||
"Description[uk]": "Зміна розмірів вікон швидким масштабуванням текстур замість оновлення вмісту вікон",
|
||||
"Description[vi]": "Đổi cỡ cửa sổ với một sự đổi cỡ nhanh ở bề mặt, thay vì cập nhật nội dung",
|
||||
"Description[x-test]": "xxResizes windows with a fast texture scale instead of updating contentsxx",
|
||||
"Description[zh_CN]": "调整窗口时显示简易材质,不实时更新窗口内容",
|
||||
"EnabledByDefault": false,
|
||||
"Id": "resize",
|
||||
"License": "GPL",
|
||||
"Name": "Resize Window",
|
||||
"Name[ar]": "غير حجم النافذة",
|
||||
"Name[az]": "Pəncərənin Ölçüsünü Dəyişmək",
|
||||
"Name[ca@valencia]": "Redimensionament de les finestres",
|
||||
"Name[ca]": "Redimensionament de les finestres",
|
||||
"Name[cs]": "Změnit velikost okna",
|
||||
"Name[en_GB]": "Resize Window",
|
||||
"Name[es]": "Cambiar tamaño de la ventana",
|
||||
"Name[fi]": "Ikkunan koon muuttaminen",
|
||||
"Name[fr]": "Redimensionner une fenêtre",
|
||||
"Name[hu]": "Ablakátméretezés",
|
||||
"Name[ia]": "Redimensiona fenestra",
|
||||
"Name[it]": "Ridimensiona la finestra",
|
||||
"Name[ko]": "창 크기 조정",
|
||||
"Name[nl]": "Afmeting venster aanpassen",
|
||||
"Name[pl]": "Zmiana rozmiaru okien",
|
||||
"Name[pt]": "Dimensionar a Janela",
|
||||
"Name[pt_BR]": "Redimensionar janela",
|
||||
"Name[sl]": "Spremeni velikost okna",
|
||||
"Name[sv]": "Ändra fönsterstorlek",
|
||||
"Name[uk]": "Зміна розмірів вікон",
|
||||
"Name[vi]": "Đổi cỡ cửa sổ",
|
||||
"Name[x-test]": "xxResize Windowxx",
|
||||
"Name[zh_CN]": "窗口大小简易调整"
|
||||
},
|
||||
"X-KDE-ConfigModule": "kwin_resize_config"
|
||||
}
|
|
@ -1,149 +0,0 @@
|
|||
/*
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
SPDX-FileCopyrightText: 2009 Martin Gräßlin <mgraesslin@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include "resize.h"
|
||||
// KConfigSkeleton
|
||||
#include "resizeconfig.h"
|
||||
|
||||
#include <kwinglutils.h>
|
||||
|
||||
#include <KColorScheme>
|
||||
|
||||
#include <QVector2D>
|
||||
#include <QPainter>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
ResizeEffect::ResizeEffect()
|
||||
: AnimationEffect()
|
||||
, m_active(false)
|
||||
, m_resizeWindow(nullptr)
|
||||
{
|
||||
initConfig<ResizeConfig>();
|
||||
reconfigure(ReconfigureAll);
|
||||
connect(effects, &EffectsHandler::windowStartUserMovedResized, this, &ResizeEffect::slotWindowStartUserMovedResized);
|
||||
connect(effects, &EffectsHandler::windowStepUserMovedResized, this, &ResizeEffect::slotWindowStepUserMovedResized);
|
||||
connect(effects, &EffectsHandler::windowFinishUserMovedResized, this, &ResizeEffect::slotWindowFinishUserMovedResized);
|
||||
}
|
||||
|
||||
ResizeEffect::~ResizeEffect()
|
||||
{
|
||||
}
|
||||
|
||||
void ResizeEffect::prePaintScreen(ScreenPrePaintData& data, std::chrono::milliseconds presentTime)
|
||||
{
|
||||
if (m_active) {
|
||||
data.mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS;
|
||||
}
|
||||
AnimationEffect::prePaintScreen(data, presentTime);
|
||||
}
|
||||
|
||||
void ResizeEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, std::chrono::milliseconds presentTime)
|
||||
{
|
||||
if (m_active && w == m_resizeWindow)
|
||||
data.mask |= PAINT_WINDOW_TRANSFORMED;
|
||||
AnimationEffect::prePaintWindow(w, data, presentTime);
|
||||
}
|
||||
|
||||
void ResizeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
|
||||
{
|
||||
if (m_active && w == m_resizeWindow) {
|
||||
if (m_features & TextureScale) {
|
||||
data += (m_currentGeometry.topLeft() - m_originalGeometry.topLeft());
|
||||
data *= QVector2D(float(m_currentGeometry.width())/m_originalGeometry.width(),
|
||||
float(m_currentGeometry.height())/m_originalGeometry.height());
|
||||
}
|
||||
effects->paintWindow(w, mask, region, data);
|
||||
|
||||
if (m_features & Outline) {
|
||||
QRegion intersection = m_originalGeometry.intersected(m_currentGeometry);
|
||||
QRegion paintRegion = QRegion(m_originalGeometry).united(m_currentGeometry).subtracted(intersection);
|
||||
float alpha = 0.8f;
|
||||
QColor color = KColorScheme(QPalette::Normal, KColorScheme::Selection).background().color();
|
||||
|
||||
if (effects->isOpenGLCompositing()) {
|
||||
GLVertexBuffer *vbo = GLVertexBuffer::streamingBuffer();
|
||||
vbo->reset();
|
||||
vbo->setUseColor(true);
|
||||
ShaderBinder binder(ShaderTrait::UniformColor);
|
||||
binder.shader()->setUniform(GLShader::ModelViewProjectionMatrix, data.screenProjectionMatrix());
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
color.setAlphaF(alpha);
|
||||
vbo->setColor(color);
|
||||
QVector<float> verts;
|
||||
verts.reserve(paintRegion.rectCount() * 12);
|
||||
for (const QRect &r : paintRegion) {
|
||||
verts << r.x() + r.width() << r.y();
|
||||
verts << r.x() << r.y();
|
||||
verts << r.x() << r.y() + r.height();
|
||||
verts << r.x() << r.y() + r.height();
|
||||
verts << r.x() + r.width() << r.y() + r.height();
|
||||
verts << r.x() + r.width() << r.y();
|
||||
}
|
||||
vbo->setData(verts.count() / 2, 2, verts.data(), nullptr);
|
||||
vbo->render(GL_TRIANGLES);
|
||||
glDisable(GL_BLEND);
|
||||
} else if (effects->compositingType() == QPainterCompositing) {
|
||||
QPainter *painter = effects->scenePainter();
|
||||
painter->save();
|
||||
color.setAlphaF(alpha);
|
||||
for (const QRect &r : paintRegion) {
|
||||
painter->fillRect(r, color);
|
||||
}
|
||||
painter->restore();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
AnimationEffect::paintWindow(w, mask, region, data);
|
||||
}
|
||||
}
|
||||
|
||||
void ResizeEffect::reconfigure(ReconfigureFlags)
|
||||
{
|
||||
m_features = 0;
|
||||
ResizeConfig::self()->read();
|
||||
if (ResizeConfig::textureScale())
|
||||
m_features |= TextureScale;
|
||||
if (ResizeConfig::outline())
|
||||
m_features |= Outline;
|
||||
}
|
||||
|
||||
void ResizeEffect::slotWindowStartUserMovedResized(EffectWindow *w)
|
||||
{
|
||||
if (w->isUserResize() && !w->isUserMove()) {
|
||||
m_active = true;
|
||||
m_resizeWindow = w;
|
||||
m_originalGeometry = w->frameGeometry();
|
||||
m_currentGeometry = w->frameGeometry();
|
||||
w->addRepaintFull();
|
||||
}
|
||||
}
|
||||
|
||||
void ResizeEffect::slotWindowFinishUserMovedResized(EffectWindow *w)
|
||||
{
|
||||
if (m_active && w == m_resizeWindow) {
|
||||
m_active = false;
|
||||
m_resizeWindow = nullptr;
|
||||
if (m_features & TextureScale)
|
||||
animate(w, CrossFadePrevious, 0, 150, FPx2(1.0));
|
||||
effects->addRepaintFull();
|
||||
}
|
||||
}
|
||||
|
||||
void ResizeEffect::slotWindowStepUserMovedResized(EffectWindow *w, const QRect &geometry)
|
||||
{
|
||||
if (m_active && w == m_resizeWindow) {
|
||||
m_currentGeometry = geometry;
|
||||
effects->addRepaintFull();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
|
@ -1,65 +0,0 @@
|
|||
/*
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
SPDX-FileCopyrightText: 2009 Martin Gräßlin <mgraesslin@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef KWIN_RESIZE_H
|
||||
#define KWIN_RESIZE_H
|
||||
|
||||
#include <kwinanimationeffect.h>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
class ResizeEffect
|
||||
: public AnimationEffect
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool textureScale READ isTextureScale)
|
||||
Q_PROPERTY(bool outline READ isOutline)
|
||||
public:
|
||||
ResizeEffect();
|
||||
~ResizeEffect() override;
|
||||
inline bool provides(Effect::Feature ef) override {
|
||||
return ef == Effect::Resize;
|
||||
}
|
||||
inline bool isActive() const override { return m_active || AnimationEffect::isActive(); }
|
||||
void prePaintScreen(ScreenPrePaintData& data, std::chrono::milliseconds presentTime) override;
|
||||
void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, std::chrono::milliseconds presentTime) override;
|
||||
void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data) override;
|
||||
void reconfigure(ReconfigureFlags) override;
|
||||
|
||||
int requestedEffectChainPosition() const override {
|
||||
return 60;
|
||||
}
|
||||
|
||||
bool isTextureScale() const {
|
||||
return m_features & TextureScale;
|
||||
}
|
||||
bool isOutline() const {
|
||||
return m_features & Outline;
|
||||
}
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotWindowStartUserMovedResized(KWin::EffectWindow *w);
|
||||
void slotWindowStepUserMovedResized(KWin::EffectWindow *w, const QRect &geometry);
|
||||
void slotWindowFinishUserMovedResized(KWin::EffectWindow *w);
|
||||
|
||||
private:
|
||||
enum Feature {
|
||||
TextureScale = 1 << 0,
|
||||
Outline = 1 << 1,
|
||||
};
|
||||
bool m_active;
|
||||
int m_features;
|
||||
EffectWindow* m_resizeWindow;
|
||||
QRect m_currentGeometry, m_originalGeometry;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
|
||||
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
|
||||
<kcfgfile arg="true"/>
|
||||
<group name="Effect-Resize">
|
||||
<entry name="TextureScale" type="Bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="Outline" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
</group>
|
||||
</kcfg>
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
SPDX-FileCopyrightText: 2010 Martin Gräßlin <mgraesslin@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
#include "resize_config.h"
|
||||
// KConfigSkeleton
|
||||
#include "resizeconfig.h"
|
||||
#include <config-kwin.h>
|
||||
#include <kwineffects_interface.h>
|
||||
|
||||
#include <kconfiggroup.h>
|
||||
#include <KAboutData>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
|
||||
K_PLUGIN_CLASS(KWin::ResizeEffectConfig)
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
ResizeEffectConfigForm::ResizeEffectConfigForm(QWidget* parent) : QWidget(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
}
|
||||
|
||||
ResizeEffectConfig::ResizeEffectConfig(QWidget* parent, const QVariantList& args) :
|
||||
KCModule(parent, args)
|
||||
{
|
||||
m_ui = new ResizeEffectConfigForm(this);
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
|
||||
layout->addWidget(m_ui);
|
||||
|
||||
ResizeConfig::instance(KWIN_CONFIG);
|
||||
addConfig(ResizeConfig::self(), m_ui);
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
void ResizeEffectConfig::save()
|
||||
{
|
||||
KCModule::save();
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(QStringLiteral("resize"));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
#include "resize_config.moc"
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
SPDX-FileCopyrightText: 2010 Martin Gräßlin <mgraesslin@kde.org>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#ifndef KWIN_RESIZE_CONFIG_H
|
||||
#define KWIN_RESIZE_CONFIG_H
|
||||
|
||||
#include <kcmodule.h>
|
||||
|
||||
#include "ui_resize_config.h"
|
||||
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
class ResizeEffectConfigForm : public QWidget, public Ui::ResizeEffectConfigForm
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ResizeEffectConfigForm(QWidget* parent = nullptr);
|
||||
};
|
||||
|
||||
class ResizeEffectConfig : public KCModule
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ResizeEffectConfig(QWidget* parent = nullptr, const QVariantList& args = QVariantList());
|
||||
|
||||
public Q_SLOTS:
|
||||
void save() override;
|
||||
|
||||
private:
|
||||
ResizeEffectConfigForm* m_ui;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
|
@ -1,45 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>KWin::ResizeEffectConfigForm</class>
|
||||
<widget class="QWidget" name="KWin::ResizeEffectConfigForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="kcfg_TextureScale">
|
||||
<property name="text">
|
||||
<string>Scale window</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="kcfg_Outline">
|
||||
<property name="text">
|
||||
<string>Show outline</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1,5 +0,0 @@
|
|||
File=resize.kcfg
|
||||
ClassName=ResizeConfig
|
||||
NameSpace=KWin
|
||||
Singleton=true
|
||||
Mutators=true
|
|
@ -329,7 +329,7 @@ public:
|
|||
|
||||
enum Feature {
|
||||
Nothing = 0,
|
||||
Resize,
|
||||
Resize, /**< @deprecated */
|
||||
GeometryTip, /**< @deprecated */
|
||||
Outline, /**< @deprecated */
|
||||
ScreenInversion,
|
||||
|
|
|
@ -1404,8 +1404,6 @@ void X11Client::finishCompositing(ReleaseReason releaseReason)
|
|||
{
|
||||
Toplevel::finishCompositing(releaseReason);
|
||||
updateVisibility();
|
||||
// for safety in case KWin is just resizing the window
|
||||
resetHaveResizeEffect();
|
||||
// If compositing is off, render the decoration in the X11 frame window.
|
||||
maybeCreateX11DecorationRenderer();
|
||||
}
|
||||
|
@ -2780,7 +2778,7 @@ void X11Client::handleSync()
|
|||
|
||||
void X11Client::performInteractiveResize()
|
||||
{
|
||||
if (isInteractiveResize() && !haveResizeEffect()) {
|
||||
if (isInteractiveResize()) {
|
||||
resize(moveResizeGeometry().size());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue