![]() ![]() Windows has no notification of a window changing virtual desktops, so BrowserDesktopWindowTreeHostWin updates the virtual desktop of a window whenever it gets focus, and if it has changed, calls WindowTreeHost::OnHostWorkspaceChanged. ![]() The GetWorkspace method is synchronous so VirtualDesktopHelper has to remember and return the most recent virtual desktop. The VirtualDesktopHelper class does the workspace handling for BrowserDesktopWindowTreeHostWin, including doing all the COM operations on a separate COM task runner. The actual implementation is a bit more complicated in order to avoid calling COM methods on the UI thread, or destroying COM objects on the UI thread, since doing so can cause nested message loops and re-entrant calls, leading to blocked UI threads and crashes. To restore browser windows to the desktop they were last open on, BrowserDesktopWindowTreeHostWin implements GetWorkspace by using the GetWindowDesktopId method on IVirtualDesktopManager, and restores the workspace using MoveWindowToDesktop, in its ::Init method. BrowserMatches in browser_ only returns a browser window on the current desktop. To make sure that opening a URL stays on the current virtual desktop, BrowserView::IsOnCurrentWorkspace uses the IVirtualDesktopManager method IsWindowOnCurrentVirtualDesktop. Windows 10 exposes the COM interface IVirtualDesktopManager to access the Virtual Desktop functionality. Only the user should be able to change virtual desktops, or move windows between virtual desktops. The core UI principles are that windows should be restored to the desktop they were shut down on, and opening an app window shouldn't change the current virtual desktop. Don't open it in a tab in a window on another virtual desktop. When opening a URL with the browser, either open it in a window on the current virtual desktop, or open a new window on the current virtual desktop.When launching the browser with session restore, browser windows are moved to the virtual desktop they were on when the browser shutdown.The user-facing Chromium support for virtual desktops consists of two things: An app (e.g., Chromium) can have windows open on different virtual desktops, and thus may need to be Virtual Desktop-aware. This enables the user to create multiple working environments and to switch between them. When a virtual desktop is hidden, all of its windows are also hidden. When a virtual desktop is selected to be active, the windows associated with that virtual desktop are displayed on the screen. Every window belongs to a virtual desktop. A virtual desktop is a collection of windows. Virtual Desktops are similar to Chrome OS and Mac workspaces. Windows 10 introduced Virtual Desktop support. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |