- /* save rows for when we "restore" back down again */
- pre_fs_rows = rows;
- pre_fs_cols = cols;
-
- GetWindowPlacement(hwnd, &old_wind_placement);
- SetWindowLong(hwnd, GWL_STYLE,
- GetWindowLong(hwnd, GWL_STYLE)
- & ~((cfg.scrollbar_in_fullscreen ? 0 : WS_VSCROLL)
- | WS_CAPTION | WS_BORDER | WS_THICKFRAME));
- /* become topmost */
- SetWindowPos(hwnd, HWND_TOP, x, y, cx, cy, SWP_FRAMECHANGED);
+ /* This seems to be needed otherwize explorer doesn't notice
+ * we want to go fullscreen and it's bar is still visible
+ */
+ SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
+ SWP_NOACTIVATE | SWP_NOCOPYBITS |
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
+ SWP_FRAMECHANGED);
+
+ wp.showCmd = SW_SHOWMAXIMIZED;
+ SetWindowPlacement(hwnd, &wp);