(metaWindow)
| 4850 | } |
| 4851 | |
| 4852 | export function resizeHDec(metaWindow) { |
| 4853 | metaWindow = metaWindow || display.focus_window; |
| 4854 | let frame = metaWindow.get_frame_rect(); |
| 4855 | let space = spaces.spaceOfWindow(metaWindow); |
| 4856 | let workArea = space.workArea(); |
| 4857 | |
| 4858 | let maxHeight = workArea.height - Settings.prefs.horizontal_margin * 2 - Settings.prefs.window_gap; |
| 4859 | let step = Math.floor(maxHeight * 0.1); |
| 4860 | let currentHeight = Math.round(frame.height / step) * step; |
| 4861 | let minHeight = step; |
| 4862 | let targetHeight = Math.max(currentHeight - step, minHeight); |
| 4863 | let targetY = frame.y; |
| 4864 | |
| 4865 | if (isMaximized(metaWindow)) { |
| 4866 | unmaximize(metaWindow, Meta.MaximizeFlags.BOTH); |
| 4867 | } |
| 4868 | |
| 4869 | // Space.layout will ensure the window is moved if necessary |
| 4870 | metaWindow.move_resize_frame(true, frame.x, targetY, frame.width, targetHeight); |
| 4871 | } |
| 4872 | |
| 4873 | export function resizeWInc(metaWindow) { |
| 4874 | metaWindow = metaWindow || display.focus_window; |
nothing calls this directly
no test coverage detected