From the Wookieepedia:
(...)The foils on each side locked in place flush against each other; during combat, however, the foils were folded out to increase the spread coverage of the laser cannons mounted at the tips of the foils. This gave the craft its distinctive "X"-like appearance when viewed from the front or rear. The cannons on some earlier models could not be fired with the S-foils in locked position, perhaps as a safety feature. During hyperspace travel, the S-foils remained locked to conserve energy.
http://starwars.wikia.com/wiki/T-65_X-wing_starfighter
Mistery solved!!! :-D