The sugya discusses windows and openings in the context of placing a lamp near a window and the practical visibility/light issues of Shabbat observance.
מַתְנִי׳ לֹא יֵצֵא הַחַיָּיט בְּמַחֲטוֹ סָמוּךְ לַחֲשֵׁכָה, שֶׁמָּא יִשְׁכַּח וְיֵצֵא. וְלֹא הַלַּבְלָר בְּקוּלְמוֹסוֹ. וְלֹא יְפַלֶּה אֶת כֵּלָיו, וְלֹא יִקְרָא לְאוֹר הַנֵּר. בֶּאֱמֶת אָמְרוּ, הַחַזָּן רוֹאֶה הֵיכָן תִּינוֹקוֹת קוֹרְאִין, אֲבָל הוּא לֹא יִקְרָא. כַּיּוֹצֵא בוֹ: לֹא יֹאכַל הַזָּב עִם הַזָּבָה, מִפְּנֵי הֶרְגֵּל עֲבֵירָה.
MISHNA: This mishna deals with various decrees, especially with regard to the halakhot of Shabbat, which were issued in order to distance a person from transgressions that he is liable to commit through habit and routine. The mishna said: The tailor may not go out with his needle adjacent to nightfall on Shabbat eve, lest he forget that he is carrying the needle and go out with it to the public domain even after Shabbat begins. And, similarly, the scribe [lavlar] may not go out with his quill[kulmos] for the same reason. And one may not shake his clothes on Shabbat to rid them of lice; and one may not read a book by candlelight, so that he will not come to adjust the wick of the lamp. However, in truth they said an established halakha: The attendant sees where in the book the children under his supervision are reading in the Torah, even by candlelight on Shabbat. However, he himself may not read. Similarly, the Sages issued a similar decree with regard to other halakhot, as they said: The zav may not eat even with his wife the zava, despite the fact that they are both ritually impure, because, by eating together, they will come to excessive intimacy and become accustomed to sin.