Subject: bug#203: Maximized frames gets wrong size at startup; cursors

From: "Lennart Borgman" <[email-masked]>
Date: Sun, 27 Feb 2005 10:22:15 +0100

Hi Jason,

I did report a problem to the developers list about maximizing frames at
startup. They get the wrong size. I triead the following change

*** w32term.c

void
x_set_window_size (f, change_gravity, cols, rows)
     struct frame *f;
     int change_gravity;
     int cols, rows;
{
  int pixelwidth, pixelheight;
  {
    // This tries to avoid setting size if frame is maximized. Is this
correct??? Lennart B.
    WINDOWPLACEMENT wp;
    HWND hwnd;
    hwnd = FRAME_W32_WINDOW (f);
    wp.length = sizeof (WINDOWPLACEMENT);
    GetWindowPlacement (hwnd, &wp);
    if (wp.showCmd == SW_SHOWMAXIMIZED) return;
  }

  BLOCK_INPUT;

  check_frame_size (f, &rows, &cols);
... (the rest is unchanged)

This tests if the frame is maximized and then just exits x_set_window_size.
Maybe there is a better way to do this? I am not at all sure what
x_set_window_size does.

BTW I looked a bit at the code for cursors in w32. It seems to me a lot of
things have been done, but that hourglass cursors are not used on w32. I
suggest that the builtin hourglass cursor is used. What do you think of
that?

Best wishes,
Lennart