Bava Basra3: 7
לֹא יִפְתַּח אָדָם חַלּוֹנוֹתָיו לַחֲצַר הַשֻּׁתָּפִין. לָקַח בַּיִת בְּחָצֵר אַחֶרֶת — לֹא יִפְתָּחֶנָּה לַחֲצַר הַשֻּׁתָּפִין. בָּנָה עֲלִיָּה עַל גַּבֵּי בֵיתוֹ — לֹא יִפְתָּחֶנָּה לַחֲצַר הַשֻּׁתָּפִין, אֶלָּא אִם רָצָה — בּוֹנֶה אֶת הַחֶדֶר לִפְנִים מִבֵּיתוֹ, וּבוֹנֶה עֲלִיָּה עַל גַּבֵּי בֵיתוֹ, וּפוֹתְחָהּ לְתוֹךְ בֵּיתוֹ.  לֹא יִפְתַּח אָדָם לַחֲצַר הַשֻּׁתָּפִין פֶּתַח כְּנֶגֶד פֶּתַח וְחַלּוֹן כְּנֶגֶד חַלּוֹן. הָיָה קָטָן — לֹא יַעֲשֶׂנּוּ גָדוֹל; אֶחָד — לֹא יַעֲשֶׂנּוּ שְׁנַיִם. אֲבָל פּוֹתֵחַ הוּא לִרְשׁוּת הָרַבִּים פֶּתַח כְּנֶגֶד פֶּתַח וְחַלּוֹן כְּנֶגֶד חַלּוֹן. הָיָה קָטָן — עוֹשֶׂה אוֹתוֹ גָדוֹל; אֶחָד — עוֹשֶׂה אוֹתוֹ שְׁנַיִם.
A man may not open his windows onto a jointly owned courtyard. [If] he buys a house in another courtyard he may not open it onto a jointly owned courtyard. [If] he builds an attic above his house, he may not open it onto a jointly owned courtyard. However, if he wishes, he may build a room within his house, or build an attic above his house, and open it into his house.  A man may not open onto a jointly owned courtyard a doorway opposite another doorway or a window opposite another window. [If] it was small, he may not enlarge it; [if there was] one, he may not make it two. However, he may open onto the public domain a doorway opposite another doorway and a window opposite another window. [If] it was small, he may enlarge it; [if] there was one, he may make it two.