1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-23 10:34:07 +00:00
Commit Graph

570 Commits

Author SHA1 Message Date
Karl Heuer
7c3c78a3c8 (x_calc_absolute_position): Cast argument to XFree, in
case it was prototyped the old way.
1998-08-26 20:29:59 +00:00
Kenichi Handa
6f6512e8c0 (x_list_fonts): Work-around for the case XGetAtomName
returns a null string.  This happens when dxpc 3.7 is being used.
1998-08-25 03:59:40 +00:00
Richard M. Stallman
e3c55541bd x_display_unibyte_char_with_fontset renamed to
unibyte_display_via_language_environment.
1998-08-15 23:00:07 +00:00
Kenichi Handa
ab29c43b51 (dumpglyphs): If x_display_unibyte_char_with_fontset is
nonzero, convert a unibyte 8-bit char to a multibyte char and
display it by a font listed in the current fontset.
1998-08-15 01:28:14 +00:00
Richard M. Stallman
036bad88d8 (x_term_init): Don't reset LC_TIME to "C", since we
want strftime to be localized.
1998-08-08 22:11:22 +00:00
Richard M. Stallman
a083fd237d (x_list_fonts): Fix previous change. 1998-08-08 02:39:50 +00:00
Richard M. Stallman
2745e6c4cd (x_list_fonts): Call XFreeFont after the new call to XLoadQueryFont.
(fast_find_position): Handle case where position is before
an invisible character, thus not actually listed in charstarts.

(x_make_frame_visible): Use XGetGeometry to see if
position has been changed by the window manager.  Use
FRAME_OUTER_WINDOW.
1998-08-05 01:42:24 +00:00
Kenichi Handa
9dfb82d5cc (dumpglyphs): After calling ccl_driver, set cp->byte1 to
zero for 1-byte font.
1998-07-19 05:17:35 +00:00
Richard M. Stallman
16f06ce000 (x_list_fonts): Fix prev change: cast result of alloca. 1998-06-27 04:52:31 +00:00
Karl Heuer
01c752b506 (x_list_fonts): Keep alloca usage simple. 1998-06-20 22:17:48 +00:00
Kenichi Handa
a9a5b0a53c (dumpglyphs): Check the case that FACE_FONT (face) is
NULL.  While displaing cursor with non-default face, if the
variable `font' is NULL, don't set GCFont.
1998-06-20 03:01:00 +00:00
Kenichi Handa
09c6077fa6 (x_list_fonts): If SIZE is zero and MAXNAMES is 1, use
XLoadQueryFont instead of XListFonts.
(x_load_fonts): Call x_list_fonts with MAXNAMES 1.
1998-06-16 07:32:05 +00:00
Richard M. Stallman
852bff8fd8 (XTread_socket): Accept Japanese XK keysyms. 1998-06-09 01:55:49 +00:00
Richard M. Stallman
c99babf20d (XTread_socket): Fix second argument of x_any_window_to_frame. 1998-05-25 16:03:58 +00:00
Andreas Schwab
ae79c227e8 Include syssignal.h after lisp.h. 1998-05-04 09:25:21 +00:00
Richard M. Stallman
dbcb258a89 (XTwrite_glyphs): Don't advance cursor X beyond limit.
(XTcursor_to): Likewise.
1998-05-02 06:39:39 +00:00
Richard M. Stallman
d6a1be6453 (x_display_cursor): Use FRAME_CURSOR_X_LIMIT. 1998-04-25 23:08:24 +00:00
Kenichi Handa
a65826769e (x_find_ccl_program): New function. 1998-04-15 07:12:49 +00:00
Andreas Schwab
dfcf069d56 Fix -Wimplicit warnings. 1998-04-14 12:25:56 +00:00
Richard M. Stallman
fc932ac6c7 Use STRING_BYTES and SET_STRING_BYTES. 1998-03-21 07:06:14 +00:00
Richard M. Stallman
2132370622 (XTframe_up_to_date): Check that mouse_face_mouse_frame
is non-null before calling note_mouse_highlight.
(x_destroy_window): If f equals mouse_face_mouse_frame,
clear that, and clear mouse_face_deferred_gc too.
1998-03-02 18:53:21 +00:00
Richard M. Stallman
e361a3c34d (x_load_font): Use string_byte. 1998-01-09 23:22:56 +00:00
Richard M. Stallman
045226c75c (x_display_cursor): Abort if X or Y is out of range. 1997-12-21 01:59:49 +00:00
Kenichi Handa
5e8e68ceec (x_make_frame_visible): Give dummy arg to
input_poll_signal.
1997-11-27 08:32:40 +00:00
Karl Heuer
8f08dc930c (XTread_socket): Check for bogus (0,0) location. 1997-10-25 03:12:31 +00:00
Karl Heuer
8bcee03ecf (XTmouse_position): Handle INSIST < 0. 1997-10-24 19:58:39 +00:00
Kenichi Handa
6b0efe7393 (x_list_fonts): Adjusted for the name change of
Valternate_fontname_alist.
1997-08-22 01:19:27 +00:00
Kenichi Handa
f64a355ce0 (dumpglyphs): Pay attention to
Vignore_relative_composition.
1997-08-10 04:13:19 +00:00
Kenichi Handa
9a32686f79 (x_list_fonts): Request at least 10 fonts by XListFonts. 1997-08-01 00:29:34 +00:00
Richard M. Stallman
536f4067ef (x_list_fonts): Reject a font whose min_bounds.width is 0. 1997-07-31 16:44:49 +00:00
Richard M. Stallman
4e61bddf04 (x_new_font): Follow the change in x_set_scroll_bar_width and make the
scroll bar at least 14 pixels wide.
1997-07-28 18:33:11 +00:00
Richard M. Stallman
f8c39f5172 (x_term_init) [! HAVE_X11R5]: Don't try to use XtCvtStringToFont. 1997-07-28 15:10:21 +00:00
Richard M. Stallman
bf7253f4a2 (dumpglyphs): Check the dimension of FONT while
setting `byte1' and `byte2' members of *CP.

