A non-activated floating layer assisted external window cross-virtual desktop migration method and computer program product

CN122526481APending Publication Date: 2026-08-07BEIJING LIER HEXUN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING LIER HEXUN TECHNOLOGY CO LTD
Filing Date
2026-06-19
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

现有虚拟桌面迁移方式通常只能把窗口放入目标虚拟桌面,不能在迁移后保持原拖动输入序列,使用户继续把真实窗口拖动到目标虚拟桌面中的合适位置或贴靠区域

Benefits of technology

[0026] Compared with the prior art, the present invention has at least the following beneficial effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122526481A_ABST
    Figure CN122526481A_ABST
Patent Text Reader

Abstract

The application discloses a non-activated floating layer assisted external window cross-virtual desktop migration method and computer program product. The method performs qualification filtering on the window and records the window identification after the external manageable window enters the operating system window moving state triggered by user dragging; displays or keeps displaying the non-activated floating layer which does not obtain the input focus before the moving state ends, continuously obtains the global screen position of the dragging pointer and maps to the non-activated floating layer or the migration target layer coordinate system; expands the migration target layer based on the mapped pointer position; when the dragging pointer and the target virtual desktop meet the release condition or the residence condition, migrates the window to the target virtual desktop, and switches the active virtual desktop when meeting the residence condition, so that the window can continue to move with the dragging pointer before the moving state ends. The application can complete migration, continue positioning and reduce false triggering without entering a special desktop management interface and without occupying the focus.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of graphical user interfaces, window management, virtual desktop management, and operating system-assisted interaction, and particularly to a method and computer program product for identifying targets and completing cross-virtual desktop window migration, optional active virtual desktop switching, continued dragging and positioning, and window position handling during the user's dragging of an external manageable window. Background Technology

[0002] Desktop operating systems typically support multiple virtual desktops or workspaces. Users can assign different application windows to different virtual desktops to reduce window clutter on the current desktop and improve task grouping efficiency.

[0003] Existing virtual desktop window migration methods typically include: dragging window thumbnails after entering a dedicated desktop management interface or full-screen preview interface; moving windows to a specified desktop via window menus, taskbar menus, or keyboard shortcuts; dragging windows to the edge of the screen and switching to an adjacent desktop after a delay; or moving windows through desktop previews, workspace tabs, desktop grids, etc. Task view solutions usually involve dragging and dropping window thumbnails or task view objects or using menu operations within a dedicated desktop management interface, rather than performing continuous migration of the actual external windows currently being moved by the operating system's window manager in a normal desktop environment.

[0004] While the above methods enable window migration across virtual desktops, they still have shortcomings. First, window movement and virtual desktop migration are often separate operations; when a user is dragging a real window, they often need to release the window, enter a dedicated management interface, select a thumbnail, or execute a menu command. Second, the dedicated management interface temporarily replaces the normal desktop environment, requiring users to switch between the normal desktop and the management interface, resulting in a cumbersome operation path. Third, relying solely on screen edges or normal mouse hover events makes it difficult to reliably distinguish between window movement, window scaling, text selection, drag-and-drop within the application, and normal mouse movement, leading to accidental or missed triggers. Finally, if the auxiliary interface is activated or gains input focus during dragging, it may cause the external window's system movement state to end, preventing cross-desktop migration from being completed within the same press-and-move input sequence.

[0005] Furthermore, in desktop systems like Windows, the final window position often needs to be determined by considering workspace boundaries, screen edge snapping, maximization, half-screen or corner layout, and operating system window layout mechanisms such as Snap Layout. Existing virtual desktop migration methods typically only place the window into the target virtual desktop; they cannot maintain the original drag input sequence after migration, preventing users from continuing to drag the real window to the appropriate position or snapping area within the target virtual desktop. Therefore, virtual desktop migration and window positioning within the target desktop remain two separate actions.

[0006] Therefore, there is a need for a technical solution that can identify the dragging state of externally manageable windows in a normal desktop environment, and complete the migration of windows across virtual desktops by migrating the target layer without entering a dedicated desktop management interface or preempting input focus, and maintain dragging continuity in the target virtual desktop to complete the final positioning or snap-in layout when needed. Summary of the Invention

[0007] The technical problem to be solved by this invention is: when a user drags an externally manageable window, how to identify the movement status of the externally manageable window, display the cross-virtual desktop migration target, and complete the window cross-desktop migration, optional active virtual desktop switching, continued drag positioning and position processing in the target virtual desktop in the same press-move input sequence, without entering the dedicated desktop management interface, without seizing input focus, or terminating the original window drag input sequence.

[0008] This invention also addresses the following problems: how to distinguish between external window movement and window scaling; how to identify whether the pointer is close to the floating layer during dragging of a non-application window; how to make the target layer visible and hit but not gain input focus; how to adopt different response strategies between the button body, the extended visual area, and the missed area; how to maintain the association between the external window and the drag pointer after migrating and switching to the target virtual desktop; how to uniformly handle multiple types of targets such as existing desktops, new desktops, pinned desktops, and hidden desktops; and how to link the desktop switching command with the currently dragged window during window dragging.

[0009] To address the aforementioned technical problems, this invention provides a method for migrating external windows across virtual desktops with the assistance of an inactive overlay, applicable to computing devices with multiple virtual desktops. The method includes: monitoring window movement state events of the operating system to detect when an externally manageable window enters a movement state triggered by user dragging; upon detecting the movement state, performing eligibility filtering on the externally manageable window, and recording the window identifier of the externally manageable window after it passes the eligibility filtering; continuously acquiring the global screen position of the drag pointer before the movement state ends, and mapping the global screen position to the coordinate system of an inactive overlay or the migration target layer; displaying or maintaining the display of the inactive overlay before the movement state ends, and displaying or expanding the migration target layer based on the mapped pointer position; after the migration target layer is expanded, displaying or expanding the coordinate system of the inactive overlay based on the global screen position. The coordinate transformation result of the active overlay or the target layer coordinate system and the target geometric region are used to detect the hit relationship between the drag pointer and the target region corresponding to the target virtual desktop. The detection of this hit relationship does not depend on the inactive overlay or the target layer obtaining input focus, nor does it require the inactive overlay or the target layer to receive ordinary mouse hover messages or in-application drag and drop messages. When the drag pointer and the target virtual desktop meet the preset release condition or preset dwell condition, the external manageable window is migrated to the target virtual desktop according to the recorded window identifier. The preset release condition or the preset dwell condition is determined based on the release position or dwell time of the drag pointer relative to the target region corresponding to the target virtual desktop.

[0010] The inactive overlay and the target migration layer are not activated or gain input focus during display, allowing target detection and window migration to be performed within the same press-and-move input sequence. When preset dwell conditions are met, the system can also switch the active virtual desktop to the target virtual desktop. After the active virtual desktop switch, if the movement state has not ended, the system continues to acquire the global screen position of the drag pointer and maintains the association between the externally manageable window and the drag pointer based on the global screen position of the drag pointer and the window movement state maintained by the operating system's window manager, enabling the externally manageable window to continue moving within the target virtual desktop. In this case, the active virtual desktop switch and continued movement within the target virtual desktop are also performed within the same press-and-move input sequence.

[0011] The externally manageable window refers to a window that is different from the window belonging to the inactive overlay or the target migration layer, is managed by the operating system's window manager, and can be used to perform virtual desktop migration operations. This term is not equivalent to a pinned window, nor is it limited to belonging to another process. The eligibility filtering is a migrationability determination performed at runtime based on the current state of candidate windows, used to exclude windows that are currently unsuitable for entering the cross-virtual desktop migration process.

[0012] The inactive overlay refers to a user interface layer that can be displayed above a normal application window or in the vicinity of a target window to present the target being moved, and which does not activate itself or obtain input focus during the display process. Attributes such as transparent, semi-transparent, irregularly shaped, on top, and not entering the taskbar can be used as specific implementation methods, but are not necessary limitations of the concept of the inactive overlay.

[0013] In one implementation, the operating system's window movement state events include a window movement or resizing start event and a window movement or resizing end event. After the window movement or resizing start event and before the window movement or resizing end event, the system continuously tracks the drag pointer position and performs a migration target hit detection.

[0014] In one implementation, eligibility filtering includes: determining whether a pointer press state for dragging a window currently exists, and excluding borders, corners, or other window scaling hit areas based on window hit test results. Eligibility filtering may also include excluding invisible windows, invalid windows, system shell windows, untraceable windows, windows pinned to all virtual desktops, windows belonging to inactive overlays, and window movement states generated when interactions within the target layer are active.

[0015] In one implementation, continuously acquiring the global screen position of the dragged pointer includes obtaining global screen coordinates through timer polling, global mouse hooks, accessibility events, window manager events, or a combination thereof. The system then converts the global screen coordinates to an inactive overlay coordinate system and calculates the hit result based on the target geometry. Since mouse input is typically within the system movement mode loop of an externally manageable window during its movement, the target layer may not receive continuous mouse messages. Therefore, this method does not rely on the target layer obtaining mouse focus, nor does it require the target layer to receive ordinary hover events.

[0016] In one implementation, displaying or expanding the migration target layer based on the mapped pointer position includes: determining whether the hit area belongs to the button body, an extended visual area, or a missed area based on the relationship between the mapped pointer position and the hit area of ​​the inactive overlay; expanding the migration target layer immediately when the hit area is the button body; expanding the migration target layer after a continuous hit reaches an expansion time threshold when the hit area is an extended visual area; and not expanding the migration target layer when the hit area is a missed area. When the inactive overlay is temporarily displayed due to an external manageable window entering a moving state, the migration target layer can be expanded without waiting for the expansion time threshold after dragging the pointer to hit the inactive overlay. The preset quick expansion area may include the button body, a preset area of ​​the inactive overlay in the temporary display state, or a quick expansion hotspot configured by the user.

[0017] In one implementation, the migration target layer includes multiple virtual desktop targets, each corresponding to an optional target virtual desktop. The migration target layer may also include new virtual desktop targets, top-feature targets, hidden-feature targets, or other window management targets.

[0018] In one implementation, a preset dwell condition is met when the dragged pointer remains continuously within the target area of ​​the target virtual desktop for a duration threshold. Upon meeting this preset dwell condition, the system migrates the externally manageable window to the target virtual desktop and switches the active virtual desktop to the target virtual desktop. Since the migration and switching occur before the window movement ends, the user can continue to drag the externally manageable window within the target virtual desktop, placing it at a specific location within the target workspace, at the screen edge, in a snap-in area, or in a maximized trigger area.

[0019] In one implementation, maintaining the association between the externally manageable window and the drag pointer includes: recording the window identifier and current drag state of the externally manageable window before migration and active virtual desktop switching; after migration and active virtual desktop switching, if the operating system window manager still maintains the window movement state, continuing to obtain the global screen position of the drag pointer, and the operating system window manager continuing to update the position of the externally manageable window according to the position of the drag pointer; when a pointer release or window movement state end event is detected, clearing the recorded window identifier and drag state.

[0020] In one implementation, when the dragged pointer hits the target of a newly created virtual desktop and meets the release or dwell conditions, the system creates a new virtual desktop and migrates the externally manageable windows to the new virtual desktop. Whether to switch the active virtual desktop to the new virtual desktop can be determined by preset conditions or user configuration. Furthermore, when the dragged pointer remains on the target of the newly created virtual desktop for a duration threshold, the system can automatically create a new virtual desktop, migrate the externally manageable windows to the new virtual desktop, and switch the active virtual desktop to the new virtual desktop.

[0021] In one implementation, when the dragged pointer hits the top-of-the-line function target and the release condition is met, the system changes the top-of-the-line state of the externally manageable window and restores or sets the position of the externally manageable window according to the drag start boundary information. When the dragged pointer hits the hide function target and the release condition is met, the system hides the externally manageable window and saves the drag start boundary information as restoration boundary information for use when restoring the externally manageable window.

[0022] In one implementation, if the system receives a desktop switching instruction, such as desktop number switching, desktop number cyclic switching, or other desktop switching instruction that can identify the target virtual desktop, while the externally manageable window is in a moving state, the externally manageable window is moved to the target virtual desktop corresponding to the desktop switching instruction, and the active virtual desktop is switched to the target virtual desktop.

[0023] In one embodiment, the method further includes a position processing step: setting, restoring, or restricting the position of the externally manageable window after migration based on at least one of the following: the drag start boundary, the offset of the drag pointer relative to the externally manageable window, the workspace boundary of the target virtual desktop, multi-monitor parameters, monitor DPI, or taskbar occupancy area. In another embodiment, after the system resides in the migrated state and switches to the target virtual desktop, the system maintains the window's movement state, and the operating system's window manager determines the window's final boundary, maximized state, edge-trimmed state, or snap layout state (e.g., Snap Layout) based on the final release position of the drag pointer.

[0024] In one implementation, the cross-virtual desktop window migration system executing the above method includes an event listening module, a window recognition module, a state recording module, a pointer tracking module, an inactive overlay module, a hierarchical hit module, a target hit module, a migration execution module, a position processing module, and a state cleanup module. The event listening module listens for window movement state events in the operating system. The window recognition module identifies externally manageable windows entering the movement state and excludes windows unsuitable for migration. The state recording module records the window identifier and current dragging state of externally manageable windows. The pointer tracking module acquires the global screen position of the drag pointer before the movement state ends and converts it to inactive overlay coordinates. The inactive overlay module displays or maintains the display of inactive overlays during dragging and displays the migration target layer without acquiring input focus. The hierarchical hit module distinguishes between the button body, extended visual area, and missed area, and controls the migration target layer to expand immediately, expand with a delay, or not expand based on the hit type. The target hit module detects the hit relationship between the drag pointer and the target in the migration target layer. The migration execution module responds to release or dwell conditions to migrate externally manageable windows to the target virtual desktop, and switches the active virtual desktop when dwell conditions are met or a desktop switching command is received. The position handling module sets, maintains, or restores window positions based on drag start boundary information, drag pointer position information, or layout state returned by the operating system's window manager when position restoration, cross-monitor position adjustment, or final release of positioning is required. The state cleanup module cleans up the state and closes the migration target layer in response to a move state end event.

[0025] The present invention also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the above-described method for migrating external windows across virtual desktops with the assistance of an inactive overlay.

[0026] Compared with the prior art, the present invention has at least the following beneficial effects.

[0027] First, the present invention can complete cross-virtual desktop migration in the same press-move input sequence when the user drags an external manageable window, and can complete desktop switching according to a preset strategy, without the user having to enter the task view, full-screen preview or menu interface first.

[0028] Secondly, the present invention can migrate the externally manageable window to the target virtual desktop and switch the active virtual desktop before the window movement state ends during the dwell migration path, while maintaining the association between the externally manageable window and the drag pointer, so that the user can continue to drag the real window in the target virtual desktop, thereby releasing the window to the target position, the edge of the screen, the maximized trigger area, or the layout area.

[0029] Third, this invention displays the target layer in a non-active overlay, and the target layer does not receive input focus when displayed, reducing the risk of the external window's movement being interrupted. Since target hits are calculated based on global pointer coordinates and the target's geometric region, even if the target layer cannot receive ordinary mouse hover messages while the external window is in a system movement state, target hits can still be continuously identified.

[0030] Fourth, this invention reduces false triggers during normal mouse movement, window scaling, or wiping over floating layers by using operating system window movement state events, pointer press state, hit test, scaling hit exclusion, window qualification filtering, button body / extended visual area hierarchical hit and delayed expansion.

[0031] Fifth, the migration target layer of the present invention can directly provide multiple virtual desktop targets, allowing users to select any target desktop, rather than being limited to adjacent desktops.

[0032] Sixth, the present invention can handle different targets such as migrating to an existing desktop, creating a new desktop and migrating it, pinning it to the top, and hiding it in the same external drag state machine, reducing the number of interaction entry points.

[0033] Seventh, the present invention can record the start boundary and recovery information of dragging to make the window position after auxiliary operations such as pinning, hiding, and migrating across displays more reasonable, and avoid the window staying near the target layer or in an invisible area.

[0034] Eighth, the inactive floating layer of the present invention can adopt a main float, a border toolbar or other layout forms, which can adapt to different screen edges, window positions and user habits. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of the system for migrating across virtual desktop windows.

[0036] Figure 2 This is a flowchart illustrating the method for migrating across virtual desktop windows.

[0037] Figure 3 This is a schematic diagram of the drag-and-drop session timing.

[0038] Figure 4 A schematic diagram of dragging and migrating the state machine for an externally manageable window.

[0039] Figure 5 This is a schematic diagram of target selection for sector migration based on the main buoy.

[0040] Figure 6 This is a schematic diagram of migrating the target layer for the edge-fitting toolbar.

[0041] Figure 7 This diagram illustrates the continuous migration and repositioning of the session by dragging.

[0042] Figure 8 A diagram illustrating the release and cleanup of multiple targets.

[0043] Figure reference numerals: 100, Computing device or window migration system; 101, Operating system window manager; 102, Virtual desktop manager; 110, Event listener module; 120, Window recognition module; 130, State recording module; 140, Pointer tracking module; 150, Inactive overlay module; 151, Main float; 152, Extended visual area; 153, Migration target layer; 154, Virtual desktop target; 155, New virtual desktop target; 156, Top-of-the-line target; 157, Hidden target; 160, Hierarchical hit module; 170, Target hit module; 180, Migration execution module; 190, Position processing module; 195, State cleanup module; 200, Externally manageable window; 201, Drag pointer; 300, First virtual desktop; 310, Target virtual desktop; 400, Edge-fitting toolbar. Detailed Implementation

[0044] The embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the following embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the present invention. Where there is no conflict, the technical features of the various embodiments can be combined with each other.

[0045] Example 1: System Structure

[0046] like Figure 1 As shown, the computing device or window migration system 100 works in conjunction with the operating system window manager 101 and the virtual desktop manager 102. The system 100 includes an event listening module 110, a window recognition module 120, a state recording module 130, a pointer tracking module 140, an inactive overlay module 150, a hierarchical hit module 160, a target hit module 170, a migration execution module 180, a position processing module 190, and a state cleanup module 195.

[0047] The event listening module 110 listens for window movement state events generated by the operating system window manager 101. Window movement state events may include window movement or resizing start events and window movement or resizing end events. The window identification module 120 identifies the externally manageable window 200 based on the window identifier in the event and performs eligibility filtering on that window. The status recording module 130 records the window identifier of the externally manageable window 200, its current dragging state, and, when necessary, the drag start boundary information.

[0048] The pointer tracking module 140 continuously acquires the global screen position of the dragged pointer 201 before the movement state of the external manageable window 200 ends. The inactive overlay module 150 displays or maintains the display of the inactive overlay and the migration target layer 153. The inactive overlay does not activate itself or obtain input focus when displayed, thereby avoiding interruption of the window movement state of the external manageable window 200. The hierarchical hit module 160 maps the global screen position of the dragged pointer 201 to the coordinate system of the inactive overlay and determines whether the hit area belongs to the button body, the extended visual area, or the missed area. After the migration target layer 153 is expanded, the target hit module 170 detects the hit relationship between the dragged pointer 201 and the virtual desktop target 154 or the functional target. The migration execution module 180 responds to the release condition or the dwell condition, calls the virtual desktop manager 102 to migrate the external manageable window 200 to the target virtual desktop 310, and switches the active virtual desktop when the preset conditions are met. The position processing module 190 processes the window position based on information such as the drag start boundary, pointer offset, target work area boundary, multi-monitor parameters, or monitor DPI. The state cleanup module 195 cleans up the drag state and closes the migration target layer 153 after the window movement state ends.

[0049] Example 2: Method Flow

[0050] like Figure 2 As shown, after the method begins, the system listens for window movement status events in the operating system. When a window movement or resizing start event is detected, the system determines whether the window corresponding to the event is an externally manageable window 200. If the window is invisible, invalid, untrackable, belongs to the system shell, belongs to an inactive overlay, is pinned to all virtual desktops, or the current internal system interaction state is not suitable for entering the external window migration process, then the current processing ends.

