(x_make_frame_invisible): Explicitly clear visible and
iconified flags, as well as the async flags.
(XTread_socket): Call XSetInputFocus.
(x_make_frame_invisible) [USE_X_TOOLKIT]: Use XtPopdown.
(XTread_socket): Call _XEditResCheckMessages only if HAVE_X11R5.
the frame's default font or not.
(XTread_socket): For UnmapNotify, use x_any_window_to_frame.
(x_set_offset): New arg CHANGE_GRAVITY.
(x_make_frame_visible): Pass new arg.
(x_wm_set_size_hint): Args spec_x and spec_y deleted.
(x_set_offset, x_set_window_size): Don't pass those args.
(x_destroy_window): Just clear out mouse_face... vars.
(x_wm_set_size_hint): Use win_gravity from frame.
(x_make_frame_visible): Call x_set_offset.
(x_iconify_frame): Likewise.
(pending_autoraise_frame): New variable.
(x_new_focus_frame): Don't autoraise here; just set that var.
(XTread_socket): Raise that frame here.
(x_destroy_window): Call clear_mouse_face if necessary.
(x_new_font): Always call x_set_window_size.
(x_wm_set_size_hint): If PROMPTING is 0,
copy the old win_gravity field.
If USPosition is set, don't set PWinGravity.
(x_wm_set_size_hint): If change_gravity is 0, just don't set the gravity.
(x_display_box_cursor): Explicitly clear full height of line.
(dumpglyphs): New arg just_foreground. Callers changed.
(x_set_window_size): Call XSync.
(note_mouse_highlight): Do nothing if buffer has changed.
Set mouse_face_deferred_gc when that case arise.
(XTframe_up_to_date): If mouse_face_deferred_gc, redo highlighting.
(show_mouse_face): Turn off cursor only if it's
in the area being manipulated.
(XTupdate_begin): Don't turn off highlight if we aren't updating
the window that it is in.
Use XSET when setting result->x and result->y.
(note_mouse_highlight): Use the value from sort_overlays.
Make the window's buffer current temporarily.
window_end_pos is relative to Z, not ZV.
(XTread_socket, MotionNotify and LeaveNotify cases):
If not in any frame, call clear_mouse_face.
(x_term_init): Set frame_up_to_date_hook.
(XTframe_up_to_date): New function.
(XTupdate_begin): Turn off mouse face display, and defer it.
(XTupdate_end): Undefer.
(mouse_face_defer): New variable.
(mouse_face_mouse_frame, mouse_face_mouse_x, mouse_face_mouse_y):
New variables.
(dumpglyphs): Handle HL = 3 by using mouse_face_face_id.
(note_mouse_movement): Check for mouse face.
(show_mouse_face, fast_find_position): New functions.
(clear_mouse_face): New functions.
(mouse_face_beg, mouse_face_end, mouse_face_face_id): New variables.
(mouse_face_window): New variable.
(syms_of_xterm): Init and staticpro it.
(construct_menu_click): Convert x pos from pixels to glyphs.
Move function after pixel_to_glyph_coords.
[!USE_X_TOOLKIT] (x_any_window_to_frame):
Define as x_window_to_frame.