Open emmamai opened 8 years ago
Looks like it's accomplished by a WM_DELETE_WINDOW atom.
Drawing the button normally is complete. Still need to detect when it's been clicked, and set the wm's internal mode to a new "close" state. Change the appearance of the button if and only if the mouse is over it and the wm is in the "close" state. On release, if and only if the mouse is over the close button, set the WM_DELETE_WINDOW atom for the client window.
Figure out how apps expect the window manager to let them know the close button was pressed. Then make this do that.