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

Method isPlaceable

tiling.js:860–877  ·  view source on GitHub ↗
(metaWindow)

Source from the content-addressed store, hash-verified

858 }
859
860 isPlaceable(metaWindow) {
861 let clone = metaWindow.clone;
862 let x = this.visibleX(metaWindow);
863 let workArea = Main.layoutManager.getWorkAreaForMonitor(this.monitor.index);
864 let min = workArea.x - this.monitor.x;
865
866 if (x + clone.width < min + stack_margin ||
867 x > min + workArea.width - stack_margin) {
868 return false;
869 } else {
870 // Fullscreen windows are only placeable on the monitor origin
871 if ((isMaximized(metaWindow) && x !== min) ||
872 (metaWindow.fullscreen && x !== 0)) {
873 return false;
874 }
875 return true;
876 }
877 }
878
879 getWindows() {
880 return this.reduce((ws, column) => ws.concat(column), []);

Callers 2

moveDoneMethod · 0.95
setTargetMethod · 0.80

Calls 2

visibleXMethod · 0.95
isMaximizedFunction · 0.85

Tested by

no test coverage detected