[0051] If the window passes the eligibility filter, the system further determines whether the movement is a user-triggered window movement or a window scaling. For example, it can detect pointer press status and exclude scaling areas such as window borders and corners based on window hit test results. If it is determined to be a valid external window movement, the system records the window identifier of the external manageable window 200 and records the drag start boundary when necessary.

[0052] Subsequently, the system continuously acquires the global screen position of the drag pointer 201 before the window movement ends. Since the dragged object is an externally manageable window 200, ordinary control hover events or application-internal drag-and-drop events cannot reliably provide a complete dragging state. Therefore, the system converts the global screen position to the coordinate system of the inactive overlay or the migration target layer 153 before performing geometric hit detection.

[0053] When the drag pointer 201 hits the button body of the inactive floating layer, the system immediately expands the migration target layer 153. When the drag pointer 201 hits the extended visual area 152, the system expands the migration target layer 153 after a continuous hit reaches an expansion time threshold. When the drag pointer 201 does not hit the button body or the extended visual area 152, the migration target layer 153 is not expanded, or if it has already been expanded, it is closed or closed with a delay according to a preset strategy.

[0054] After the target layer 153 is expanded, the system checks whether the drag pointer 201 hits the virtual desktop target 154, the newly created virtual desktop target 155, the pinned function target 156, the hidden function target 157, or other targets. If it hits the virtual desktop target 154 and the release condition is met, the externally manageable window 200 is migrated to that target virtual desktop 310. Whether the active virtual desktop is switched during the release path can be determined by user configuration or a preset policy. If it hits the virtual desktop target 154 and the dwell condition is met, the externally manageable window 200 is migrated to the target virtual desktop 310, and the active virtual desktop is switched to the target virtual desktop 310. The dwell migration path occurs before the window movement state ends, so the drag pointer 201 can still continue to control the position of the externally manageable window 200 in the target virtual desktop 310 until the user releases the pointer or the operating system window manager ends the window movement state.

[0055] When a window movement or resizing event is detected to be completed, the system performs a release cleanup based on the final release position, clears the current drag state, closes the migration target layer 153, restores the temporarily displayed inactive floating layer, clears the target highlight, and refreshes the window list.

[0056] Example 3: Dragging the Session Sequence

[0057] like Figure 3 As shown, the user first presses and moves the external manageable window 200. The operating system window manager 101 generates a window movement start event. After the event listening module 110 receives the event, the window recognition module 120 performs qualification filtering. If the filtering passes, the status recording module 130 records the window identifier, and the pointer tracking module 140 begins to continuously acquire the global screen position of the drag pointer 201.

[0058] Before the movement ends, the inactive overlay module 150 displays or maintains the display of the inactive overlay, and expands the migration target layer 153 when the hierarchical hit condition is met. Since the inactive overlay does not acquire input focus, target detection and migration actions can be performed in the same press-move input sequence. After the target hit module 170 detects the release condition or dwell condition, the migration execution module 180 migrates the external manageable window 200 to the target virtual desktop 310. If migration and switching are triggered by the dwell condition, the pointer tracking module 140 continues to track and drag the pointer 201 in the target virtual desktop 310 until the operating system window manager 101 generates a window movement end event, and the state cleanup module 195 cleans up the state. If a desktop switching command is received while the external manageable window 200 is in the movement state, the migration execution module 180 migrates the external manageable window 200 to the corresponding target virtual desktop 310 according to the currently recorded window identifier.

[0059] Example 4: State Machine Transition

[0060] like Figure 4 As shown, the system is initially in an idle state. When the event listening module 110 receives a window movement start event, and the window recognition module 120 determines that the corresponding window is an externally manageable window 200 that has passed the qualification filter, the system enters the external movement detection state. Subsequently, the state recording module 130 records the window identifier of the externally manageable window 200, the pointer tracking module 140 begins to acquire the global screen position of the drag pointer 201, and the system enters the target layer unexpanded state.

[0061] When the target layer is not expanded, if the dragged pointer 201 hits the button body, or hits the extended visual area and continues to reach the expansion time threshold, the system enters the expanded target layer state; if the dragged pointer 201 does not hit the relevant area, the system remains in the expanded target layer state or returns to the idle state. After entering the expanded target layer state, the target hit module 170 continuously detects the hit relationship between the dragged pointer 201 and each target in the migrated target layer 153.

[0062] When the drag pointer 201 enters the virtual desktop target 154 and continues to reside for a certain period of time, the system enters the desktop target resident state and triggers the migration execution module 180 to perform window migration and optional active virtual desktop switching, and then enters the migration / switching state. In the migration / switching state, as long as the operating system window manager 101 has not generated a window movement end event, the externally manageable window 200 is still in the same drag input sequence, and the user can continue to drag the window to the final position in the target virtual desktop 310. When the user releases the drag pointer 201, the system enters the release and closing state, and performs closing logic such as migration, creating a new desktop, pinning, hiding, or not migrating according to the release position. Regardless of whether it is triggered by resident or release, when the operating system window manager 101 generates a window movement end event, the state cleanup module 195 enters the cleanup state, closes the migration target layer 153, clears the highlights, restores the temporarily displayed inactive floating layer, and resets the recorded window identifier.

[0063] Example 5: Main buoy fan-shaped migration target layer

[0064] like Figure 5 As shown, the inactive overlay can serve as the main float 151. The main float 151 displays the number or title of the current virtual desktop and supports desktop switching, repositioning, or other configuration actions in normal state. When the externally manageable window 200 enters a moving state, if the main float 151 was originally hidden, the system can temporarily display the main float 151 so that the user can drag the pointer 201 to the vicinity of the main float 151. Figure 5 In the diagram, multiple fan-shaped areas represent virtual desktop targets 154, the dashed ring area represents the extended visual area 152, the dashed outer frame represents the migration target layer 153, and the dashed arrows represent the path of the external manageable window 200 as it moves towards the target area with the drag pointer 201.

[0065] The main float 151 includes a button body and an extended visual area 152 located outside the button body. The extended visual area 152 can be a visual halo, an extended hot zone, or a neighboring area. When the drag pointer 201 hits the button body, the migration target layer 153 is immediately expanded; when the drag pointer 201 hits the extended visual area 152, the migration target layer 153 is expanded after a continuous hit reaches an expansion time threshold; when the drag pointer 201 misses, the migration target layer 153 is not expanded.

[0066] The migration target layer 153 can be a fan-shaped, ring-shaped, or other radial layout located on one side or in the circumferential adjacent area of ​​the main float 151. Multiple virtual desktop targets 154 can be arranged sequentially below, to the side, or in other suitable directions along the main float 151. Each virtual desktop target 154 corresponds to an optional target virtual desktop. The current desktop or currently hit target can be distinguished by borders, bolding, highlighting, or other visual states. The migration target layer 153 may also include a newly created virtual desktop target 155, a top-positioned functional target 156, and a hidden functional target 157. These functional targets can be arranged as small action targets above, diagonally above, or in other adjacent areas of the main float 151. When the drag pointer 201 remains continuously within a non-current virtual desktop target 154 for a duration threshold, the system migrates the externally manageable window 200 to that target virtual desktop 310 and switches the active virtual desktop. When the drag pointer 201 is released from within the virtual desktop target 154, the system migrates the externally manageable window 200 to the corresponding virtual desktop; whether to switch the active virtual desktop is determined by a preset strategy or user configuration.

[0067] In a typical usage of the main float fan-shaped migration target layer, after the user drags the external manageable window 200 to the fan-shaped area corresponding to the target virtual desktop 310, they directly release the drag pointer 201. The system responds to the release condition and migrates the external manageable window 200 to the corresponding target virtual desktop 310. This method is suitable for scenarios where the user only wants to complete the window's desktop migration and does not need to immediately enter the target virtual desktop 310 for further positioning.

[0068] In another typical usage scenario, the user drags pointer 201 and keeps it within the fan-shaped area corresponding to the target virtual desktop 310 until a dwell time threshold is reached. In response to the dwell condition, the system migrates the externally manageable window 200 to the target virtual desktop 310 and switches the active virtual desktop. If the window movement has not ended, the user can continue to drag the window in the target virtual desktop 310 and release it at the target position, screen edge, maximized trigger area, or snap-to-layout area.

[0069] When the drag pointer 201 remains continuously within the newly created virtual desktop target 155 for a specified duration, the system automatically creates a new virtual desktop, migrates the externally manageable window 200 to the new virtual desktop, and switches the active virtual desktop to the new virtual desktop. When the drag pointer 201 is released from the newly created virtual desktop target 155, the system creates a new virtual desktop and migrates the externally manageable window 200; whether to switch the active virtual desktop can be determined by a preset policy or user configuration.

[0070] Example 6: Migrating the target layer using the edge-fitting toolbar

[0071] like Figure 6As shown, the inactive overlay can also be implemented as a snap-in toolbar 400. The snap-in toolbar 400 is positioned at the edge of the screen or workspace and displays the current virtual desktop status. When an externally manageable window 200 is dragged and approaches the snap-in toolbar 400, the snap-in toolbar 400 enters an expanded or enlarged state, displaying one or more virtual desktop targets 154, and can display a newly created virtual desktop target 155 and a hidden target 157. When the drag pointer 201 resides in a virtual desktop target 154 for a specified time threshold, the system migrates the externally manageable window 200 to that target virtual desktop 310 and switches the active virtual desktop. When the user releases the drag pointer 201, the system performs migration, new desktop creation, hiding, or other cleanup operations based on the release position.

[0072] This embodiment illustrates that the inactive floating layer and the migration target layer 153 are not limited to the main float or fan-shaped layout, but can also be a toolbar, grid, list, card, thumbnail or other layout arranged along the edge of the screen.

[0073] Example 7: Continuous migration, continued localization, and multi-target cleanup

[0074] like Figure 7 As shown, the user drags an externally manageable window 200 within the first virtual desktop 300. After recognizing the window as being in a moving state, the system displays or maintains a deactivated overlay. When the drag pointer 201 hits the virtual desktop target 154 in the migration target layer 153 and the dwell condition is met, the system determines the corresponding target virtual desktop 310, performs window migration, and switches the active virtual desktop to the target virtual desktop 310. After switching, the externally manageable window 200 remains associated with the drag pointer 201, and the user can continue dragging the window within the target virtual desktop 310, placing it at the target location, the edge of the target workspace, the maximized trigger area, or snapping it to the layout area. The user does not need to enter a dedicated desktop management interface, nor does they need to release the window and start dragging again.

[0075] like Figure 8 As shown, the migration target layer 153 can include multiple targets. When released to the virtual desktop target 154, the system migrates the externally manageable window 200 to an existing virtual desktop. When released to the new virtual desktop target 155, the system creates a new virtual desktop and migrates the externally manageable window 200; when the dwell time threshold is reached in the new virtual desktop target 155, the system automatically creates a new virtual desktop, migrates the externally manageable window 200, and switches the active virtual desktop. When released to the "top" function target 156, the system changes the top state of the externally manageable window 200 and can restore or set the window position based on the drag start boundary. When released to the "hide" function target 157, the system hides the externally manageable window 200 and saves the drag start boundary information as the restore boundary information.

[0076] Example 8: Desktop Switching Command Linkage

[0077] While the externally manageable window 200 is in a moving state, the system can record the currently dragged window identifier. When the user inputs a desktop switching command, such as switching desktop numbers, cycling through desktop numbers, or other desktop switching commands that can identify the target virtual desktop, the system not only switches the active virtual desktop, but also migrates the currently recorded externally manageable window 200 to the target virtual desktop 310 corresponding to the desktop switching command, and switches the active virtual desktop to that target virtual desktop 310. If there is no currently valid externally manageable window 200 in a moving state, the desktop switching command is executed in the normal desktop switching mode.

[0078] Example 9: Positioning and Final Release Layout

[0079] In a normal desktop migration path, the position of the externally manageable window 200 can be naturally maintained by the operating system's movement state and migration operation. In a persistent migration path, the system completes the migration and switching of the active virtual desktop before the window movement state ends, allowing the externally manageable window 200 to continue moving within the target virtual desktop 310 following the drag pointer 201. When the user releases the drag pointer 201 within the target virtual desktop 310, the operating system window manager 101 can determine the final window boundary based on the final release position, or trigger layout responses such as maximize, edge snap, half-screen, four corners, or Snap Layout.

[0080] In scenarios involving pinning, hiding, creating a new desktop, cross-monitor setups, cross-DPI setups, or changes in the workspace, the system can recalculate, restore, or restrict the window position based on the drag start boundary, the offset of the drag pointer 201 relative to the external manageable window 200, the workspace boundary of the target virtual desktop 310, multi-monitor parameters, monitor DPI, or taskbar occupancy. For example, after executing the pinning function objective 156, the system can restore the external manageable window 200 to near the drag start boundary after the movement ends. As another example, when executing the hiding function objective 157, the system can record the drag start boundary or restore boundary so that the window can return to a reasonable position when it is subsequently restored. Furthermore, when the monitor workspace or DPI corresponding to the target virtual desktop 310 differs from that of the first virtual desktop 300, the system can restrict the final window position based on the target workspace boundary to prevent the window from being placed in an invisible area.

[0081] Other variations

[0082] The expansion time threshold and dwell time threshold can be fixed values ​​or configurable by the user. Hierarchical hit areas can include the button itself, visual halo, extended hotspots, toolbar proximity areas, screen edge areas, etc. Qualification filtering for the externally manageable window 200 can include conditions such as process, window class, window style, visibility, minimized state, whether it is pinned to all virtual desktops, whether it belongs to the system shell, and whether it is the program's own interactive state. Target types can be extended to pinning a window to all desktops, pinning an application to all desktops, closing a window, moving to a new desktop and activating it, moving to a new desktop but not activating it, etc. The movement state of the externally manageable window 200 can be identified by window manager events, accessibility events, global mouse hooks, window messages, system APIs, or a combination thereof. This invention can be applied to Windows virtual desktops, as well as other desktop environments that support workspaces or virtual desktops.

Claims

1. A method for migrating external windows across virtual desktops with the assistance of an inactive overlay, applied to a computing device with multiple virtual desktops, characterized in that, include: Listen to the window movement state events of the operating system to detect when an externally manageable window enters a movement state triggered by user dragging. The externally manageable window is a window that is different from the window to which the inactive overlay or the target migration layer belongs, is managed by the operating system window manager, and can be used to perform virtual desktop migration operations. After detecting the movement state, the externally manageable window is subjected to qualification filtering, and after the externally manageable window passes the qualification filtering, the window identifier of the externally manageable window is recorded. Before the movement state ends, continuously acquire the global screen position of the drag pointer and map the global screen position to the coordinate system of the inactive floating layer or the migration target layer; Before the end of the movement state, the inactive floating layer is displayed or kept displayed, and the migration target layer is displayed or expanded based on the mapped pointer position, wherein the inactive floating layer and the migration target layer do not activate themselves and do not obtain input focus when displayed; After the target migration layer is expanded, based on the coordinate transformation result from the global screen position to the coordinate system of the inactive floating layer or the target migration layer and the target geometric region, the target hit relationship between the drag pointer and the target region corresponding to the target virtual desktop is detected. The detection of the target hit relationship does not depend on the inactive floating layer or the target migration layer obtaining input focus, nor does it require the inactive floating layer or the target migration layer to receive ordinary mouse hover messages or in-application drag and drop messages. When the drag pointer and the target virtual desktop meet the preset release condition or preset dwell condition, the external manageable window is migrated to the target virtual desktop according to the recorded window identifier. The preset release condition or the preset dwell condition is determined based on the release position or dwell time of the drag pointer relative to the target area corresponding to the target virtual desktop. The detection of the target hit relationship and the window migration are performed in the same press-move input sequence.