(XTread_socket): Trap the BadMatch error that can occur
after a XSetInputFocus if window is not visible.
1997-07-26 01:43:07 +00:00
Richard M. Stallman
8c1a6a84ca (XTread_socket) <ClientMessage>:
For wm_take_focus, use x_any_window_to_frame.
Don't use FRAME_XIC if it is null, here.

(dumpglyphs): Use 8-bit output to X, rather than 16-bit,
if the character values permit that.
1997-07-20 17:44:22 +00:00
Richard M. Stallman
5c1aae96f9 (x_draw_box): Use scratch_cursor_gc to draw the cursor
box using the color specified by cursor_pixel.
1997-07-14 04:24:24 +00:00
Richard M. Stallman
b264791c6b (dumpglyphs): Declare local variable first_ch as Lisp_Object, not int. 1997-07-12 06:35:22 +00:00
Richard M. Stallman
fe27f88d3a (x_load_font): Get value of fontp->height from
ascent and descent members of structure font->max_bounds.
(dumpglyphs): Draw background by FillSolid if a font is too short.
1997-07-10 02:15:40 +00:00
Richard M. Stallman
5d7cc324ad (x_term_init): Don't use initializer for null_bits.
(XTread_socket) <KeyPress>: Call XFilterEvent.
1997-07-10 02:13:26 +00:00
Kenichi Handa
1348f1a4fc (x_list_fonts): Initialize the variable LIST to Qnil. 1997-07-07 00:59:44 +00:00
Richard M. Stallman
4d3f5d9ab7 (x_make_frame_visible): Don't move the frame
if it was iconified--only if it was invisible.
1997-07-05 08:23:34 +00:00
Richard M. Stallman
28c01ffe80 (x_make_frame_visible): Check has_been_visible
field before the UNBLOCK_INPUT.
1997-07-02 04:41:00 +00:00
Kenichi Handa
2da424f117 (dumpglyphs): Use FS_LOAD_FONT.
(x_new_fontset): If frame F has already using FONTSET, avoid the
duplicated work.  Use FS_LOAD_FONT.
(x_list_fonts): Call Fassoc to search Valternate_charset_table.
(x_load_font): Get around a buf of XListFonts
1997-06-21 00:45:44 +00:00
Richard M. Stallman
f39db7eaf4 (x_list_fonts): fast_c_string_match_ignore_case renamed. 1997-06-09 17:58:49 +00:00
Kenichi Handa
97210f4e3f (dumpglyph): Shift baseline for such a font that is
shorter but ascent or descent exceed the line height.
For a larger font, draw a small hook at right-bottom edge instead
of a rectangle.
1997-06-09 13:00:24 +00:00
Richard M. Stallman
06c488fde2 (process_expose_from_menu, XTread_socket):
Set has_been_visible field.
(x_make_frame_visible): Don't do XMoveWindow unles has_been_visible.
1997-05-31 07:37:09 +00:00
Richard M. Stallman
8ff102bda5 (x_load_font): Use macro FONT_ENCODING_NOT_DECIDED. 1997-05-31 02:03:43 +00:00
Richard M. Stallman
dcb07ae9dc (XTread_socket) <ConfigureNotify>: Don't call
x_wm_set_size_hint if window has no parent yet.
Simplify the call to x_real_positions.
(x_make_frame_visible): Use win_gravity to decide whether to
call XMoveWindow.  Also, don't do it if frame already visible.
1997-05-28 04:54:48 +00:00
Richard M. Stallman
1aa6072f7d (XTread_socket) <UnmapNotify>: Don't make an inconify_event
when frame was made invisible.
(x_make_frame_visible): Put the call to x_set_offset back as it was.
Near the end, instead call XMoveWindow, but only if original
positions were not negative.
1997-05-27 03:09:37 +00:00
Richard M. Stallman
9829ddba7b (x_make_frame_visible): Call x_set_offset only after
mapping the window and accepting input.
(x_calc_absolute_position): Do nothing if current position
is already for the top-left corner.
Handle errors in XTranslateCoordinates.
(XTread_socket): Simplify handling of ConfigureNotify events.
Always call x_wm_set_size_hint for them.
No need to call XTranslateCoordinates here.
(x_clear_errors): New function.
1997-05-26 06:22:15 +00:00
Kenichi Handa
ce667c3efe (x_load_font): Set 4 instead of -1 in fontp->encoding[1]
for the meaning of `can't decided'.
1997-05-19 03:33:50 +00:00
Kenichi Handa
f613a4c856 (dumpglyphs): Draw glyphs one by one if the font for
them is narrower than required.
(x_connection_closed): Put # at the beginning of line.
(x_load_font): Cast to (char *) before assigning to FONTNAME.
1997-05-16 00:42:53 +00:00
Kenichi Handa
34910d41c1 (dumpglyphs): Even if font (not fontset) is used,
display Latin1 characters correctly if the font contains glyphs
for them.  Fix bug of displaying cursor on a composite character.
1997-05-10 03:37:01 +00:00
Richard M. Stallman
e99db5a15c (XTmouse_position, x_term_init):
Save value of x_catch_errors and pass to x_uncatch_errors.

(x_catch_errors): Use specpdl so can be nested.
Use a Lisp string to as the buffer for the X message.
(x_uncatch_errors, x_had_errors_p, x_check_errors): Related changes.
(x_catch_errors_unwind): New function.
(x_error_quitter): Call x_error_catcher if appropriate.
(x_error_message_string): New variable.
(syms_of_xterm): Defvar it.
(x_caught_error_message): Variable deleted.
(X_ERROR_MESSAGE_SIZE): Renamed from X_CAUGHT_ERROR_MESSAGE_SIZE.
(x_error_handler): New function, calls x_error_quitter or ..._checker.
(x_initialize): Use x_error_handler as error handler for X.
1997-05-01 01:57:25 +00:00
Richard M. Stallman
df89d8a469 Fix previous change. 1997-04-27 16:34:19 +00:00
Richard M. Stallman
0c49ce2f28 (x_destroy_window): Free saved_menu_event, if any. 1997-04-27 03:32:14 +00:00
Richard M. Stallman
e73ec6fa92 (x_set_offset): Turn off the code that added the border_width
to modified_left and modified_top; it seems incorrect to do that.
1997-04-20 22:14:53 +00:00
Karl Heuer
26459b28a9 (construct_menu_click, note_mouse_highlight, fast_find_position):
Fix Lisp_Object/integer confusion.
1997-04-10 22:25:45 +00:00
Kenichi Handa
57b03282a0 (dumpglyphs): Clip and highlight glyphs displayed with
fonts of wrong size.
1997-04-07 07:12:13 +00:00
Richard M. Stallman
441affdb50 (XTread_socket): Accept XK_ISO_* keys. 1997-03-22 23:59:53 +00:00
Richard M. Stallman
1097aea030 (XTread_socket): Handle ISO_Left_Tab. 1997-03-22 04:21:00 +00:00
Kenichi Handa
b5210ea72e (dumpglyphs): Set a clipping region when we draw glyphs
with a font of inappropriate size.
(x_list_fonts): Try alternate fonts if we can't find a font of an
appropriate size.
1997-03-19 16:33:48 +00:00
Kenichi Handa
81ba44e5ff (x_list_fonts): Comment about cached font list added. 1997-03-18 23:31:34 +00:00
Kenichi Handa
f78798dfeb (dumpglyphs): Pay attention to characters registered in
use-default-ascent.
Fill background in advance if font has
non-zero _MULE_BASELINE_OFFSET property.
(x_load_font, x_term_init): Handle font property _MULE_DEFAULT_ASCENT.
1997-02-27 06:53:04 +00:00
Karl Heuer
dc43ef945f Include charset.h, ccl.h, and fontset.h.
(PER_CHAR_METRIC): New macro.
(dumpglyphs): New argument CMPCHARP.  Handle multibyte characters.
(XTwrite_glyphs, redraw_previous_char, redraw_following_char):
Supply argument CMPCHARP to dumpglyphs.
(dumprectangle): Display whole glyph of wide-column characters.
Supply argument CMPCHARP to dumpglyphs.
(show_mouse_face): Supply argument CMPCHARP to dumpglyphs.
(x_draw_box): Pay attention to wide-column characters.
(x_draw_single_glyph): Supply argument CMPCHARP to dumpglyphs.
(x_new_font): Call fs_load_font for actual font loading work.
(x_new_fontset): New function.
(x_get_font_info, x_list_fonts, x_load_font, x_query_font): New
functions providing API to fontset handler.
(x_term_init): Initialize several new members of struct x_display_info.
1997-02-20 06:59:25 +00:00
Richard M. Stallman
eefe909628 (dumpglyphs): Declare g as GLYPH. 1997-01-20 08:08:13 +00:00
Richard M. Stallman
1e6bc770bd (x_iconify_frame): Clear visible when we set iconified. 1996-12-26 21:07:30 +00:00
Richard M. Stallman
e687d06efa (cancel_mouse_face): New function. Code copied from
x_set_window_size, fixing a bug.
(x_set_window_size): Use cancel_mouse_face.
(XTread_socket): When frame size has changed, call cancel_mouse_face.
1996-10-31 22:05:51 +00:00
Richard M. Stallman
1cf4a0d1a2 (XTread_socket, KeyPress case): Clear compose_status
if the key has the meta modifier.
1996-10-30 05:09:38 +00:00
Richard M. Stallman
549b29ac9a (XTwrite_glyphs, XTclear_end_of_line, XTclear_frame)
(clear_cursor, x_display_bar_cursor, x_display_box_cursor)
(x_set_window_size): Use phys_cursor_on field in frame.
(x_update_cursor): Negative phys_cursor_x no longer means anything.
1996-10-12 16:06:40 +00:00
Richard M. Stallman
2729a2b5d8 (show_mouse_face): Undo 1996-08-30 change. 1996-09-29 01:29:41 +00:00
Richard M. Stallman
e84e14c381 (XTflash): Don't flash in the internal borders.
or between a scroll bar and the edge.

(XTflash): Flash just top and bottom screen line.

(XTread_socket): Finish previous change.
1996-09-27 07:46:54 +00:00
Richard M. Stallman
f66868bad1 (XTread_socket): Delete WAITP arg. 1996-09-25 08:00:39 +00:00
Richard M. Stallman
3cbd2e0ba0 (x_scroll_bar_create, x_scroll_bar_move):
(x_scroll_bar_expose): Use VERTICAL_SCROLL_BAR_WIDTH_TRIM.

(XTchange_line_highlight, dumpglyphs, XTclear_end_of_line)
(do_line_dance, pixel_to_glyph_coords): Use FRAME_WINDOW_WIDTH.

(x_scroll_bar_move, x_scroll_bar_create):
Add a border around the actual window.

(x_scroll_bar_expose): Don't trim the width here.
1996-09-23 04:44:15 +00:00
Richard M. Stallman
d9cdbb3d95 Pass frame arg in calls to VERTICAL_SCROLL_BAR_INSIDE_HEIGHT
and VERTICAL_SCROLL_BAR_TOP_RANGE.

(XTclear_end_of_line): Shift end-of-line when there is a
left-side scroll bar by FRAME_LEFT_SCROLL_BAR_WIDTH.
(do_line_dance): Take into account the width of a left-side scroll bar.
(dumprectangle): Trim at FRAME_EXTERNAL_WIDTH instead of FRAME_WIDTH.
(fast_find_position): Use new macro WINDOW_LEFT_MARGIN.
(show_mouse_face): Likewise.
(x_scroll_bar_set_handle): VERTICAL_SCROLL_BAR_INSIDE_WIDTH now
requires the frame as an argument.
(x_scroll_bar_expose): Narrow the box slightly for a left-side scroll bar.
1996-09-21 00:57:20 +00:00
Karl Heuer
6df54671fd Replaced symbol BSD with BSD_SYSTEM. 1996-09-17 03:43:54 +00:00
Richard M. Stallman
bade65fd57 (note_mouse_highlight): Test last_overlay_modified field. 1996-09-16 06:31:10 +00:00
Richard M. Stallman
adabc3a9af (x_connection_closed): Call XtCloseDisplay. 1996-09-13 17:03:29 +00:00
Richard M. Stallman
2ef60670b3 (note_mouse_highlight): Pass POS argument to fast_find_position as int. 1996-09-04 03:38:40 +00:00
Richard M. Stallman
2218e4d9c4 (x_term_init): Initialize Xatom_FONT member.
(x_new_font): Use Xatom_FONT member.
1996-09-01 20:49:29 +00:00
Richard M. Stallman
aa8bff2e10 (XTupdate_end): Always clear mouse_face_defer flag. 1996-08-31 02:44:14 +00:00
Richard M. Stallman
d1bc41829a (do_line_dance, dumprectangle): Use x_update_cursor.
(show_mouse_face, clear_cursor): Likewise.
(x_display_cursor): New args X and Y.
(XTupdate_end, XTcursor_to, XTwrite_glyphs): Pass new args.
(XTupdate_begin): Initialize curs_x, curs_y here.
1996-08-30 18:49:07 +00:00
Richard M. Stallman
531483fbd3 (XTread_socket): Call XFilterEvent on all events,
if HAVE_X_I18N and FRAME_XIC nonzero.
1996-08-29 06:22:28 +00:00
Richard M. Stallman
e932d73def (fast_find_position): Fix previous change. 1996-08-25 23:31:20 +00:00
Richard M. Stallman
f61f515836 (fast_find_position): Minor fix in handling maybe_next_line. 1996-08-25 17:48:32 +00:00
Richard M. Stallman
51b592fb33 (x_term_init): If the default Xt font does not exist on
the X server, add a resource so that dialog boxes use a common font.
1996-08-24 00:03:22 +00:00
Richard M. Stallman
30e671c33f (XTread_socket): Delete the code to pass menu bar keys
to the toolkit alone.
(XTread_socket): Don't fail to pass button events to toolkit.
1996-07-31 17:18:54 +00:00
Richard M. Stallman
0a43f75b23 (XTread_socket): Delete the code to pass menu bar keys
to the toolkit alone.
1996-07-31 16:52:52 +00:00
Richard M. Stallman
2237cac949 (XTread_socket): Pass keys in menu bar to toolkit alone
only for Motif.

(XTread_socket): Fixing previous change:
Clear last_mouse_press_frame on non-menu-bar ButtonPress.
Always use last_mouse_press_frame as frame for ButtonRelease.
But ignore the event if frame's output_data.x is null.
Save the ButtonRelease only if USE_MOTIF.
(last_mouse_press_frame): This is now a Lisp object.
(syms_of_xterm): Initialize and staticpro it.
1996-07-30 21:10:40 +00:00
Richard M. Stallman
f10ded1cc3 Fix previous change. 1996-07-28 00:42:14 +00:00
Richard M. Stallman
ce89ef46f6 (last_mouse_press_frame): New variable.
(XTread_socket): Store a saved_button_event for ButtonRelease.
1996-07-27 20:30:31 +00:00
Karl Heuer
8805890a41 (SET_SAVED_MENU_EVENT): New macro.
(SET_SAVED_BUTTON_EVENT, SET_SAVED_KEY_EVENT): New macros.
(XTread_socket): Use them.
1996-07-16 06:10:35 +00:00
Karl Heuer
7723570dc0 (XTread_socket): Add #ifdef for previous change. 1996-07-11 23:24:03 +00:00
Karl Heuer
aaca4aca35 Undo previous change.
(XTread_socket): Better way to avoid sending toolkit-specific
events to Emacs.
1996-07-07 22:58:51 +00:00
Miles Bader
b40f815a56 (XTread_socket): Use lw_tookit_related_event_p to avoid sending
toolkit-specific events to Emacs.
1996-07-04 05:46:05 +00:00
Richard M. Stallman
aa4d9a9e9b (x_connection_closed): Call clear_waiting_for_input. 1996-06-27 23:20:46 +00:00
Richard M. Stallman
0a0fdc7099 (x_error_quitter): Delete newline from sprintf string. 1996-06-27 00:25:07 +00:00
Richard M. Stallman
f000f5c5ac (XTread_socket, Xatom_wm_save_yourself clause):
Don't call XSetCommand if f is 0.
1996-06-26 18:16:08 +00:00
Richard M. Stallman
f8d07b62cc (x_connection_closed): Add newline when printing error message on stderr. 1996-06-26 17:45:28 +00:00
Richard M. Stallman
f60f910890 (x_connection_signal): Just return after calling `signal'.
(X_CONNECTION_LOCK_FLAG): Definition deleted.
(x_connection_signal_dpyinfo): Variable deleted.
(x_connection_signal_1): Function deleted.
(x_connection_close_if_hung): Function deleted.
1996-06-26 17:41:44 +00:00
Richard M. Stallman
0e81d8cdcc (x_connection_closed): If waiting_for_input, call quit_throw_to_read_char. 1996-06-25 00:32:51 +00:00
Richard M. Stallman
9cf30a30a8 (x_iconify_frame): If frame is invisible, explicitly mark it as iconified. 1996-06-21 15:29:55 +00:00
Richard M. Stallman
0cd6403b4b (XTread_socket): Use XtAppNextEvent when using toolkit configurations. 1996-06-10 17:32:13 +00:00
Karl Heuer
805288011b [SOLARIS2]: Include string.h. 1996-05-25 23:37:13 +00:00
Richard M. Stallman
ff38b71572 (x_connection_signal_1): Call x_connection_closed properly. 1996-05-10 16:05:26 +00:00
Richard M. Stallman
d2bd6bc4c1 [USE_X_TOOLKIT]: Include X11/Shell.h.
(x_wm_set_icon_pixmap) [USE_X_TOOLKIT]: Tell widget the new pixmap.
1996-04-30 19:40:56 +00:00
Richard M. Stallman
b80c363eee (x_scroll_bar_clear): Do nothing if frame now has no scroll bars. 1996-04-26 16:38:03 +00:00
Richard M. Stallman
ea146def5f (x_connection_signal): Call sigunblock properly. 1996-04-24 22:29:57 +00:00
Richard M. Stallman
f5bb65ecab (note_mouse_movement): Don't call XQueryPointer.
(x_scroll_bar_note_movement): Don't call XQueryPointer.

(x_new_font): Intern FONT just once for finding full name.
1996-04-18 04:03:16 +00:00
Richard M. Stallman
10537cb12d Include locale.h if HAVE_SETLOCALE.
(x_term_init): Restore LC_TIME as well as LC_NUMERIC.
1996-04-08 23:12:25 +00:00
Richard M. Stallman
333bc6d09f (x_term_init): Respecify LC_NUMERIC locale. 1996-04-05 18:17:07 +00:00
Richard M. Stallman
408be6610b (x_destroy_window): Do call XCloseIM if X11R6. 1996-04-05 16:03:20 +00:00
Richard M. Stallman
a9978dd866 (x_destroy_window) [SOLARIS2]: Don't free the IC or IM. 1996-04-02 00:34:57 +00:00
Richard M. Stallman
68d4a8a9d7 (x_connection_closed): Don't check _Xdebug. 1996-03-27 19:11:10 +00:00
Richard M. Stallman
8c29f6bf97 (XTread_socket, MapNotify case):
Call record_asynch_buffer_change only if >1 frames.
1996-03-27 03:54:10 +00:00
Richard M. Stallman
31f41dafa6 (x_destroy_window) [HAVE_X_I18N]: Free xic and xim of frame. 1996-03-18 03:20:06 +00:00
Richard M. Stallman
2e365682cf Comment/whitespace change. 1996-03-17 18:14:52 +00:00
Richard M. Stallman
b983e34ec0 (x_calc_absolute_position): Don't explicitly subtract
the external menu bar height--PIXEL_HEIGHT (f) includes that.
1996-03-09 16:30:38 +00:00
Richard M. Stallman
822bd8045d (x_connection_closed): Don't unblock input until the end. 1996-03-06 19:14:34 +00:00
Richard M. Stallman
6afcf317d2 [X_CONNECTION_LOCK_FLAG] (abort, exit): New definitions. 1996-03-01 20:11:19 +00:00
Richard M. Stallman
6cf0ae869d (X_CONNECTION_LOCK_FLAG): New macro.
(x_connection_close_if_hung): New subroutine, at the end of the file.
Include X11/Xlibint.h only for this function.
#undef bcopy, bzero, bcmp, min, max first.
Define malloc and free to avoid type conflicts.
(x_connection_signal): Use x_connection_close_if_hung.
1996-02-27 02:33:15 +00:00
Richard M. Stallman
aee9a898c4 (x_set_window_size): Clear out the mouse-highlighting data
if it applies to this frame.
Clear out the frame cursor position in Xt version as in Xlib version.

(x_update_cursor): If no previous cursor position is known,
leave the cursor off.
1996-02-27 01:16:35 +00:00
Richard M. Stallman
c889e0d823 (x_error_quitter): Add newline to error message. 1996-02-12 20:48:35 +00:00
Richard M. Stallman
e4b68333a9 (min, max): Don't define if already defined. 1996-02-08 21:58:53 +00:00
Richard M. Stallman
6186a4a015 (x_connection_signal): Call x_connection_closed properly.
(x_connection_closed): Set FRAME_X_DISPLAY to 0.
(x_destroy_window): Don't do any X operations if FRAME_X_DISPLAY is 0.

(x_term_init): Use "" as 2nd arg to setlocale.

(x_connection_signal): Don't stop polling.
Don't mess with SIGALRM.
Those were relics of the superseded Dec 19 change.
1996-02-04 20:24:09 +00:00
Richard M. Stallman
6b0442dc82 (XTframe_raise_lower): Rename arg raise' to raise_flag'. 1996-01-29 19:28:11 +00:00
Karl Heuer
31e3a04632 (x_connection_signal): Explicitly check the thread interlock
on Solaris.
[SOLARIS2]: Include Xlibint.h.
(x_connection_signal): Access XlibDisplayWriting properly.
No need to sleep--if the flag is set, assume connection is dead.
1996-01-24 23:43:22 +00:00
Erik Naggum
3b7ad313e0 Update FSF's address in the preamble. 1996-01-15 09:18:04 +00:00
Richard M. Stallman
e6cbea31a0 (XTread_socket): For selection_clear_event and
selection_request_event, initialize the frame_or_window field.
1996-01-12 21:51:46 +00:00
Richard M. Stallman
717ca13092 (XTread_socket): Pass KeyPress events to the toolkit.
Make the OTHER label exist unconditionally, and make the gotos
unconditional when that is convenient.
1995-12-31 19:10:03 +00:00
Richard M. Stallman
4a60f8c52a (x_find_modifier_meanings): Fix !X11R4 code to use dpyinfo. 1995-12-28 23:58:12 +00:00
Karl Heuer
15ffd0b38e (x_connection_signal): Set an alarm around XNoOp call. 1995-12-21 17:16:13 +00:00
Karl Heuer
482a1bd230 (x_connection_closed): Don't delete dpyinfo if it's null. 1995-12-13 20:08:11 +00:00
Richard M. Stallman
cbe24f6076 (XTframe_up_to_date): Block and unblock input. 1995-11-22 22:23:32 +00:00
Richard M. Stallman
9af3143a29 (XTmouse_position): Exit the loop if child == win.
(x_iconify_frame): Call FRAME_SAMPLE_VISIBILITY.
1995-11-22 12:38:53 +00:00
Richard M. Stallman
0d43a5d9ec (show_mouse_face): When clearing cursor, use proper column range. 1995-11-20 04:46:08 +00:00
Richard M. Stallman
91375f8fc6 (XTread_socket): Verify a ButtonPress was actually in the
menu bar before generating a menu_bar_activate_event event.
1995-11-15 23:15:49 +00:00
Richard M. Stallman
0fdff6bbc2 (HACK_EDITRES): Define here as in xfns.c.
(XTread_socket): Test HACK_EDITRES.
1995-11-11 07:13:06 +00:00
Karl Heuer
68be917ded (BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG):
Rename from SHORTBITS, INTBITS, LONGBITS.
1995-10-31 02:34:16 +00:00
Richard M. Stallman
6c183ba5dc (x_term_init, XTread_socket): Add HAVE_X_I18N support. 1995-10-17 17:12:20 +00:00
Richard M. Stallman
f9e24cb917 (x_connection_signal_1): New function.
(x_connection_signal): Try all the server connections
to see which one was lost.

