Summary: | from ExtendToRight directly switch to TurnOffEmbeded cause libkscreen error | ||
---|---|---|---|
Product: | [Plasma] KScreen | Reporter: | Leslie Zhai <zhaixiang> |
Component: | kded | Assignee: | Leslie Zhai <zhaixiang> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | simonandric5 |
Priority: | NOR | ||
Version: | git | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
0001-turnoff-embedded-disable-outputs.patch
reproduce-outputs-disabled-issue.patch |
Description
Leslie Zhai
2015-07-27 09:42:26 UTC
Created attachment 93923 [details]
0001-turnoff-embedded-disable-outputs.patch
when press Qt::Key_Display hot key, TurnOffExternal is always able to work, because it sets the position for the primary && enabled output:
```
case Generator::TurnOffExternal: {
qCDebug(KSCREEN_KDED) << "Turn off external screen";
embedded->setPos(QPoint(0,0));
embedded->setEnabled(true);
embedded->setPrimary(true);
const KScreen::ModePtr embeddedMode = bestModeForOutput(embedded);
Q_ASSERT(embeddedMode);
embedded->setCurrentModeId(embeddedMode->id());
```
so I also set the position when TurnOffEmbedded:
```
case Generator::TurnOffEmbedded: {
qCDebug(KSCREEN_KDED) << "Turn off embedded (laptop)";
embedded->setEnabled(false);
embedded->setPrimary(false);
external->setPos(QPoint(0, 0));
external->setEnabled(true);
external->setPrimary(true);
const KScreen::ModePtr extMode = bestModeForOutput(external);
Q_ASSERT(extMode);
external->setCurrentModeId(extMode->id());
return config;
```
it is able to work correctly switch display from ExtendToRight to TurnOffEmbedded directly.
Created attachment 93924 [details]
reproduce-outputs-disabled-issue.patch
If you want to reproduce the issue easily, just patch it, then press Qt::Key_Display hot key, it might be Meta+P in your laptop to experience all outputs are disabled! when just want to TurnOffEmbedded.
|