scripting: Drop registerWindow() workaround
desktopchangeosd appears to stop updating because kwin fails to deselect XShape events.
This commit is contained in:
parent
983a0bc599
commit
4b343698c3
4 changed files with 1 additions and 22 deletions
|
@ -609,21 +609,6 @@ QVariant KWin::JSEngineGlobalMethodsWrapper::readConfig(const QString &key, QVar
|
||||||
return m_script->config().readEntry(key, defaultValue);
|
return m_script->config().readEntry(key, defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWin::JSEngineGlobalMethodsWrapper::registerWindow(QQuickWindow *window)
|
|
||||||
{
|
|
||||||
if (kwinApp()->operationMode() == Application::OperationModeX11) {
|
|
||||||
// Windows stop updating if they are remapped. It seems like a bug in QtXCB.
|
|
||||||
QPointer<QQuickWindow> guard = window;
|
|
||||||
connect(
|
|
||||||
window, &QWindow::visibilityChanged, this, [guard](QWindow::Visibility visibility) {
|
|
||||||
if (guard && visibility == QWindow::Hidden) {
|
|
||||||
guard->destroy();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Qt::QueuedConnection);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
KWin::Scripting *KWin::Scripting::s_self = nullptr;
|
KWin::Scripting *KWin::Scripting::s_self = nullptr;
|
||||||
|
|
||||||
KWin::Scripting *KWin::Scripting::create(QObject *parent)
|
KWin::Scripting *KWin::Scripting::create(QObject *parent)
|
||||||
|
|
|
@ -298,7 +298,6 @@ public:
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
QVariant readConfig(const QString &key, QVariant defaultValue = QVariant());
|
QVariant readConfig(const QString &key, QVariant defaultValue = QVariant());
|
||||||
void registerWindow(QQuickWindow *window);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DeclarativeScript *m_script;
|
DeclarativeScript *m_script;
|
||||||
|
|
|
@ -290,8 +290,4 @@ PlasmaCore.Dialog {
|
||||||
dialogItem.show();
|
dialogItem.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
KWin.registerWindow(dialog);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QWidget>
|
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
|
|
||||||
#include <xcb/shape.h>
|
#include <xcb/shape.h>
|
||||||
|
@ -149,7 +148,7 @@ void Unmanaged::release(ReleaseReason releaseReason)
|
||||||
}
|
}
|
||||||
Deleted *del = Deleted::create(this);
|
Deleted *del = Deleted::create(this);
|
||||||
Q_EMIT closed(del);
|
Q_EMIT closed(del);
|
||||||
if (!QWidget::find(window()) && releaseReason != ReleaseReason::Destroyed) { // don't affect our own windows
|
if (releaseReason != ReleaseReason::Destroyed && !findInternalWindow()) { // don't affect our own windows
|
||||||
if (Xcb::Extensions::self()->isShapeAvailable()) {
|
if (Xcb::Extensions::self()->isShapeAvailable()) {
|
||||||
xcb_shape_select_input(kwinApp()->x11Connection(), window(), false);
|
xcb_shape_select_input(kwinApp()->x11Connection(), window(), false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue