- switch (f->want_fullscreen)
- {
- case FULLSCREEN_MAXIMIZED:
- PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MAXIMIZE, 0);
- break;
- case FULLSCREEN_BOTH:
- height =
- FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixel_height)
- - XINT (Ftool_bar_lines_needed (selected_frame))
- + (NILP (Vmenu_bar_mode) ? 1 : 0);
- width =
- FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixel_width)
- - FRAME_SCROLL_BAR_COLS (f);
- left_pos = workarea_rect.left;
- top_pos = workarea_rect.top;
- break;
- case FULLSCREEN_WIDTH:
- width =
- FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixel_width)
- - FRAME_SCROLL_BAR_COLS (f);
- if (normal_height > 0)
- height = normal_height;
- left_pos = workarea_rect.left;
- break;
- case FULLSCREEN_HEIGHT:
- height =
- FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixel_height)
- - XINT (Ftool_bar_lines_needed (selected_frame))
- + (NILP (Vmenu_bar_mode) ? 1 : 0);
- if (normal_width > 0)
- width = normal_width;
- top_pos = workarea_rect.top;
- break;
- case FULLSCREEN_NONE:
- if (normal_height > 0)
- height = normal_height;
- else
- normal_height = height;
- if (normal_width > 0)
- width = normal_width;
- else
- normal_width = width;
- /* FIXME: Should restore the original position of the frame. */
- top_pos = left_pos = 0;
- break;
- }
+ if (FRAME_PREV_FSMODE (f) == FULLSCREEN_BOTH)
+ {
+ SetWindowLong (hwnd, GWL_STYLE, dwStyle | WS_OVERLAPPEDWINDOW);
+ SetWindowPos (hwnd, NULL, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
+ SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
+ }