graesslin added inline comments.

INLINE COMMENTS

> x11windowed_backend.cpp:201-205
> +            //generally we don't need to normalise input to the output 
> scale; however because we're getting input
> +            //from a host window that doesn't understand scaling, we need to 
> apply it ourselves so the cursor matches
> +            pointerMotion(QPointF((event->root_x - (*it).xPosition.x() + 
> (*it).internalPosition.x()) / it->scale,
> +                                  (event->root_y - (*it).xPosition.y() + 
> (*it).internalPosition.y()) / it->scale),
>                            event->time);

QPointF supports operator/, so that should be possible to simplify a bit.

> x11windowed_backend.cpp:234-235
>              }
> -            pointerMotion(QPointF(event->root_x - (*it).xPosition.x() + 
> (*it).internalPosition.x(),
> -                                  event->root_y - (*it).xPosition.y() + 
> (*it).internalPosition.y()),
> +            pointerMotion(QPointF((event->root_x - (*it).xPosition.x() + 
> (*it).internalPosition.x()) / it->scale,
> +                                  (event->root_y - (*it).xPosition.y() + 
> (*it).internalPosition.y()) / it->scale),
>                            event->time);

same here

> x11windowed_backend.cpp:370-371
> +
> +    pointerMotion(QPointF((event->root_x - (*it).xPosition.x() + 
> (*it).internalPosition.x()) / it->scale,
> +                            (event->root_y - (*it).xPosition.y() + 
> (*it).internalPosition.y()) / it->scale),
>                    event->time);

and here

> scene_qpainter.cpp:311-313
> +    const QRect target = QRect(toplevel->clientPos(), 
> toplevel->clientSize());
> +    const QRect src = QRect(toplevel->clientPos() + 
> toplevel->clientContentPos(), pixmap->image().size());
> +    painter->drawImage(target, pixmap->image(), src);

I don't understand how the scaling comes in here?

> scene_qpainter.cpp:321
>          }
>          paintSubSurface(painter, toplevel->clientPos(), 
> static_cast<QPainterWindowPixmap*>(pixmap));
>      }

paintSubSurface probably also needs the adjustment

> shell_client.cpp:392
>      markAsMapped();
> -    m_clientSize = fbo->size();
>      doSetGeometry(QRect(geom.topLeft(), m_clientSize));

removing that line will break internal windows such as Alt+Tab, etc. etc on 
SceneOpenGL

REPOSITORY
  rKWIN KWin

BRANCH
  scaling

REVISION DETAIL
  https://phabricator.kde.org/D3159

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: davidedmundson, graesslin, #plasma
Cc: broulik, graesslin, plasma-devel, kwin, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas

Reply via email to