Kaynağa Gözat

Fix corner case in monitor index calculation

Fix a bug in the comparison function that could result in the wrong
index being assigned to a monitor. Change the logic to more directly map
to the description.
tags/v1.12.90
Pierre Ossman 2 yıl önce
ebeveyn
işleme
72d632673b
1 değiştirilmiş dosya ile 6 ekleme ve 4 silme
  1. 6
    4
      vncviewer/MonitorIndicesParameter.cxx

+ 6
- 4
vncviewer/MonitorIndicesParameter.cxx Dosyayı Görüntüle

@@ -243,12 +243,14 @@ int MonitorIndicesParameter::compare(const void *a, const void *b)
if (monitor1->x < monitor2->x)
return -1;

if (monitor1->x > monitor2->x)
return 1;

if (monitor1->y < monitor2->y)
return -1;

if (monitor1->x == monitor2->x)
if (monitor1->y == monitor2->y)
return 0;
if (monitor1->y > monitor2->y)
return 1;

return 1;
return 0;
}

Loading…
İptal
Kaydet