scripting: Drop registerWindow() workaround

desktopchangeosd appears to stop updating because kwin fails to deselect
XShape events.
remotes/origin/work/zzag/deleted-minor-cleanups
Vlad Zahorodnii 3 years ago
parent 983a0bc599
commit 4b343698c3
  1. 15
      src/scripting/scripting.cpp
  2. 1
      src/scripting/scripting.h
  3. 4
      src/scripts/desktopchangeosd/contents/ui/osd.qml
  4. 3
      src/unmanaged.cpp

@ -609,21 +609,6 @@ QVariant KWin::JSEngineGlobalMethodsWrapper::readConfig(const QString &key, QVar
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::create(QObject *parent)

@ -298,7 +298,6 @@ public:
public Q_SLOTS:
QVariant readConfig(const QString &key, QVariant defaultValue = QVariant());
void registerWindow(QQuickWindow *window);
private:
DeclarativeScript *m_script;

@ -290,8 +290,4 @@ PlasmaCore.Dialog {
dialogItem.show();
}
}
Component.onCompleted: {
KWin.registerWindow(dialog);
}
}

@ -19,7 +19,6 @@
#include <QDebug>
#include <QTimer>
#include <QWidget>
#include <QWindow>
#include <xcb/shape.h>
@ -149,7 +148,7 @@ void Unmanaged::release(ReleaseReason releaseReason)
}
Deleted *del = Deleted::create(this);
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()) {
xcb_shape_select_input(kwinApp()->x11Connection(), window(), false);
}

Loading…
Cancel
Save