As described here, current master does not allow a window to go into full screen when it is already maximized.
Blender has three window modes: minimized, normal, maximized, and fullscreen. Right now you can't get into fullscreen when you are currently maximized. If the window is maximized selecting Windows / Toggle fullscreen does not properly update the window caption and border.
This is just because I was overzealous when I was removing code. So this patch just restores a line (and associated comment) that was removed here. Basically a call to SetWindowPos() is needed after SetWindowLongPtr()
The Windows API documentation mentions this specific problem. In SetWindowLongA it says "Certain window data is cached, so changes you make using SetWindowLong will not take effect until you call the SetWindowPos function. Specifically, if you change any of the frame styles, you must call SetWindowPos with the SWP_FRAMECHANGED flag for the cache to be updated properly." There is a similar comment in SetWindowLongPtrW but it is a little more terse: "Certain window data is cached, so changes you make using SetWindowLongPtr will not take effect until you call the SetWindowPos function"