(XTcondemn_scroll_bars): No error if
FRAME_CONDEMNED_SCROLL_BARS is non-nil already.
Just move all the scroll bars into there.
1995-10-12 22:58:04 +00:00
Richard M. Stallman
6856855556 (x_wm_set_icon_pixmap): If trying to turn off icon pixmap, do nothing. 1995-08-29 04:36:12 +00:00
Richard M. Stallman
0d777288c3 (x_delete_display) [AIX]: Don't call XRmDestroyDatabase. 1995-08-05 00:57:17 +00:00
Richard M. Stallman
91ea2a7a54 (XTread_socket): For UnmapNotify, use x_top_window_to_frame. 1995-08-02 18:32:39 +00:00
Richard M. Stallman
7556890b58 Renamings: frame->display => frame->output, struct x_display -> sruct x_output. 1995-07-25 21:55:50 +00:00
Richard M. Stallman
2224b90547 (next_noop_dpyinfo): New variable.
(XTread_socket): Use that to cycle through all displays for XNoOp.

(XTread_socket) [USE_X_TOOLKIT]: For ButtonPress in menu bar,
save the event--don't pass to Xt yet.  Make a menu_bar_activate_event.
(temp_index, temp_buffer): Now static.
1995-07-25 20:13:23 +00:00
Karl Heuer
39d8bb4dcf [HAVE_X11XTR6]: Include locale.h
(x_term_init) [HAVE_X11XTR6]: Set LC_NUMERIC and LC_TIME back to C.
(note_mouse_movement): Set mouse_moved in the x_display_info.
(XTmouse_position, x_scroll_bar_note_movement): Likewise.
(x_scroll_bar_report_motion): Likewise.
(x_draw_box, x_display_box_cursor, x_display_bar_cursor):
New args x, y.  Don't use curs_x or curs_y here.  Callers changed.
1995-07-17 22:12:45 +00:00
Richard M. Stallman
665881adf7 (x_initialize) [USE_X_TOOLKIT]: Set fallback resources. 1995-07-07 13:35:48 +00:00
Richard M. Stallman
5d46f92806 (XTread_socket): Turn off meta, super, hyper and alt bits
in the arg for XLookupKey.

