internal Win32VirtualDesktopManager(Win32Workspace workspace, IWin32VirtualDesktopService vds, IntPtr hMon)
        {
            m_workspace = workspace;
            m_desktops  = new List <Win32VirtualDesktop>();
            m_hMon      = hMon;
            m_vds       = vds;

            foreach (var d in m_vds.GetVirtualDesktops(m_hMon))
            {
                m_desktops.Add(new Win32VirtualDesktop(workspace, m_vds, d));
            }

            m_currentDesktop = m_vds.GetCurrentDesktopIndex(m_hMon);
        }
 public List <object> GetVirtualDesktops(IntPtr hMon)
 {
     return(ExecuteWithRetry(() => m_vds.GetVirtualDesktops(hMon)));
 }