The style management bothers me, because it doesn't seem very declarative. We believe the style the application sets here is the one they want to restore, except we don't believe it about WS_POPUP | WS_SYSMENU? Why not?
This is about the implementation patch, right? The idea behind masking those style flags is to make sure we don't introduce unintended window style changes by picking up the flags we override in wined3d_swapchain_state_setup_fullscreen() -> fullscreen_style() (e.g. if the application didn't touch style). I don't know that's any better than just saving the current state as is. I'll check if it matters for the game, but I suspect the answer is no. The game didn't seem to be picky about window states, but it does expect to keep the window position it set while still in fullscreen.
I would be inclined to just leave it alone until we find something that cares. I'd rather keep the code as simple as possible in cases like this.