2. The method according to claim 1, characterized in that, The operating system's window movement state events include a window movement or resizing start event and a window movement or resizing end event; after the window movement or resizing start event and before the window movement or resizing end event, the global screen position acquisition, coordinate mapping, and target hit relationship detection are performed; and the movement state is determined by the pointer pressing state to determine whether the movement state is triggered by user dragging.

3. The method according to claim 1, characterized in that, The eligibility filtering includes at least one of the following: Exclude borders, corners, or other window scaling hit areas based on window hit test results; Exclude invisible windows, invalid windows, system shell windows, untraceable windows, and windows pinned to all virtual desktops; Exclude the inactive floating layer or the window to which the migration target layer belongs; Exclude window movement states that occur when interactions within the target migration layer are already active.

4. The method according to claim 1, characterized in that, Continuously acquiring the global screen position of the drag pointer includes: obtaining global screen coordinates through timer polling, global mouse hooks, accessibility events, window manager events, or a combination thereof; converting the global screen coordinates to the coordinate system of the inactive overlay or the migration target layer; and performing geometric hit detection based on the converted coordinates.

5. The method according to claim 1, characterized in that, The inactive overlay is displayed above the normal application window or in the vicinity of the target window, and does not enter the active window state or obtain input focus during the display process; When the inactive overlay is hidden before the externally manageable window enters a moving state, the inactive overlay is temporarily displayed after the externally manageable window enters a moving state, and is restored to being hidden after the moving state ends.

6. The method according to claim 1, characterized in that, Displaying or expanding the migration target layer based on the mapped pointer position includes: Based on the relationship between the mapped pointer position and the hit area of ​​the inactive overlay, it is determined whether the hit area belongs to the button body, the extended visual area, or the missed area. When the hit area is the button body or a preset quick-expand area, the migration target layer is immediately expanded; When the hit area is an extended visual area, the migration target layer is expanded after the continuous hits reach the expansion time threshold. When the hit region is a miss region, the migration target layer is not expanded.

7. The method according to claim 1, characterized in that, The migration target layer includes multiple virtual desktop targets, each virtual desktop target corresponding to an optional target virtual desktop; the preset release condition includes the drag pointer being released within the target area corresponding to the target virtual desktop; the preset dwell condition includes the drag pointer remaining continuously within the target area corresponding to the target virtual desktop for a dwell time threshold.

8. The method according to claim 7, characterized in that, When the preset dwell conditions are met, the externally manageable window is migrated to the target virtual desktop and the active virtual desktop is switched to the target virtual desktop. After the active virtual desktop is switched, if the movement state has not ended, the global screen position of the drag pointer is obtained again, and based on the global screen position of the drag pointer and the window movement state maintained by the operating system window manager, the association between the externally manageable window and the drag pointer is maintained, so that the externally manageable window can continue to move in the target virtual desktop. The switching of the active virtual desktop and the continued movement in the target virtual desktop are executed in the same press-move input sequence.

9. The method according to claim 1, characterized in that, The migration target layer includes a newly created virtual desktop target; when the drag pointer hits the newly created virtual desktop target and the preset release condition or the preset dwell condition is met, a new virtual desktop is created, and the externally manageable window is migrated to the new virtual desktop; when the preset dwell condition is met, the active virtual desktop is switched to the new virtual desktop; after the active virtual desktop is switched, if the movement state has not ended, the global screen position of the drag pointer is continuously obtained, and the association between the externally manageable window and the drag pointer is maintained based on the global screen position of the drag pointer and the window movement state maintained by the operating system window manager; wherein, the switching of the active virtual desktop and the continued movement in the new virtual desktop are executed in the same press-move input sequence.

10. The method according to claim 1, characterized in that, The method further includes a location processing step, which includes at least one of the following: After performing window migration or creating and migrating a new virtual desktop, the target boundary of the migrated window is determined based on at least one of the following: the drag start boundary, the offset of the drag pointer relative to the externally manageable window, the work area boundary of the target virtual desktop, multi-monitor parameters, monitor DPI, or the taskbar occupied area. The position of the externally manageable window is then set, restored, or restricted based on the target boundary of the window. When the externally manageable window continues to move in the target virtual desktop and the pointer is released, by maintaining the window's moving state, the operating system window manager determines the final window boundary, maximized state, or snap-to-layout state of the externally manageable window in the target virtual desktop based on the final release position of the dragged pointer.

11. A computer program product, characterized in that, It includes a computer program or instructions that, when executed by a processor, implement the method of any one of claims 1 to 10.