Changeset View
Changeset View
Standalone View
Standalone View
wayland_server.cpp
Show First 20 Lines • Show All 346 Lines • ▼ Show 20 Line(s) | |||||
347 | } | 347 | } | ||
348 | 348 | | |||
349 | void WaylandServer::syncOutputsToWayland() | 349 | void WaylandServer::syncOutputsToWayland() | ||
350 | { | 350 | { | ||
351 | Screens *s = screens(); | 351 | Screens *s = screens(); | ||
352 | Q_ASSERT(s); | 352 | Q_ASSERT(s); | ||
353 | for (int i = 0; i < s->count(); ++i) { | 353 | for (int i = 0; i < s->count(); ++i) { | ||
354 | OutputInterface *output = m_display->createOutput(m_display); | 354 | OutputInterface *output = m_display->createOutput(m_display); | ||
355 | output->setScale(s->scale(i)); | ||||
graesslin: At the moment KWin doesn't scale yet. I think we should not start to export scale to Wayland as… | |||||
I started doing the relevant surface scaling, but that's quite a bit more complex than it might first appear (and the Qt QPA needs multiple patches...) so I need to split this into multiple smaller parts. Personally, I think setting this now is fine because I haven't implemented anything in the DRM backend, so this is only going to affect kwin when this config option is explicitly set. davidedmundson: I started doing the relevant surface scaling, but that's quite a bit more complex than it might… | |||||
355 | const QRect &geo = s->geometry(i); | 356 | const QRect &geo = s->geometry(i); | ||
356 | output->setGlobalPosition(geo.topLeft()); | 357 | output->setGlobalPosition(geo.topLeft()); | ||
357 | output->setPhysicalSize(geo.size() / 3.8); | 358 | output->setPhysicalSize(geo.size() / 3.8); | ||
358 | output->addMode(geo.size()); | 359 | output->addMode(geo.size()); | ||
359 | output->create(); | 360 | output->create(); | ||
360 | } | 361 | } | ||
361 | } | 362 | } | ||
362 | 363 | | |||
▲ Show 20 Lines • Show All 280 Lines • Show Last 20 Lines |
At the moment KWin doesn't scale yet. I think we should not start to export scale to Wayland as long as we don't support it.
The idea behind the scale in Wayland is that the compositor itself scales up all surfaces which don't provide the correct scale factor. Just mentioning in case you are not aware of it.