Changeset View
Changeset View
Standalone View
Standalone View
src/output.cpp
Show First 20 Lines • Show All 482 Lines • ▼ Show 20 Line(s) | |||||
483 | { | 483 | { | ||
484 | if (!currentMode()) { | 484 | if (!currentMode()) { | ||
485 | return QRect(); | 485 | return QRect(); | ||
486 | } | 486 | } | ||
487 | 487 | | |||
488 | // We can't use QRect(d->pos, d->size), because d->size does not reflect the | 488 | // We can't use QRect(d->pos, d->size), because d->size does not reflect the | ||
489 | // actual rotation() set by caller, it's only updated when we get update from | 489 | // actual rotation() set by caller, it's only updated when we get update from | ||
490 | // KScreen, but not when user changes mode or rotation manually | 490 | // KScreen, but not when user changes mode or rotation manually | ||
491 | return isHorizontal() | 491 | | ||
492 | ? QRect(d->pos, currentMode()->size()) | 492 | QSize size = currentMode()->size() / d->scale; | ||
493 | : QRect(d->pos, currentMode()->size().transposed()); | 493 | if (!isHorizontal()) { | ||
494 | size = size.transposed(); | ||||
495 | } | ||||
496 | | ||||
497 | return QRect(d->pos, size); | ||||
494 | } | 498 | } | ||
495 | 499 | | |||
496 | void Output::apply(const OutputPtr& other) | 500 | void Output::apply(const OutputPtr& other) | ||
497 | { | 501 | { | ||
498 | typedef void (KScreen::Output::*ChangeSignal)(); | 502 | typedef void (KScreen::Output::*ChangeSignal)(); | ||
499 | QList<ChangeSignal> changes; | 503 | QList<ChangeSignal> changes; | ||
500 | 504 | | |||
501 | // We block all signals, and emit them only after we have set up everything | 505 | // We block all signals, and emit them only after we have set up everything | ||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |