MCPcopy
hub / github.com/paperwm/PaperWM / remove_handler

Function remove_handler

tiling.js:3950–3967  ·  view source on GitHub ↗
(workspace, meta_window)

Source from the content-addressed store, hash-verified

3948 Handle windows leaving workspaces.
3949 */
3950export 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.

Callers 1

initMethod · 0.85

Calls 5

spaceOfMethod · 0.80
disconnectMethod · 0.80
removeWindowMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected