Stomate pore size is regulated by internal water content of the plant. If the plant becomes stressed and loses turgor the stoma opening width is decreased or closed. This is a regulated response by the guard cells to control water loss from the plant.
The outer guard cell wall is flexible like a bow while the inner wall is inflexible like the bow string. Taught with water, the cell forces the bowed outer wall to pull the inner wall back. When water is low, and the plant begins to wilt, the two guard cells are a bit flaccid. They soften and partially fill the gap between them.
When water is truly limited the guard cell are limp and the pore is closed blocking any further loss of water. However this also blocks taking up CO2 and releasing O2 slowing or stopping photosynthesis.