(x_display_bar_cursor, x_display_box_cursor):
Don't alter curs_x or curs_y here.
(x_display_cursor): Copy them from the frame cursor here.
(x_update_cursor): New function.
(frame_highlight, frame_unhighlight): Use x_update_cursor.
1995-06-29 17:32:59 +00:00
Karl Heuer
9382638d7b (x_make_frame_visible): Test and set asked_for_visible. 1995-06-11 20:48:19 +00:00
Karl Heuer
d067ea8b1a Include widget.h.
(x_wm_set_size_hint) [USE_X_TOOLKIT]:
Get the size from the outer widget.
Copy the base and minimum sizes from the old hint.
1995-06-11 20:27:12 +00:00
Karl Heuer
d047c4ebf2 (x_get_keysym_name): New function. 1995-06-09 19:15:28 +00:00
Karl Heuer
baf540d69c (x_wm_set_icon_pixmap): Set IconPixmapHint in both cases. 1995-06-05 17:39:17 +00:00
Karl Heuer
1be2d067d3 (x_text_icon): Do call XSetIconName or XSetWMIconName.
Don't save ICON_NAME anywhere.
1995-06-05 12:38:46 +00:00
Karl Heuer
385f63ae3f (XTread_socket) [USE_X_TOOLKIT]: Do pass MotionNotify events
to the toolkit.
1995-05-29 20:04:22 +00:00
Karl Heuer
60439948f2 (x_term_init): Block input during this function. 1995-05-29 19:49:52 +00:00
Karl Heuer
eee20f6aa9 (x_term_init): Call init_sigio only if interrupt_input. 1995-05-29 19:41:18 +00:00
Karl Heuer
aa3ff7c943 (x_set_offset): Distinguish CHANGE_GRAVITY < 0 case. 1995-05-29 07:27:09 +00:00
Karl Heuer
7c21100ae3 (XTread_socket): Don't call popup_get_selection here. 1995-05-26 22:46:36 +00:00
Karl Heuer
78aa2ba571 (XTread_socket): For MapNotify, call record_asynch_buffer_change. 1995-05-25 17:07:37 +00:00
Karl Heuer
c32cdd9a11 (XTflash): Use pointers as args to select.
(XTread_socket, x_set_offset, x_set_window_size)
(x_make_frame_invisible): Cast 2nd arg to x_wm_set_size_hint.
(XTclear_end_of_line): Don't specify return type.
(note_mouse_highlight): Declare args x and y.
(x_icon_type): New declaration.
(flashback): Declaration deleted.
1995-05-25 15:18:16 +00:00
Karl Heuer
07a7096a4b (x_connection_closed): Unblock input, first thing.
Set Vdefault_minibuffer_frame to t
before deleting a frame that might have its own minibuffer.
1995-05-24 20:37:08 +00:00
Karl Heuer
4a4cbdd528 (x_set_offset): Add border_width when calling XMoveWindow. 1995-05-24 04:54:34 +00:00
Karl Heuer
c81412a05f (x_calc_absolute_position): Use menubar_height field.
In toolkit case, use outermost Emacs widget and its parent.
[USE_X_TOOLKIT] (x_make_frame_visible): Do call x_set_offset.
1995-05-24 04:41:16 +00:00
Karl Heuer
59e755be76 (Qvendor_specific_keysyms): New var.
(syms_of_xterm): Initialize and staticpro it.
(x_term_init): Initialize Vsystem_key_alist according to vendor.
1995-05-13 00:13:02 +00:00
Karl Heuer
10ceaf0356 (x_term_init): Add stub to initialize Vsystem_key_alist. 1995-04-29 04:17:56 +00:00
Karl Heuer
0ad5446c55 (x_term_init): If the previous kboard was the dummy one,
switch to the new one immediately.
1995-04-24 22:34:27 +00:00
Karl Heuer
0f9419350b (x_focus_frame, x_focus_event_frame, x_highlight_frame):
Delete these vars; now part of struct x_display_info.
(x_new_focus_frame): New arg DPYINFO.  Callers changed.
Use the struct members instead of the globals.
Call x_frame_rehighlight instead of XTframe_rehighlight, so we can
pass on the dpyinfo pointer.
(x_mouse_leave): New arg DPYINFO.  Callers changed.
(XTframe_rehighlight): New arg FRAME.  Callers changed.
Now does all the work in x_frame_rehighlight.
(x_frame_rehighlight): New function, code from XTframe_rehighlight.
(XTread_socket): Use the struct members instead of the globals.
(x_unfocus_frame, x_iconify_frame, x_destroy_window): Likewise.
(x_display_box_cursor, x_make_frame_invisible): Likewise.
(x_term_init): Initialize the struct members.
(x_initialize): Delete initialization of deleted globals.
1995-04-24 18:27:33 +00:00
Richard M. Stallman
2d7fc7e8f9 (x_term_init): Call XtSetLanguageProc only if HAVE_X11XTR6.
(XTread_socket): Pass dpyinfo to popup_get_selection.

