Changeset 3912

Show
Ignore:
Timestamp:
10/14/05 20:55:27 (3 years ago)
Author:
horiguti
Message:

Use IDC_ARROW instead of IDC_HAND on the systems that doesn't has
IDC_HAND like Windows 95/NT.
Support --fullscreen, --fullwidth, --fullheight.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/ChangeLog.Meadow

    r3911 r3912  
    99 
    1010        * mw32fns.c (mw32_init_app): Don't set window class cursor. 
     11        (x-create-frame): Load IDC_ARROW cursor when failed to load 
     12        IDC_HAND. Windows NT, 95 does not has IDC_HAND cursor. 
     13        (mw32_real_positions): New function imported from w32fns.c. 
     14        (mw32_check_fullscreen): New function imported from w32term.c. 
     15        (mw32_WndProc<WM_ACTIVATE>): New message handler. 
     16        (mw32_WndProc<WM_ACTIVATEAPP>): New message handler. 
    1117 
    12182005-10-14  Hideyuki SHIRAI  <shirai@meadowy.org> 
  • trunk/src/mw32fns.c

    r3911 r3912  
    154154    error ("Non-mw32 frame used"); 
    155155  return f; 
     156} 
     157 
     158 
     159/* Store the screen positions of frame F into XPTR and YPTR. 
     160   These are the positions of the containing window manager window, 
     161   not Emacs's own window.  */ 
     162 
     163void 
     164mw32_real_positions (f, xptr, yptr) 
     165     FRAME_PTR f; 
     166     int *xptr, *yptr; 
     167{ 
     168  POINT pt; 
     169  RECT rect; 
     170 
     171  GetClientRect((HWND)FRAME_MW32_WINDOW(f), &rect); 
     172  AdjustWindowRect(&rect, f->output_data.mw32->dwStyle, FRAME_EXTERNAL_MENU_BAR(f)); 
     173 
     174  pt.x = rect.left; 
     175  pt.y = rect.top; 
     176 
     177  ClientToScreen ((HWND)FRAME_MW32_WINDOW(f), &pt); 
     178 
     179  /* Remember x_pixels_diff and y_pixels_diff.  */ 
     180  f->x_pixels_diff = pt.x - rect.left; 
     181  f->y_pixels_diff = pt.y - rect.top; 
     182 
     183  *xptr = pt.x; 
     184  *yptr = pt.y; 
     185} 
     186 
     187/* Check if we need to resize the frame due to a fullscreen request. 
     188   If so needed, resize the frame. */ 
     189static void 
     190mw32_check_fullscreen (f) 
     191     struct frame *f; 
     192{ 
     193  if (f->want_fullscreen & FULLSCREEN_BOTH) 
     194    { 
     195      int width, height, ign; 
     196 
     197      mw32_real_positions (f, &f->left_pos, &f->top_pos); 
     198 
     199      x_fullscreen_adjust (f, &width, &height, &ign, &ign); 
     200 
     201      /* We do not need to move the window, it shall be taken care of 
     202         when setting WM manager hints.  */ 
     203      if (FRAME_COLS (f) != width || FRAME_LINES (f) != height) 
     204        { 
     205          change_frame_size (f, height, width, 0, 1, 0); 
     206          SET_FRAME_GARBAGED (f); 
     207          cancel_mouse_face (f); 
     208 
     209          /* Wait for the change of frame size to occur */ 
     210          f->want_fullscreen |= FULLSCREEN_WAIT; 
     211        } 
     212    } 
    156213} 
    157214 
     
    21532210    goto dflt; 
    21542211 
     2212  case WM_ACTIVATE: 
     2213  case WM_ACTIVATEAPP: 
     2214    mw32_check_fullscreen (f); 
     2215    break; 
     2216 
    21552217  case WM_CLOSE: 
    21562218    PostMessage (hwnd, WM_EMACS_DESTROY, wParam, lParam); 
     
    28532915  f->output_data.mw32->modeline_cursor 
    28542916    = mw32_load_cursor (IDC_SIZENS); 
    2855   f->output_data.mw32->hand_cursor 
    2856     = mw32_load_cursor (IDC_HAND); 
    28572917  f->output_data.mw32->hourglass_cursor 
    28582918    = mw32_load_cursor (IDC_WAIT); 
    28592919  f->output_data.mw32->horizontal_drag_cursor 
    28602920    = mw32_load_cursor (IDC_SIZEWE); 
     2921   
     2922  f->output_data.mw32->hand_cursor 
     2923    = mw32_load_cursor (IDC_HAND); 
     2924  if (f->output_data.mw32->hand_cursor == NULL) 
     2925    f->output_data.mw32->hand_cursor 
     2926      = mw32_load_cursor (IDC_ARROW); 
    28612927  
    28622928  f->output_data.mw32->current_cursor