comparison src/xterm.c @ 25682:f8543a6d88ca

(XTcursor_to): Change for Lisp_Object selected_frame. (x_clear_frame, XTring_bell, XTmouse_position, XTread_socket): Ditto. (XRINGBELL): Removed.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 13 Sep 1999 11:14:29 +0000
parents 9154af188477
children 121bd925411f
comparison
equal deleted inserted replaced
25681:3e56c05edfab 25682:f8543a6d88ca
1074 This will also set the cursor position of W. */ 1074 This will also set the cursor position of W. */
1075 if (updated_window == NULL) 1075 if (updated_window == NULL)
1076 { 1076 {
1077 BLOCK_INPUT; 1077 BLOCK_INPUT;
1078 x_display_cursor (w, 1, hpos, vpos, x, y); 1078 x_display_cursor (w, 1, hpos, vpos, x, y);
1079 XFlush (FRAME_X_DISPLAY (selected_frame)); 1079 XFlush (FRAME_X_DISPLAY (SELECTED_FRAME ()));
1080 UNBLOCK_INPUT; 1080 UNBLOCK_INPUT;
1081 } 1081 }
1082 } 1082 }
1083 1083
1084 1084
4737 } 4737 }
4738 } 4738 }
4739 4739
4740 4740
4741 /* Clear entire frame. If updating_frame is non-null, clear that 4741 /* Clear entire frame. If updating_frame is non-null, clear that
4742 frame. Otherwise clear selected_frame. */ 4742 frame. Otherwise clear the selected frame. */
4743 4743
4744 static void 4744 static void
4745 x_clear_frame () 4745 x_clear_frame ()
4746 { 4746 {
4747 struct frame *f; 4747 struct frame *f;
4748 4748
4749 if (updating_frame) 4749 if (updating_frame)
4750 f = updating_frame; 4750 f = updating_frame;
4751 else 4751 else
4752 f = selected_frame; 4752 f = SELECTED_FRAME ();
4753 4753
4754 /* Clearing the frame will erase any cursor, so mark them all as no 4754 /* Clearing the frame will erase any cursor, so mark them all as no
4755 longer visible. */ 4755 longer visible. */
4756 mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); 4756 mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f)));
4757 output_cursor.hpos = output_cursor.vpos = 0; 4757 output_cursor.hpos = output_cursor.vpos = 0;
4944 #endif /* defined (HAVE_TIMEVAL) && defined (HAVE_SELECT) */ 4944 #endif /* defined (HAVE_TIMEVAL) && defined (HAVE_SELECT) */
4945 4945
4946 4946
4947 /* Make audible bell. */ 4947 /* Make audible bell. */
4948 4948
4949 #define XRINGBELL XBell (FRAME_X_DISPLAY (selected_frame), 0)
4950
4951 void 4949 void
4952 XTring_bell () 4950 XTring_bell ()
4953 { 4951 {
4954 if (FRAME_X_DISPLAY (selected_frame) == 0) 4952 struct frame *f = SELECTED_FRAME ();
4955 return; 4953
4956 4954 if (FRAME_X_DISPLAY (f))
4955 {
4957 #if defined (HAVE_TIMEVAL) && defined (HAVE_SELECT) 4956 #if defined (HAVE_TIMEVAL) && defined (HAVE_SELECT)
4958 if (visible_bell) 4957 if (visible_bell)
4959 XTflash (selected_frame); 4958 XTflash (f);
4960 else 4959 else
4961 #endif 4960 #endif
4962 { 4961 {
4963 BLOCK_INPUT; 4962 BLOCK_INPUT;
4964 XRINGBELL; 4963 XBell (FRAME_X_DISPLAY (f), 0);
4965 XFlush (FRAME_X_DISPLAY (selected_frame)); 4964 XFlush (FRAME_X_DISPLAY (f));
4966 UNBLOCK_INPUT; 4965 UNBLOCK_INPUT;
4966 }
4967 } 4967 }
4968 } 4968 }
4969 4969
4970 4970
4971 /* Specify how many text lines, from the top of the window, 4971 /* Specify how many text lines, from the top of the window,
6977 win_y = parent_y; 6977 win_y = parent_y;
6978 } 6978 }
6979 } 6979 }
6980 6980
6981 if (f1 == 0 && insist > 0) 6981 if (f1 == 0 && insist > 0)
6982 f1 = selected_frame; 6982 f1 = SELECTED_FRAME ();
6983 6983
6984 if (f1) 6984 if (f1)
6985 { 6985 {
6986 /* Ok, we found a frame. Store all the values. 6986 /* Ok, we found a frame. Store all the values.
6987 last_mouse_glyph is a rectangle used to reduce the 6987 last_mouse_glyph is a rectangle used to reduce the
8763 f = x_top_window_to_frame (dpyinfo, 8763 f = x_top_window_to_frame (dpyinfo,
8764 event.xclient.window); 8764 event.xclient.window);
8765 8765
8766 /* This is just so we only give real data once 8766 /* This is just so we only give real data once
8767 for a single Emacs process. */ 8767 for a single Emacs process. */
8768 if (f == selected_frame) 8768 if (f == SELECTED_FRAME ())
8769 XSetCommand (FRAME_X_DISPLAY (f), 8769 XSetCommand (FRAME_X_DISPLAY (f),
8770 event.xclient.window, 8770 event.xclient.window,
8771 initial_argv, initial_argc); 8771 initial_argv, initial_argc);
8772 else if (f) 8772 else if (f)
8773 XSetCommand (FRAME_X_DISPLAY (f), 8773 XSetCommand (FRAME_X_DISPLAY (f),