(metaWindow)
| 4830 | } |
| 4831 | |
| 4832 | export function resizeHInc(metaWindow) { |
| 4833 | metaWindow = metaWindow || display.focus_window; |
| 4834 | let frame = metaWindow.get_frame_rect(); |
| 4835 | let space = spaces.spaceOfWindow(metaWindow); |
| 4836 | let workArea = space.workArea(); |
| 4837 | |
| 4838 | let maxHeight = workArea.height - Settings.prefs.horizontal_margin * 2 - Settings.prefs.window_gap; |
| 4839 | let step = Math.floor(maxHeight * 0.1); |
| 4840 | let currentHeight = Math.round(frame.height / step) * step; |
| 4841 | let targetHeight = Math.min(currentHeight + step, maxHeight); |
| 4842 | let targetY = frame.y; |
| 4843 | |
| 4844 | if (isMaximized(metaWindow)) { |
| 4845 | unmaximize(metaWindow, Meta.MaximizeFlags.BOTH); |
| 4846 | } |
| 4847 | |
| 4848 | // Space.layout will ensure the window is moved if necessary |
| 4849 | metaWindow.move_resize_frame(true, frame.x, targetY, frame.width, targetHeight); |
| 4850 | } |
| 4851 | |
| 4852 | export function resizeHDec(metaWindow) { |
| 4853 | metaWindow = metaWindow || display.focus_window; |
nothing calls this directly
no test coverage detected