at the protocol level, see the _NET_WM_STATE property with an accompanying client message and a full-screen status flag. this is specified in the EWMH specification. for bonus points you can manually implement full-screen mode, if WM does not report support for an official hint, EWMH specifies a way to check what is supported. You can also grab the mouse pointer and / or if you do not want people to accidentally leave full screen mode.
or, to avoid learning about low-level chaos, just use SDL or GTK or Qt or something else, and they should all have a simple method call to switch full-screen mode.
source share