set_pref center-new-windows false
resize_monitor default 400 400
new_client w wayland
new_client x x11

# Map a Wayland window maximized, and make sure it gets placed according to its
# unmaximized size:
#
# ------------
# | ----     |
# | |w |     |
# | ----     |
# |          |
# |          |
# ------------

create w/1 csd
resize w/1 120 120
maximize w/1
show w/1
wait_reconfigure w/1
assert_size w/1 MONITOR_WIDTH MONITOR_HEIGHT
assert_position w/1 0 0

unmaximize w/1
wait_reconfigure w/1
assert_size w/1 120 120
assert_position w/1 18 12

# Map a X11 window maximized, and make sure it gets placed according to it's
# unmaximized size
#
# ------------
# | ----     |
# | |w |     |
# | ----     |
# | |x |     |
# | ----     |
# ------------

create x/1 csd
resize x/1 120 120
maximize x/1
show x/1
wait_reconfigure x/1
assert_size x/1 MONITOR_WIDTH MONITOR_HEIGHT
assert_position x/1 0 0

unmaximize x/1
wait_reconfigure x/1
assert_size x/1 120 120
assert_position x/1 18 132
