swayfx/sway/commands
Pedro Côrte-Real 8008344762 Avoid numerical instability in resize
Because the layout code rounds down the dimensions of the windows
resizing would often be off by one pixel. The width/height fraction
would not exactly reflect the final computed width and so the resize
code would end up calculating things wrong.

To fix this first snap the container size fractions to the pixel grid
and only then do the resize. Also use round() instead of floor() during
layout to avoid a slightly too small width. This applies in two cases:

1. For the container we are actually resizing using floor() might result
   in being 1px too small.
2. For the other containers it might result in resizing them down by 1px
   and then if the container being resized is the last all those extra
   pixels would make the resize too large.

Fixes #4391
2020-01-01 10:14:29 -07:00
..
bar bar_cmd_colors: remove add_color 2019-12-28 10:07:25 +01:00
input input_cmd_xkb_file: allow shell path expansion 2019-11-21 10:36:15 -05:00
output add scale_filter output config option 2019-11-29 18:13:37 +01:00
seat seat_cmd_keyboard_grouping: change keymap to smart 2019-12-16 12:03:11 -05:00
assign.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
bar.c swaybar: complete barconfig_update event handling 2019-09-04 16:48:50 -10:00
bind.c bindsym/code: add group support 2019-08-01 18:54:58 +03:00
border.c Remove redundant checks 2019-08-12 09:42:11 +09:00
client.c cmd_client_*: support optional args for i3 compat 2019-12-29 10:40:06 +01:00
create_output.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
default_border.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
default_floating_border.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
default_orientation.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
exec.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
exec_always.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
exit.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
floating.c Fix scratchpad fullscreen behavior and crash 2019-04-13 08:48:37 -06:00
floating_minmax_size.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
floating_modifier.c Move sway-specific functions in common/util.c into sway/ 2019-01-21 12:39:16 -05:00
focus.c focus: do nothing on focus prev|next for workspaces 2019-11-04 23:48:39 +01:00
focus_follows_mouse.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
focus_on_window_activation.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
focus_wrapping.c focus: support focus_wrapping workspace 2019-10-17 13:48:52 +03:00
font.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
for_window.c Avoid adding duplicate criteria for no_focus and command 2019-07-27 03:53:05 +03:00
force_display_urgency_hint.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
force_focus_wrapping.c Add deprecation warnings for new_float, new_window, and force_focus_wrapping. 2019-04-14 20:44:12 -04:00
fullscreen.c Remove redundant checks 2019-08-12 09:42:11 +09:00
gaps.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
hide_edge_borders.c smart_borders: separate smartness from edge types 2019-11-04 21:16:27 -05:00
include.c Make load_include_configs void. Fix some cases where WD would not be restored. 2019-02-24 00:01:35 -05:00
inhibit_idle.c Implement inhibit_idle command 2019-03-24 19:26:12 -06:00
input.c config: improvements to the reload validation 2019-11-27 02:04:13 +01:00
kill.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
layout.c cmd_split: fix toggle split for non-split layouts 2019-07-11 10:46:56 -04:00
mark.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
max_render_time.c view: add max_render_time 2019-11-17 20:18:42 +01:00
mode.c cmd_mode: don't reset to default after subcommand 2019-08-27 13:45:04 +09:00
mouse_warping.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
move.c cmd_move: fix move to scratchpad hidden container 2019-08-23 09:12:06 +09:00
new_float.c Add deprecation warnings for new_float, new_window, and force_focus_wrapping. 2019-04-14 20:44:12 -04:00
new_window.c Add deprecation warnings for new_float, new_window, and force_focus_wrapping. 2019-04-14 20:44:12 -04:00
no_focus.c Avoid adding duplicate criteria for no_focus and command 2019-07-27 03:53:05 +03:00
nop.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
opacity.c cmd_opacity: add relative opacity changes 2019-08-05 22:10:36 -04:00
output.c add scale_filter output config option 2019-11-29 18:13:37 +01:00
popup_during_fullscreen.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
reload.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
rename.c Allow for workspace renaming during exec handling 2019-03-23 17:49:27 -04:00
resize.c Avoid numerical instability in resize 2020-01-01 10:14:29 -07:00
scratchpad.c Handle seat_get_focused_workspace returning NULL 2019-03-12 19:14:04 +01:00
seat.c Add seat <seat> idle_{inhibit,wake} <sources...> 2019-12-12 10:37:30 -05:00
set.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
show_marks.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
smart_borders.c smart_borders: separate smartness from edge types 2019-11-04 21:16:27 -05:00
smart_gaps.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
split.c Fix scratchpad fullscreen behavior and crash 2019-04-13 08:48:37 -06:00
sticky.c Handle NULL from output_get_active_workspace 2019-02-21 21:18:03 +01:00
swap.c cmd_swap: add floating support 2019-08-06 11:30:17 +09:00
swaybg_command.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
swaynag_command.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
tiling_drag.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
tiling_drag_threshold.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
title_align.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
title_format.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
titlebar_border_thickness.c Handle NULL from output_get_active_workspace 2019-02-21 21:18:03 +01:00
titlebar_padding.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
unmark.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
urgent.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
workspace.c Handle seat_get_focused_workspace returning NULL 2019-03-12 19:14:04 +01:00
workspace_layout.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
ws_auto_back_and_forth.c Remove now-unused "input" argument of cmd_results_new 2019-01-14 08:05:29 -05:00
xwayland.c Fix typo for the force/immediate option in xwayland_mode enum 2019-09-02 17:06:38 +03:00