mart added a comment.

  In https://phabricator.kde.org/D3777#71209, @davidedmundson wrote:
  
  > Oh! I think I now see why we have this bug.
  >
  > We get a disconnect then connect, which from Qt5.5 goes:
  >
  > Old Real Screen
  >  Fake Screen
  >  New Real Screen
  >
  > You never get any signals when you're going to or from the fake screen (by 
design), but implicitly that means we miss a real change.
  >
  > Is that the conclusion you had reached from debug?
  
  
  yes, I think what's happening, when the output switches the chain of events is
  QXcbConnection::destroyScreen()
  if (virtualDesktop->screens().count() == 1) {
  
    // If there are no other screens on the same virtual desktop,
    // then transform the physical screen into a fake screen.
  
  then the new output is enabled:
  QXcbConnection::updateScreens()
  ...
  } else if (!screen && output.connection == XCB_RANDR_CONNECTION_CONNECTED) {
  ...
  // Transform the fake screen into a physical screen
  screen->setOutput(output.output, outputInfo.data());
  
  and in this, no primaryScreenChanged, not screenAdded/screenRemoved got 
emitted, because the only qscreen pointer was massaged into being fake, then 
real again, but the instance is always there.

REPOSITORY
  R120 Plasma Workspace

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

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

To: mart, #plasma
Cc: davidedmundson, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas

Reply via email to