sebas added a comment.

  @davidedmundson Sure.
  
  With this patch
  
  - we detect the case when multiple identical outputs are connected (same hash)
  - each of the duplicate outputs also gets matched against the output name
  
  The problem I'm fixing is that currently (without my patch) the ordering of 
outputs matters, so if an output appears later on, it ends up in a different 
place in the list. This may confuse the current algorithm which relies on the 
ordering of config->connectedOutputs() since it'll match the first and remove 
that -- there's no guarantee that the first match is the right one, however. It 
works in the most likely case, when all outputs are added the same order as in 
the config file, but breaks once I mix up this ordering.
  
  The config file also holds the output's name, and since that's usually the 
connector's name and likely to be unique, it's a good indicator for identifying 
an output.
  
  If you look at the config file in https://bugs.kde.org/show_bug.cgi?id=325277 
(grep for e7d18f), this becomes perhaps a bit clearer.
  
  In the second iteration of this patch, I've tightened up the continue 
condition a bit (and fixed it, I used the wrong json object), so it's less 
likely to skip outputs when the name is empty.
  
  I've added an autotest which sets up a 3x2 video wall and loads the config 
from the bugreport. This test fails without the change in findOutputs() and 
passes with it. I've played a bit around with it, and if I add the output 
programmatically in the same order as the config file has them (alphanumeric) 
it works without my patch, changing the ordering makes the tests fail without, 
and pass with my patch.
  
  tl,dr; I think your patch makes it work in the most likely cases, but may not 
be enough when displays are being added in a different order.

REPOSITORY
  rKSCREEN KScreen

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

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

To: sebas, #plasma
Cc: davidedmundson, graesslin, lbeltrame, plasma-devel, jensreuterberg, abetts, 
sebas
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to