public static Process[] GetInputProcesses()
        {
            Process[] processes   = Process.GetProcesses();
            ArrayList arrayList   = new ArrayList();
            string    desktopName = SEBDesktopController.GetDesktopName(SEBDesktopController.Input.DesktopHandle);

            foreach (Process process in processes)
            {
                foreach (ProcessThread thread in (ReadOnlyCollectionBase)process.Threads)
                {
                    if (SEBDesktopController.GetDesktopName(SEBDesktopController.GetThreadDesktop(thread.Id)) == desktopName)
                    {
                        arrayList.Add((object)process);
                        break;
                    }
                }
            }
            Process[] processArray = new Process[arrayList.Count];
            for (int index = 0; index < processArray.Length; ++index)
            {
                processArray[index] = (Process)arrayList[index];
            }
            return(processArray);
        }
 public static SEBDesktopController GetCurrent()
 {
     return(new SEBDesktopController(SEBDesktopController.GetThreadDesktop(AppDomain.GetCurrentThreadId())));
 }