(XTread_socket): For ConfigureNotify,
combine the USE_X_TOOLKIT and non-toolkit cases, which provides
some things that were missing in the former.
1995-04-14 03:58:51 +00:00
Richard M. Stallman
796e46975d (XTread_socket): Pass dpyinfo to popup_get_selection. 1995-04-11 20:33:52 +00:00
Richard M. Stallman
d806e7202a (XTread_socket): Make deiconify event only if frame was iconified. 1995-04-10 07:32:16 +00:00
Richard M. Stallman
16f60add1c (dumpglyphs): Cast FACE_DEFAULT to (XFontStruct *)
for comparison with face->font.
1995-04-07 18:33:16 +00:00
Karl Heuer
f8c25f1b67 Update copyright. 1995-04-07 02:21:52 +00:00
Karl Heuer
19126e1177 New arg DPYINFO to all callers of x_window_to_frame, x_any_window_to_frame,
and x_top_window_to_frame.
1995-04-03 23:37:17 +00:00
Karl Heuer
39f7900173 (x_delete_display): Extract kboard deletion, for modularity. 1995-03-31 03:57:05 +00:00
Karl Heuer
547d9db874 (x_term_init): Initialize cut_buffers_initialized. 1995-03-31 03:40:24 +00:00
Richard M. Stallman
1cf412ecec (XTmouse_position): New arg `insist'. 1995-03-26 21:12:11 +00:00
Karl Heuer
29b38361ea (get_perdisplay): Deleted.
(same_x_server): New function.
(x_term_init): If this display shares a keyboard with one we've
already opened, then share the structure.
(x_delete_display): Don't delete the kboard until the reference
count becomes zero.
1995-03-15 01:54:19 +00:00
Richard M. Stallman
f48f33caa6 (x_connection_closed): Ignore non-X frames.
Fix the logic for deleting frames that use separate minibuffers
that are on the dead connection.
1995-03-06 04:35:33 +00:00
Paul Reilly
5bf01b68c7 (x_bitmap_icon): Fix test for unallocated icon bitmap. 1995-02-14 21:48:14 +00:00
Richard M. Stallman
92e2441bd1 (x_display_bar_cursor): Use frame's cursor_width.
(x_connection_signal): New function.
(x_initialize): Use it as signal handler.
1995-02-14 14:22:29 +00:00
Karl Heuer
b9737ad379 [MULTI_PERDISPLAY] (x_term_init): Initialize perdisplay.
[MULTI_PERDISPLAY] (x_delete_display): Destroy perdisplay.
(x_delete_display): Use xfree, not free.
1995-02-04 00:12:17 +00:00
Richard M. Stallman
db3906fd07 (x_unqueue_events): Arg is now a Display *.
(x_start_queuing_selection_requests): Likewise.
(x_stop_queuing_selection_requests): Likewise.
1995-02-02 18:54:47 +00:00
Karl Heuer
a1b7a2ab66 [MULTI_PERDISPLAY] (get_perdisplay): Define this as an exported function. 1995-01-31 01:53:12 +00:00
Richard M. Stallman
c5acd733f2 (x_destroy_window): Don't let frame being destroyed remain in
x_focus_event_frame.
1995-01-25 00:44:32 +00:00
Richard M. Stallman
a0a7635faa Don't include param.h. 1995-01-08 20:19:47 +00:00
Richard M. Stallman
0299d313b8 (x_scroll_bar_handle_click): Use GC_WINDOWP.
(XTframe_rehighlight, x_window_to_scroll_bar): Use GC_FRAMEP.
1994-12-30 01:37:53 +00:00
Richard M. Stallman
9f67f20bf8 (XTupdate_begin): Fix backward test in previous change.
(x_display_box_cursor): Don't redraw old cursor spot in mouse face
if cursor was on a newline.

(XTread_socket): Handle button events from outside
the frame, received due to grabbing the mouse with a button.
1994-12-27 21:45:06 +00:00
Richard M. Stallman
37c2c98b16 (XTupdate_begin): Discard records of prior mouse highlight
when frame must be redrawn.

(x_make_frame_visible, x_make_frame_invisible)
(x_iconify_frame): Give error if frame has explicit_parent.
(x_new_font): Don't set window height if frame has explicit_parent.

(x_mouse_leave): New function broken out of XTread_socket.
When x_focus_event_frame is nonzero, assume that frame gets focus.
(XTread_socket): Use x_mouse_leave for LeaveNotify.
1994-12-23 05:12:32 +00:00
Karl Heuer
bddd097cb1 (XTread_socket): Generate iconify and deiconify events. 1994-11-04 04:00:50 +00:00
Karl Heuer
b30ec46658 (XTclear_end_of_line): Finish the line dance here too, just as was done in
XTwrite_glyphs.
1994-11-01 00:26:36 +00:00
Richard M. Stallman
77b686467c (fast_find_position): Special case if POS is end of buffer. 1994-11-01 00:07:34 +00:00
Richard M. Stallman
7f9c7f949a (x_delete_display): Call XrmDestroyDatabase.
(x_destroy_window): Rewrite to fetch dpyinfo just once.

[USE_X_TOOLKIT]: Make application context explicitly
and support multiple top-level shells.
(x_initialize): Call XtToolkitInitialize, XtCreateApplicationContext;
don't open display or make a shell.
(x_term_init): Call XtOpenDisplay.

(x_scroll_bar_create): Use XMapRaised directly.
(x_make_frame_visible, x_iconify_frame): Likewise.
(XMapWindow): Macro definition deleted.
(METABIT): Macro deleted.
(MAXDESC, FD_SETSIZE, FD_SET, FD_CLEAR, FD_ZERO, FD_ISSET): Likewise.
(x_id_name): Variable deleted.
1994-10-29 09:43:07 +00:00
Richard M. Stallman
7a13e8946b (x_catch_errors, x_check_errors, x_had_errors_p)
(x_uncatch_errors): Make the argument a display, not a frame.

(XTread_socket_fake_io_error): New variable.
(XTread_socket): Obey XTread_socket_fake_io_error.

(x_initialize): Init x_noop_count, x_focus_frame
and x_highlight_frame here.
(x_term_init): Not here.

(x_term_init): Open the connection first thing;
if that fails, don't allocate dpyinfo.

(x_delete_display): New function.
(x_connection_closed): New args dpyinfo and error_message.
Delete all frames on the dead display
and all frames using them for minibuffers.
Call x_delete_display.
Maybe signal a Lisp error.

(x_term_init): Don't report error here--just return 0.

(x_scroll_bar_report_motion): Store proper value in
*bar_window (the Emacs window, not the X window number).

(x_scroll_bar_report_motion): Don't clear *fp.

(x_wm_set_icon_pixmap): Use x_bitmap_pixmap.

(show_mouse_face): New arg dpyinfo.  All callers changed.
(clear_mouse_face): New arg dpyinfo.  All callers changed.

(scratch_cursor_gc): Variable deleted.
(dumpglyphs): Use scratch_cursor_gc in x_display_info.

(syms_of_xterm): Don't staticpro mouse_face_window.

(expose_all_windows, expose_all_icons): Variables deleted.
(BLOCK_INPUT_mask): Variable deleted.

(x_term_init): Set up x_id_name field.
(x_id_name): Variable deleted.

(x_font_table, x_font_table_size, x_n_fonts): Vars deleted.
(x_new_font): Use new fields.
(warp_mouse_on_deiconify): Unused variable deleted.

(x_term_init): Set up dpyinfo->xrdb.
Set up dpyinfo->vertical_scroll_bar_cursor.
(x_scroll_bar_create): Use vertical_scroll_bar_cursor slot.
(x_vertical_scroll_bar_cursor): Variable deleted.

(x_term_init): Really return dpyinfo.

(x_term_init): Call add_keyboard_wait_descriptor,
not change_keyboard_wait_descriptor.

(x_term_init): Pass new arg to init_sigio.
Don't set old_fcntl_owner.
Don't call change_input_fd.
(XTread_socket): Loop over displays and process input from each.

(x_display_name_list): New variable.
(syms_of_xterm): staticpro it.
Don't staticpro slots in the_x_screen.
(x_term_init): Update x_display_name_list along with x_display_list.
Actually malloc the x_display_info.
(the_x_screen): Variable deleted.
1994-10-26 09:26:40 +00:00
Richard M. Stallman
334208b772 Use FRAME_X_DISPLAY instead of x_current_display and XDISPLAY.
(x_make_frame_visible, x_make_frame_invisible):
Pass a frame ptr to x_sync.

(x_term_init): Init all the components of dpyinfo.

(x_display_info_for_display): New function.

(x_*_mod_mask): Variables deleted.
(x_x_to_emacs_modifiers, x_emacs_to_x_modifiers):
New arg dpyinfo; all callers changed.
Store the masks in that structure.

(icon_bitmap): Variable deleted.
(x_bitmap_icon): Use icon_bitmap_id in x_display_info.

(icon_font_info): Variable deleted.

(x_term_init): Set up `connection' field.

