(workspace, meta_window)
| 3948 | Handle windows leaving workspaces. |
| 3949 | */ |
| 3950 | export function remove_handler(workspace, meta_window) { |
| 3951 | // Note: If `meta_window` was closed and had focus at the time, the next |
| 3952 | // window has already received the `focus` signal at this point. |
| 3953 | // Not sure if we can check directly if _this_ window had focus when closed. |
| 3954 | |
| 3955 | let space = spaces.spaceOf(workspace); |
| 3956 | space.removeWindow(meta_window); |
| 3957 | space.enableWindowPositionBar(); |
| 3958 | |
| 3959 | let actor = meta_window.get_compositor_private(); |
| 3960 | if (!actor) { |
| 3961 | signals.disconnect(meta_window); |
| 3962 | if (meta_window.clone && meta_window.clone.mapped) { |
| 3963 | meta_window.clone.destroy(); |
| 3964 | meta_window.clone = null; |
| 3965 | } |
| 3966 | } |
| 3967 | } |
| 3968 | |
| 3969 | /** |
| 3970 | Handle windows entering workspaces. |
no test coverage detected