stumpwm / mahogany

A stumpwm like Wayland compositor
GNU General Public License v2.0
220 stars 12 forks source link

Improve compositor shutdown and exception safety #27

Closed sdilts closed 1 year ago

sdilts commented 1 year ago

Add global variable and mahogany-state class to manage server state: while not ideal, it provides a way to access the state of the compositor as a whole, and it's better than a bunch of individual global variables. Marking it as a global insures that it can't be overwritten, and as a bonus is slightly faster to access.

Use this new class to properly teardown the server state in the event of a non-local exit from hrt-server-start.