Port away from EffectsHandler::screenGeometryChanged() to EffectsHandler::virtualScreenGeometryChanged()

It's confusing to have two signals (virtualScreenGeometryChanged() and
screenGeometryChanged()) that indicate the same thing.

This change ports parts of kwin from the screenGeometryChanged() signal
to the virtualScreenGeometryChanged() signal with the main motivation to
drop the former.

The virtualScreenGeometryChanged() signal was chosen as the replacement
for the consistency sake with EffectsHandler's virtualScreenGeometry and
virtualScreenSize properties.
remotes/origin/work/temp_davepolish
Vlad Zahorodnii 5 years ago
parent 894ed68ff4
commit ff87b33a8a
  1. 2
      src/composite.cpp
  2. 2
      src/effects/backgroundcontrast/contrast.cpp
  3. 2
      src/effects/blur/blur.cpp
  4. 10
      src/plugins/platforms/x11/standalone/effects_x11.cpp

@ -336,7 +336,7 @@ void Compositor::startupWithWorkspace()
// Sets also the 'effects' pointer.
kwinApp()->platform()->createEffectsHandler(this, m_scene);
connect(Workspace::self(), &Workspace::deletedRemoved, m_scene, &Scene::removeToplevel);
connect(effects, &EffectsHandler::screenGeometryChanged, this, &Compositor::addRepaintFull);
connect(effects, &EffectsHandler::virtualScreenGeometryChanged, this, &Compositor::addRepaintFull);
for (X11Client *c : Workspace::self()->clientList()) {
c->setupCompositing();

@ -42,7 +42,7 @@ ContrastEffect::ContrastEffect()
connect(effects, &EffectsHandler::windowAdded, this, &ContrastEffect::slotWindowAdded);
connect(effects, &EffectsHandler::windowDeleted, this, &ContrastEffect::slotWindowDeleted);
connect(effects, &EffectsHandler::propertyNotify, this, &ContrastEffect::slotPropertyNotify);
connect(effects, &EffectsHandler::screenGeometryChanged, this, &ContrastEffect::slotScreenGeometryChanged);
connect(effects, &EffectsHandler::virtualScreenGeometryChanged, this, &ContrastEffect::slotScreenGeometryChanged);
connect(effects, &EffectsHandler::xcbConnectionChanged, this,
[this] {
if (shader && shader->isValid()) {

@ -52,7 +52,7 @@ BlurEffect::BlurEffect()
connect(effects, &EffectsHandler::windowAdded, this, &BlurEffect::slotWindowAdded);
connect(effects, &EffectsHandler::windowDeleted, this, &BlurEffect::slotWindowDeleted);
connect(effects, &EffectsHandler::propertyNotify, this, &BlurEffect::slotPropertyNotify);
connect(effects, &EffectsHandler::screenGeometryChanged, this, &BlurEffect::slotScreenGeometryChanged);
connect(effects, &EffectsHandler::virtualScreenGeometryChanged, this, &BlurEffect::slotScreenGeometryChanged);
connect(effects, &EffectsHandler::xcbConnectionChanged, this,
[this] {
if (m_shader && m_shader->isValid() && m_renderTargetsValid) {

@ -23,13 +23,11 @@ namespace KWin
EffectsHandlerImplX11::EffectsHandlerImplX11(Compositor *compositor, Scene *scene)
: EffectsHandlerImpl(compositor, scene)
{
connect(this, &EffectsHandlerImpl::screenGeometryChanged, this,
[this] (const QSize &size) {
if (m_mouseInterceptionWindow.isValid()) {
m_mouseInterceptionWindow.setGeometry(QRect(0, 0, size.width(), size.height()));
}
connect(this, &EffectsHandlerImpl::virtualScreenGeometryChanged, this, [this]() {
if (m_mouseInterceptionWindow.isValid()) {
m_mouseInterceptionWindow.setGeometry(virtualScreenGeometry());
}
);
});
}
EffectsHandlerImplX11::~EffectsHandlerImplX11()

Loading…
Cancel
Save