[Discuss] overwolf.utils.getMonitorsList returns shuffled result on display reconnect

Issue Description:

When I get the list of monitors using overwolf.utils.getMonitorsList I depend on the displayIds to determine which display to capture.
When I disconnect and reconnect my secondary display, the screens order is shuffled and the ids are regenerated.

Can you reproduce it (exact steps to reproduce):

  1. call overwolf.utils.getMonitorsList
  2. inspect the result
  3. disconnect secondary display
  4. reconnect secondary display
  5. repeat steps 1-2

Result before:

[
   {
      "name":"XG248Q",
      "id":"\\\\.\\DISPLAY2",
      "x":0,
      "y":0,
      "width":1920,
      "height":1080,
      "is_primary":true,
      "handle":{
         "value":65537
      },
      "dpiX":96,
      "dpiY":96,
      "index":0
   },
   {
      "name":"XG248Q",
      "id":"\\\\.\\DISPLAY3",
      "x":1920,
      "y":0,
      "width":1920,
      "height":1080,
      "is_primary":false,
      "handle":{
         "value":65541
      },
      "dpiX":96,
      "dpiY":96,
      "index":1
   },
   {
      "name":"SONY TV",
      "id":"\\\\.\\DISPLAY1",
      "x":3840,
      "y":0,
      "width":1920,
      "height":1080,
      "is_primary":false,
      "handle":{
         "value":65539
      },
      "dpiX":96,
      "dpiY":96,
      "index":2
   }
]

Result After:

[
   {
      "name":"SONY TV",
      "id":"\\\\.\\DISPLAY2",
      "x":0,
      "y":0,
      "width":1920,
      "height":1080,
      "is_primary":true,
      "handle":{
         "value":65537
      },
      "dpiX":96,
      "dpiY":96,
      "index":0
   },
   {
      "name":"XG248Q",
      "id":"\\\\.\\DISPLAY3",
      "x":1920,
      "y":0,
      "width":1920,
      "height":1080,
      "is_primary":false,
      "handle":{
         "value":65541
      },
      "dpiX":96,
      "dpiY":96,
      "index":1
   },
   {
      "name":"XG248Q",
      "id":"\\\\.\\DISPLAY1",
      "x":3840,
      "y":0,
      "width":1920,
      "height":1080,
      "is_primary":false,
      "handle":{
         "value":-493680521
      },
      "dpiX":96,
      "dpiY":96,
      "index":2
   }
]

As you can see Sony TV became the first element (including id, is_primary, position, etc) while my screens remain identically the same

unless the users restarts overwolf, this situation will persist.

Impact for my app: [e.g. x% of the users complained about it, it’s a show-stopper]

Medium (makes Desktop capture very confusing)

Do you currently have a workaround?

Not exactly, Restarting Overwolf is sub-optimal

1 Like

Thanks for reporting, we’ll fix this issue on OW version 194.

1 Like

I can confirm that the issue was resolved @ Overwolf version 0.194.0.12

1 Like