Siman 87 פ״ז
1 א

שאין חזקה בנכסי אשת איש ובו ב סעיפים:
אין לאיש חזקה בנ"מ של אשתו שאכלם שני חזקה אע"פ שהתנה עמה שאין לו פירות בנכסיה וכן אין לאשה חזקה בנכסי בעלה ע"י שאכלתם שני חזקה: הגה ודוקא בחזקה כזה אבל בחזקת נזיקין כגון פתיחת חלונות וכדומה לזה יש לאיש חזקה בנכסי אשתו וה"ה לאשה על בעלה (ר"י במישרים נכ"ג ת"ז) (וע' בח"ה סי' קמ"ט):

A man does not have squatting rights in his wife's melog properties (a wife's property which is not listed in the ketuba; the husband has usufruct rights, yet is not responsible for the property. See siman 83:13) which he has used for the years of chazaka (if someone enjoys the usufruct of a property for 3 years without counterclaim from the original owner, he can claim that he purchased the land even if he is unable to produce the document of sale), even if she had previously made a condition that he would not receive the usufruct of her property. Similarly a woman does not have squatting rights on her husband's lands when she has taken the usufruct for the chazaka years. Rama: Specifically with this type of squatting, but with damage rights, e.g. opening windows [in a house] (without counterclaim) and similar instances, the husband does develop damage rights, and the law is similar with respect to the woman on her husband's property (Rabbenu Yerucham in Meisharim, path 23, section 7). And see Choshen Mishpat chapter 149.

2 ב

מי שהחזיק בנכסי אשת איש לא עלתה לו חזקה אא"כ החזיק בהם שלשה שנים אחר מות בעלה (ועיין בח"ה סימן קמ"ט):

Someone who holds possession of a married woman's property does not accrue squatting rights (see above) unless he maintained possession for three years after the death of her husband. Rama: See Choshen Mishpat chapter 149.