(x_find_modifier_meanings):
Arg is now struct x_display_info *.
(x_term_init): Return an x_display_info *.
Store all the data in it, including X atoms and xrdb.
Put the x_display_info structure on x_display_list.
Pass name as Lisp_Object.
(the_x_screen): Variable moved here.
(syms_of_xterm): Staticpro parts of the_x_screen.

(windowinfo): Variable deleted.

(Xatom_*): Variables deleted.
(x_iconify_frame, XTread_socket): Get atoms from the x_display_info,

(XTread_socket): Don't update Vmouse_depressed.

(x_mouse_grabbed): Variable deleted.
(note_mouse_highlight): Use grabbed field instead.
(XTmouse_position, XTread_socket): Likewise.

(x_calc_absolute_position, x_wm_set_size_hint):
Get screen height, width from the x_display_info structure.
1994-10-22 04:34:16 +00:00
Karl Heuer
0ccf5d73ba (do_line_dance): Decrement index only once per loop. 1994-10-18 01:29:09 +00:00
Morten Welinder
87485d6fc9 *** empty log message *** 1994-10-17 08:42:36 +00:00
Richard M. Stallman
990ba8548c (dumpglyphs): Explicitly draw background stipple.
(x_bitmap_icon): Arg FILE is now a Lisp_Object.
(x_iconify_frame, x_make_frame_visible): Supply FILE arg to it.

(x_bitmap_icon): Properly discard the previous bitmap.
(x_text_icon): Discard bitmap only if we have one.
1994-10-17 07:24:58 +00:00
Richard M. Stallman
7f2ae03622 (x_bitmap_icon): Allow bitmap to come from file.
(x_wm_set_icon_pixmap): Second arg is now pixmap_id;
call x_lookup_pixmap.
(x_text_icon): Call x_destroy_bitmap.
1994-10-15 22:01:22 +00:00
Karl Heuer
58769bee4d (stuffline, scraplines): Functions deleted.
(line_dance, line_dance_len, line_dance_in_progress): New vars.
(XTins_del_lines): Don't do any X calls; just update the array.
(do_line_dance): New function.  Do the X calls here.
(XTupdate_end, XTwrite_glyphs): Call do_line_dance.
1994-10-15 04:49:14 +00:00
Richard M. Stallman
8ed24d5a14 (x_new_font): Don't keep looping after the FONT property. 1994-10-14 04:45:04 +00:00