[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/macterm.c
From: |
YAMAMOTO Mitsuharu |
Subject: |
[Emacs-diffs] Changes to emacs/src/macterm.c |
Date: |
Fri, 15 Apr 2005 23:05:16 -0400 |
Index: emacs/src/macterm.c
diff -c emacs/src/macterm.c:1.109 emacs/src/macterm.c:1.110
*** emacs/src/macterm.c:1.109 Thu Apr 14 09:26:22 2005
--- emacs/src/macterm.c Sat Apr 16 03:05:15 2005
***************
*** 95,100 ****
--- 95,101 ----
: controlKey)
#define macAltKey (NILP (Vmac_command_key_is_meta) ? cmdKey : optionKey)
+ #define mac_window_to_frame(wp) (((mac_output *) GetWRefCon (wp))->mFP)
/* Non-nil means Emacs uses toolkit scroll bars. */
***************
*** 110,118 ****
static int any_help_event_p;
! /* Non-zero means autoselect window with the mouse cursor. */
!
! int x_autoselect_window_p;
/* Non-zero means make use of UNDERLINE_POSITION font properties. */
--- 111,118 ----
static int any_help_event_p;
! /* Last window where we saw the mouse. Used by mouse-autoselect-window. */
! static Lisp_Object last_window;
/* Non-zero means make use of UNDERLINE_POSITION font properties. */
***************
*** 273,286 ****
static int x_compute_min_glyph_bounds P_ ((struct frame *));
static void x_update_end P_ ((struct frame *));
static void XTframe_up_to_date P_ ((struct frame *));
- static void XTreassert_line_highlight P_ ((int, int));
- static void x_change_line_highlight P_ ((int, int, int, int));
static void XTset_terminal_modes P_ ((void));
static void XTreset_terminal_modes P_ ((void));
static void x_clear_frame P_ ((void));
static void frame_highlight P_ ((struct frame *));
static void frame_unhighlight P_ ((struct frame *));
static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *));
static void XTframe_rehighlight P_ ((struct frame *));
static void x_frame_rehighlight P_ ((struct x_display_info *));
static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *));
--- 273,288 ----
static int x_compute_min_glyph_bounds P_ ((struct frame *));
static void x_update_end P_ ((struct frame *));
static void XTframe_up_to_date P_ ((struct frame *));
static void XTset_terminal_modes P_ ((void));
static void XTreset_terminal_modes P_ ((void));
static void x_clear_frame P_ ((void));
static void frame_highlight P_ ((struct frame *));
static void frame_unhighlight P_ ((struct frame *));
static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *));
+ static void mac_focus_changed P_ ((int, struct mac_display_info *,
+ struct frame *, struct input_event *));
+ static void x_detect_focus_change P_ ((struct mac_display_info *,
+ EventRecord *, struct input_event *));
static void XTframe_rehighlight P_ ((struct frame *));
static void x_frame_rehighlight P_ ((struct x_display_info *));
static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *));
***************
*** 1198,1212 ****
}
- static void
- XTextExtents16 (XFontStruct *font, XChar2b *text, int nchars,
- int *direction,int *font_ascent,
- int *font_descent, XCharStruct *cs)
- {
- /* MAC_TODO: Use GetTextMetrics to do this and inline it below. */
- }
-
-
/* x_sync is a no-op on Mac. */
void
x_sync (f)
--- 1200,1205 ----
***************
*** 3494,3499 ****
--- 3487,3500 ----
frame_highlight (f)
struct frame *f;
{
+ OSErr err;
+ ControlRef root_control;
+
+ BLOCK_INPUT;
+ err = GetRootControl (FRAME_MAC_WINDOW (f), &root_control);
+ if (err == noErr)
+ ActivateControl (root_control);
+ UNBLOCK_INPUT;
x_update_cursor (f, 1);
}
***************
*** 3501,3506 ****
--- 3502,3515 ----
frame_unhighlight (f)
struct frame *f;
{
+ OSErr err;
+ ControlRef root_control;
+
+ BLOCK_INPUT;
+ err = GetRootControl (FRAME_MAC_WINDOW (f), &root_control);
+ if (err == noErr)
+ DeactivateControl (root_control);
+ UNBLOCK_INPUT;
x_update_cursor (f, 1);
}
***************
*** 3543,3548 ****
--- 3552,3619 ----
x_frame_rehighlight (dpyinfo);
}
+ /* Handle FocusIn and FocusOut state changes for FRAME.
+ If FRAME has focus and there exists more than one frame, puts
+ a FOCUS_IN_EVENT into *BUFP. */
+
+ static void
+ mac_focus_changed (type, dpyinfo, frame, bufp)
+ int type;
+ struct mac_display_info *dpyinfo;
+ struct frame *frame;
+ struct input_event *bufp;
+ {
+ if (type == activeFlag)
+ {
+ if (dpyinfo->x_focus_event_frame != frame)
+ {
+ x_new_focus_frame (dpyinfo, frame);
+ dpyinfo->x_focus_event_frame = frame;
+
+ /* Don't stop displaying the initial startup message
+ for a switch-frame event we don't need. */
+ if (GC_NILP (Vterminal_frame)
+ && GC_CONSP (Vframe_list)
+ && !GC_NILP (XCDR (Vframe_list)))
+ {
+ bufp->kind = FOCUS_IN_EVENT;
+ XSETFRAME (bufp->frame_or_window, frame);
+ }
+ }
+ }
+ else
+ {
+ if (dpyinfo->x_focus_event_frame == frame)
+ {
+ dpyinfo->x_focus_event_frame = 0;
+ x_new_focus_frame (dpyinfo, 0);
+ }
+ }
+ }
+
+ /* The focus may have changed. Figure out if it is a real focus change,
+ by checking both FocusIn/Out and Enter/LeaveNotify events.
+
+ Returns FOCUS_IN_EVENT event in *BUFP. */
+
+ static void
+ x_detect_focus_change (dpyinfo, event, bufp)
+ struct mac_display_info *dpyinfo;
+ EventRecord *event;
+ struct input_event *bufp;
+ {
+ struct frame *frame;
+
+ frame = mac_window_to_frame ((WindowPtr) event->message);
+ if (! frame)
+ return;
+
+ /* On Mac, this is only called from focus events, so no switch needed. */
+ mac_focus_changed ((event->modifiers & activeFlag),
+ dpyinfo, frame, bufp);
+ }
+
+
/* Handle an event saying the mouse has moved out of an Emacs frame. */
void
***************
*** 3980,4004 ****
}
! static WindowPtr
! front_emacs_window ()
{
! #if TARGET_API_MAC_CARBON
! WindowPtr wp = GetFrontWindowOfClass (kDocumentWindowClass, true);
!
! while (wp && !is_emacs_window (wp))
! wp = GetNextWindowOfClass (wp, kDocumentWindowClass, true);
! #else
! WindowPtr wp = FrontWindow ();
!
! while (wp && (wp == tip_window || !is_emacs_window (wp)))
! wp = GetNextWindow (wp);
! #endif
!
! return wp;
}
- #define mac_window_to_frame(wp) (((mac_output *) GetWRefCon (wp))->mFP)
/* Return the current position of the mouse.
*fp should be a frame which indicates which display to ask about.
--- 4051,4069 ----
}
! static struct frame *
! mac_focus_frame (dpyinfo)
! struct mac_display_info *dpyinfo;
{
! if (dpyinfo->x_focus_frame)
! return dpyinfo->x_focus_frame;
! else
! /* Mac version may get events, such as a menu bar click, even when
! all the frames are invisible. In this case, we regard the
! event came to the selected frame. */
! return SELECTED_FRAME ();
}
/* Return the current position of the mouse.
*fp should be a frame which indicates which display to ask about.
***************
*** 4031,4043 ****
{
Point mouse_pos;
int ignore1, ignore2;
! WindowPtr wp = front_emacs_window ();
! struct frame *f;
Lisp_Object frame, tail;
- if (is_emacs_window(wp))
- f = mac_window_to_frame (wp);
-
BLOCK_INPUT;
if (! NILP (last_mouse_scroll_bar) && insist == 0)
--- 4096,4105 ----
{
Point mouse_pos;
int ignore1, ignore2;
! struct frame *f = mac_focus_frame (FRAME_MAC_DISPLAY_INFO (*fp));
! WindowPtr wp = FRAME_MAC_WINDOW (f);
Lisp_Object frame, tail;
BLOCK_INPUT;
if (! NILP (last_mouse_scroll_bar) && insist == 0)
***************
*** 4604,4610 ****
unsigned long *time;
{
struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar);
! WindowPtr wp = front_emacs_window ();
Point mouse_pos;
struct frame *f = mac_window_to_frame (wp);
int win_y, top_range;
--- 4666,4677 ----
unsigned long *time;
{
struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar);
! ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar);
! #if TARGET_API_MAC_CARBON
! WindowPtr wp = GetControlOwner (ch);
! #else
! WindowPtr wp = (*ch)->contrlOwner;
! #endif
Point mouse_pos;
struct frame *f = mac_window_to_frame (wp);
int win_y, top_range;
***************
*** 5050,5056 ****
return Qnil;
/* Since x_new_font doesn't update any fontset information, do it now. */
! FRAME_FONTSET(f) = fontset;
return build_string (fontsetname);
}
--- 5117,5123 ----
return Qnil;
/* Since x_new_font doesn't update any fontset information, do it now. */
! FRAME_FONTSET (f) = fontset;
return build_string (fontsetname);
}
***************
*** 5498,5503 ****
--- 5565,5577 ----
BLOCK_INPUT;
+ /* Before unmapping the window, update the WM_SIZE_HINTS property to claim
+ that the current position of the window is user-specified, rather than
+ program-specified, so that when the window is mapped again, it will be
+ placed at the same location, without forcing the user to position it
+ by hand again (they have already done that once for this window.) */
+ x_wm_set_size_hint (f, (long) 0, 1);
+
HideWindow (FRAME_MAC_WINDOW (f));
/* We can't distinguish this from iconification
***************
*** 7454,7474 ****
{
/* Window-activate events will do the job. */
#if 0
- WindowPtr wp;
- struct frame *f;
-
- wp = front_emacs_window ();
- if (wp)
- {
- f = mac_window_to_frame (wp);
-
- if (f)
- {
- x_new_focus_frame (FRAME_MAC_DISPLAY_INFO (f), f);
- activate_scroll_bars (f);
- }
- }
-
app_is_suspended = false;
app_sleep_time = WNE_SLEEP_AT_RESUME;
#endif
--- 7528,7533 ----
***************
*** 7479,7499 ****
{
/* Window-deactivate events will do the job. */
#if 0
- WindowPtr wp;
- struct frame *f;
-
- wp = front_emacs_window ();
- if (wp)
- {
- f = mac_window_to_frame (wp);
-
- if (f == FRAME_MAC_DISPLAY_INFO (f)->x_focus_frame)
- {
- x_new_focus_frame (FRAME_MAC_DISPLAY_INFO (f), 0);
- deactivate_scroll_bars (f);
- }
- }
-
app_is_suspended = true;
app_sleep_time = WNE_SLEEP_AT_SUSPEND;
#endif
--- 7538,7543 ----
***************
*** 7501,7540 ****
static void
- do_mouse_moved (mouse_pos, f)
- Point mouse_pos;
- FRAME_PTR *f;
- {
- WindowPtr wp = front_emacs_window ();
- struct x_display_info *dpyinfo;
-
- if (wp)
- {
- *f = mac_window_to_frame (wp);
- dpyinfo = FRAME_MAC_DISPLAY_INFO (*f);
-
- if (dpyinfo->mouse_face_hidden)
- {
- dpyinfo->mouse_face_hidden = 0;
- clear_mouse_face (dpyinfo);
- }
-
- SetPortWindowPort (wp);
-
- GlobalToLocal (&mouse_pos);
-
- if (dpyinfo->grabbed && tracked_scroll_bar)
- x_scroll_bar_note_movement (tracked_scroll_bar,
- mouse_pos.v
- - XINT (tracked_scroll_bar->top),
- TickCount() * (1000 / 60));
- else
- note_mouse_movement (*f, &mouse_pos);
- }
- }
-
-
- static void
do_apple_menu (SInt16 menu_item)
{
#if !TARGET_API_MAC_CARBON
--- 7545,7550 ----
***************
*** 7570,7576 ****
default:
{
! struct frame *f = mac_window_to_frame (front_emacs_window ());
MenuHandle menu = GetMenuHandle (menu_id);
if (menu)
{
--- 7580,7586 ----
default:
{
! struct frame *f = mac_focus_frame (&one_mac_display_info);
MenuHandle menu = GetMenuHandle (menu_id);
if (menu)
{
***************
*** 7648,7660 ****
Point top_left;
int w_title_height, columns, rows, width, height;
struct frame *f = mac_window_to_frame (w);
#if TARGET_API_MAC_CARBON
{
Point standard_size;
standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS);
! standard_size.v = FRAME_MAC_DISPLAY_INFO (f)->height;
if (IsWindowInStandardState (w, &standard_size, &zoom_rect))
zoom_in_or_out = inZoomIn;
--- 7658,7671 ----
Point top_left;
int w_title_height, columns, rows, width, height;
struct frame *f = mac_window_to_frame (w);
+ struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f);
#if TARGET_API_MAC_CARBON
{
Point standard_size;
standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS);
! standard_size.v = dpyinfo->height;
if (IsWindowInStandardState (w, &standard_size, &zoom_rect))
zoom_in_or_out = inZoomIn;
***************
*** 7710,7716 ****
= zoom_rect;
}
! ZoomWindow (w, zoom_in_or_out, w == front_emacs_window ());
SetPort (save_port);
#endif /* not TARGET_API_MAC_CARBON */
--- 7721,7727 ----
= zoom_rect;
}
! ZoomWindow (w, zoom_in_or_out, f == mac_focus_frame (dpyinfo));
SetPort (save_port);
#endif /* not TARGET_API_MAC_CARBON */
***************
*** 8576,8585 ****
{
SInt32 delta;
Point point;
! WindowPtr window_ptr = front_emacs_window ();
! if (!IsValidWindowPtr (window_ptr))
{
SysBeep(1);
break;
}
--- 8587,8599 ----
{
SInt32 delta;
Point point;
! struct frame *f = mac_focus_frame (dpyinfo);
! WindowPtr window_ptr;
! if (!f)
{
+ /* Beep if wheel move occurs when all the frames
+ are invisible. */
SysBeep(1);
break;
}
***************
*** 8595,8600 ****
--- 8609,8615 ----
inev.modifiers = (mac_event_to_emacs_modifiers (eventRef)
| ((delta < 0) ? down_modifier
: up_modifier));
+ window_ptr = FRAME_MAC_WINDOW (f);
SetPortWindowPort (window_ptr);
GlobalToLocal (&point);
XSETINT (inev.x, point.h);
***************
*** 8653,8666 ****
switch (part_code)
{
case inMenuBar:
! f = mac_window_to_frame (front_emacs_window ());
saved_menu_event_location = er.where;
inev.kind = MENU_BAR_ACTIVATE_EVENT;
XSETFRAME (inev.frame_or_window, f);
break;
case inContent:
! if (window_ptr != front_emacs_window ())
SelectWindow (window_ptr);
else
{
--- 8668,8681 ----
switch (part_code)
{
case inMenuBar:
! f = mac_focus_frame (dpyinfo);
saved_menu_event_location = er.where;
inev.kind = MENU_BAR_ACTIVATE_EVENT;
XSETFRAME (inev.frame_or_window, f);
break;
case inContent:
! if (window_ptr != FRAME_MAC_WINDOW (mac_focus_frame (dpyinfo)))
SelectWindow (window_ptr);
else
{
***************
*** 8851,8857 ****
help_echo_string = help_echo_object = help_echo_window = Qnil;
help_echo_pos = -1;
! do_mouse_moved (er.where, &f);
/* If the contents of the global variable
help_echo_string has changed, generate a
--- 8866,8926 ----
help_echo_string = help_echo_object = help_echo_window = Qnil;
help_echo_pos = -1;
! if (dpyinfo->grabbed && last_mouse_frame
! && FRAME_LIVE_P (last_mouse_frame))
! f = last_mouse_frame;
! else
! f = dpyinfo->x_focus_frame;
!
! if (dpyinfo->mouse_face_hidden)
! {
! dpyinfo->mouse_face_hidden = 0;
! clear_mouse_face (dpyinfo);
! }
!
! if (f)
! {
! WindowPtr wp = FRAME_MAC_WINDOW (f);
! Point mouse_pos = er.where;
!
! SetPortWindowPort (wp);
!
! GlobalToLocal (&mouse_pos);
!
! if (dpyinfo->grabbed && tracked_scroll_bar)
! x_scroll_bar_note_movement (tracked_scroll_bar,
! mouse_pos.v
! - XINT
(tracked_scroll_bar->top),
! TickCount() * (1000 / 60));
! else
! {
! /* Generate SELECT_WINDOW_EVENTs when needed. */
! if (mouse_autoselect_window)
! {
! Lisp_Object window;
!
! window = window_from_coordinates (f,
! mouse_pos.h,
! mouse_pos.v,
! 0, 0, 0, 0);
!
! /* Window will be selected only when it is
! not selected now and last mouse movement
! event was not in it. Minibuffer window
! will be selected iff it is active. */
! if (WINDOWP (window)
! && !EQ (window, last_window)
! && !EQ (window, selected_window))
! {
! inev.kind = SELECT_WINDOW_EVENT;
! inev.frame_or_window = window;
! }
!
! last_window=window;
! }
! note_mouse_movement (f, &mouse_pos);
! }
! }
/* If the contents of the global variable
help_echo_string has changed, generate a
***************
*** 8865,8871 ****
case activateEvt:
{
WindowPtr window_ptr = (WindowPtr) er.message;
- ControlRef root_control;
#if USE_CARBON_EVENTS
if (SendEventToEventTarget (eventRef, toolbox_dispatcher)
--- 8934,8939 ----
***************
*** 8881,8896 ****
if (!is_emacs_window (window_ptr))
break;
- f = mac_window_to_frame (window_ptr);
- GetRootControl (window_ptr, &root_control);
-
if ((er.modifiers & activeFlag) != 0)
{
/* A window has been activated */
Point mouse_loc = er.where;
! x_new_focus_frame (dpyinfo, f);
! ActivateControl (root_control);
SetPortWindowPort (window_ptr);
GlobalToLocal (&mouse_loc);
--- 8949,8960 ----
if (!is_emacs_window (window_ptr))
break;
if ((er.modifiers & activeFlag) != 0)
{
/* A window has been activated */
Point mouse_loc = er.where;
! x_detect_focus_change (dpyinfo, &er, &inev);
SetPortWindowPort (window_ptr);
GlobalToLocal (&mouse_loc);
***************
*** 8904,8916 ****
/* A window has been deactivated */
dpyinfo->grabbed = 0;
! if (f == dpyinfo->x_focus_frame)
! {
! x_new_focus_frame (dpyinfo, 0);
! DeactivateControl (root_control);
! }
!
if (f == dpyinfo->mouse_face_mouse_frame)
{
/* If we move outside the frame, then we're
--- 8968,8976 ----
/* A window has been deactivated */
dpyinfo->grabbed = 0;
! x_detect_focus_change (dpyinfo, &er, &inev);
+ f = mac_window_to_frame (window_ptr);
if (f == dpyinfo->mouse_face_mouse_frame)
{
/* If we move outside the frame, then we're
***************
*** 8951,8963 ****
break;
#endif
! #if TARGET_API_MAC_CARBON
! if (!IsValidWindowPtr (front_emacs_window ()))
{
SysBeep (1);
break;
}
! #endif
{
static SInt16 last_key_script = -1;
SInt16 current_key_script = GetScriptManagerVariable
(smKeyScript);
--- 9011,9024 ----
break;
#endif
! if (dpyinfo->x_focus_frame == NULL)
{
+ /* Beep if keyboard input occurs when all the frames
+ are invisible. */
SysBeep (1);
break;
}
!
{
static SInt16 last_key_script = -1;
SInt16 current_key_script = GetScriptManagerVariable
(smKeyScript);
***************
*** 8965,8971 ****
if (last_key_script != current_key_script)
{
struct input_event event;
!
EVENT_INIT (event);
event.kind = LANGUAGE_CHANGE_EVENT;
event.arg = Qnil;
--- 9026,9032 ----
if (last_key_script != current_key_script)
{
struct input_event event;
!
EVENT_INIT (event);
event.kind = LANGUAGE_CHANGE_EVENT;
event.arg = Qnil;
***************
*** 9009,9026 ****
unsigned long some_state = 0;
inev.code = KeyTranslate (kchr_ptr, new_keycode,
&some_state) & 0xff;
! } else if (!NILP(Vmac_option_modifier) && (er.modifiers &
optionKey))
! {
! /* When using the option key as an emacs modifier, convert
! the pressed key code back to one without the Mac option
! modifier applied. */
! int new_modifiers = er.modifiers & ~optionKey;
! int new_keycode = keycode | new_modifiers;
! Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache);
! unsigned long some_state = 0;
! inev.code = KeyTranslate (kchr_ptr, new_keycode,
! &some_state) & 0xff;
! }
else
inev.code = er.message & charCodeMask;
inev.kind = ASCII_KEYSTROKE_EVENT;
--- 9070,9089 ----
unsigned long some_state = 0;
inev.code = KeyTranslate (kchr_ptr, new_keycode,
&some_state) & 0xff;
! }
! else if (!NILP (Vmac_option_modifier)
! && (er.modifiers & optionKey))
! {
! /* When using the option key as an emacs modifier,
! convert the pressed key code back to one
! without the Mac option modifier applied. */
! int new_modifiers = er.modifiers & ~optionKey;
! int new_keycode = keycode | new_modifiers;
! Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache);
! unsigned long some_state = 0;
! inev.code = KeyTranslate (kchr_ptr, new_keycode,
! &some_state) & 0xff;
! }
else
inev.code = er.message & charCodeMask;
inev.kind = ASCII_KEYSTROKE_EVENT;
***************
*** 9032,9039 ****
#else
inev.modifiers = mac_to_emacs_modifiers (er.modifiers);
#endif
! XSETFRAME (inev.frame_or_window,
! mac_window_to_frame (front_emacs_window ()));
inev.timestamp = er.when * (1000 / 60); /* ticks to milliseconds */
break;
--- 9095,9101 ----
#else
inev.modifiers = mac_to_emacs_modifiers (er.modifiers);
#endif
! XSETFRAME (inev.frame_or_window, mac_focus_frame (dpyinfo));
inev.timestamp = er.when * (1000 / 60); /* ticks to milliseconds */
break;
***************
*** 9046,9067 ****
constuct_drag_n_drop in w32term.c. */
if (!NILP (drag_and_drop_file_list))
{
! struct frame *f = NULL;
WindowPtr wp;
Lisp_Object frame;
- wp = front_emacs_window ();
-
- if (!wp)
- {
- struct frame *f = XFRAME (XCAR (Vframe_list));
- CollapseWindow (FRAME_MAC_WINDOW (f), false);
- wp = front_emacs_window ();
- }
-
- if (wp)
- f = mac_window_to_frame (wp);
-
inev.kind = DRAG_N_DROP_EVENT;
inev.code = 0;
inev.timestamp = er.when * (1000 / 60);
--- 9108,9117 ----
constuct_drag_n_drop in w32term.c. */
if (!NILP (drag_and_drop_file_list))
{
! struct frame *f = mac_focus_frame (dpyinfo);
WindowPtr wp;
Lisp_Object frame;
inev.kind = DRAG_N_DROP_EVENT;
inev.code = 0;
inev.timestamp = er.when * (1000 / 60);
***************
*** 9078,9087 ****
--- 9128,9139 ----
XSETFRAME (frame, f);
inev.frame_or_window = Fcons (frame, drag_and_drop_file_list);
+ #if 0
/* Regardless of whether Emacs was suspended or in the
foreground, ask it to redraw its entire screen.
Otherwise parts of the screen can be left in an
inconsistent state. */
+ wp = FRAME_MAC_WINDOW (f);
if (wp)
#if TARGET_API_MAC_CARBON
{
***************
*** 9093,9098 ****
--- 9145,9151 ----
#else /* not TARGET_API_MAC_CARBON */
InvalRect (&(wp->portRect));
#endif /* not TARGET_API_MAC_CARBON */
+ #endif
}
default:
break;
***************
*** 9572,9578 ****
e.arg = Qnil;
e.modifiers = NULL;
e.timestamp = EventTimeToTicks (GetEventTime (event)) * (1000/60);
! XSETFRAME (e.frame_or_window, mac_window_to_frame (front_emacs_window
()));
/* Remove event from queue to prevent looping. */
RemoveEventFromQueue (GetMainEventQueue (), event);
ReleaseEvent (event);
--- 9625,9631 ----
e.arg = Qnil;
e.modifiers = NULL;
e.timestamp = EventTimeToTicks (GetEventTime (event)) * (1000/60);
! XSETFRAME (e.frame_or_window, mac_focus_frame (&one_mac_display_info));
/* Remove event from queue to prevent looping. */
RemoveEventFromQueue (GetMainEventQueue (), event);
ReleaseEvent (event);
***************
*** 9765,9774 ****
Qeuc_kr = intern ("euc-kr");
staticpro (&Qeuc_kr);
- DEFVAR_BOOL ("x-autoselect-window", &x_autoselect_window_p,
- doc: /* *Non-nil means autoselect window with mouse pointer. */);
- x_autoselect_window_p = 0;
-
DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
doc: /* If not nil, Emacs uses toolkit scroll bars. */);
Vx_toolkit_scroll_bars = Qt;
--- 9818,9823 ----
- [Emacs-diffs] Changes to emacs/src/macterm.c, YAMAMOTO Mitsuharu, 2005/04/12
- [Emacs-diffs] Changes to emacs/src/macterm.c, Steven Tamm, 2005/04/14
- [Emacs-diffs] Changes to emacs/src/macterm.c, YAMAMOTO Mitsuharu, 2005/04/14
- [Emacs-diffs] Changes to emacs/src/macterm.c,
YAMAMOTO Mitsuharu <=
- [Emacs-diffs] Changes to emacs/src/macterm.c, YAMAMOTO Mitsuharu, 2005/04/18
- [Emacs-diffs] Changes to emacs/src/macterm.c, YAMAMOTO Mitsuharu, 2005/04/19
- [Emacs-diffs] Changes to emacs/src/macterm.c, YAMAMOTO Mitsuharu, 2005/04/24