瀏覽代碼

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 年之前
父節點
當前提交
72d632673b
共有 1 個文件被更改,包括 6 次插入4 次删除
  1. 6
    4
      vncviewer/MonitorIndicesParameter.cxx

+ 6
- 4
vncviewer/MonitorIndicesParameter.cxx 查看文件

@@ -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…
取消
儲存