Changeset 3935

Show
Ignore:
Timestamp:
10/29/05 02:52:19 (3 years ago)
Author:
horiguti
Message:

Prevent the title bar from overlapping with the task bar at the top of
the screen on creating frame.
Suppress the warning messages.

Files:

Legend:

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

    r3931 r3935  
     12005-10-28  Kyotaro HORIGUCHI  <horiguti@meadowy.org> 
     2 
     3        * mw32term.c (mw32-get-window-position): New lisp function. 
     4        (mw32_update_frame_alpha): Cast the parameter to suppress the 
     5        warning. 
     6 
     7        * mw32fns.c (mw32m_create_frame_window): Prevent the title bar 
     8        from overlapping with the task bar at the top of the screen on 
     9        creating frame. 
     10        (mw32_WndProc<WM_EMACS_UPDATE_ALPHA>): Cast the parameter to 
     11        suppress the warning. 
     12         
    1132005-10-26  Kyotaro HORIGUCHI  <horiguti@meadowy.org> 
    214 
  • trunk/src/mw32fns.c

    r3931 r3935  
    15031503{ 
    15041504  HWND hwnd; 
     1505  RECT rc; 
     1506 
     1507  /* Prevent the title bar from overlapping with the task bar at the 
     1508     top of the screen on creating frame. */ 
     1509  hwnd = FindWindow (TEXT ("Shell_TrayWnd"), NULL); 
     1510  if (hwnd 
     1511      && GetWindowRect (hwnd, &rc) && rc.top <= 0 && rc.bottom > f->top_pos) 
     1512    f->top_pos = rc.bottom; 
    15051513 
    15061514  hwnd = CreateWindowEx (f->output_data.mw32->dwStyleEx, 
     
    26422650  case WM_EMACS_UPDATE_ALPHA: 
    26432651    { 
    2644       mw32_update_frame_alpha (wParam); 
     2652      mw32_update_frame_alpha ((struct frame *)wParam); 
    26452653      break; 
    26462654    } 
  • trunk/src/mw32term.c

    r3931 r3935  
    714714    { 
    715715      POST_INFORM_MESSAGE (FRAME_MW32_WINDOW (f), 
    716                            WM_EMACS_UPDATE_ALPHA, f, 0); 
     716                           WM_EMACS_UPDATE_ALPHA, (WPARAM)f, 0); 
    717717      return; 
    718718    }    
     
    35973597} 
    35983598 
     3599DEFUN ("mw32-get-window-position", Fmw32_get_window_position, 
     3600       Smw32_get_window_position, 0, 2, 0, 
     3601       doc: /* Get the window position in screen coordinates. 
     3602CLASS-NAME is the window class name and WINDOW-NAME is the window's title. 
     3603Returns the dimensions as (LEFT TOP RIGHT BOTTOM) in screen coordinates, 
     3604or nil if specified window is not found, or failed to get the position. */) 
     3605  (class_name, window_name) 
     3606{ 
     3607  HWND hwnd; 
     3608  RECT rc; 
     3609  char *classname = NULL; 
     3610  char *windowname = NULL; 
     3611   
     3612  if (STRINGP (class_name)) 
     3613    classname = SDATA (class_name); 
     3614   
     3615  if (STRINGP (window_name)) 
     3616    windowname = SDATA (window_name); 
     3617     
     3618  hwnd = FindWindow (classname, windowname); 
     3619  if (hwnd == NULL) return Qnil; 
     3620   
     3621  if (! GetWindowRect (hwnd, &rc)) return Qnil; 
     3622 
     3623  return Fcons (make_number (rc.left), 
     3624                Fcons (make_number (rc.top), 
     3625                       Fcons (make_number (rc.right), 
     3626                              Fcons (make_number (rc.bottom), 
     3627                                     Qnil)))); 
     3628} 
     3629 
     3630 
    35993631DEFUN ("mw32-get-scroll-bar-info", Fmw32_get_scroll_bar_info, 
    36003632       Smw32_get_scroll_bar_info, 0, 1, 0, 
     
    68366868  mw32_rbutton_to_emacs_button = 1; 
    68376869 
     6870  defsubr (&Smw32_get_window_position); 
    68386871  defsubr (&Smw32_get_scroll_bar_info); 
    68396872  defsubr (&Sw32_get_system_metrics);