I just managed to make it work by releasing the window & context and re-creating them. I haven't tested it thoroughly, just wrote the code and it worked.
Obviously you should replace the windows code for getting the desktop resolution with something else.
In your loop:
if (window->KeyHit(Key::F)) {
window->Release();
context->Release();
if (fullscreen == false) {
RECT desktop;
const HWND hDesktop = GetDesktopWindow();
GetWindowRect(hDesktop, &desktop);
window = Leadwerks::Window::Create("Lands of nowhere", 0, 0, desktop.right, desktop.bottom, Window::FullScreen);
}
else {
window = Leadwerks::Window::Create("Lands of nowhere", 70, 70, 1024, 768);
}
context = Context::Create(window);
fullscreen = !fullscreen;
return true;
}