Commit graph

862 commits

Author SHA1 Message Date
Stefan Monnier
6ca5360192 Include ThreeD.h for XtNbeNiceToColormap.
(x_create_toolkit_scroll_bar): Test XtNbeNiceToColormap before using it.
Use XtNtopShadowPixel and XtNbottomShadowPixel.
(x_set_toolkit_scroll_bar_thumb): Remove ugly old hack that didn't
really work and that breaks with some versions of Xaw3d.
2005-03-31 22:43:13 +00:00
Andreas Schwab
9b516537a9 (handle_one_xevent): Use union of struct input_event and
struct selection_input_event to avoid aliasing issues.
(SET_SAVED_MENU_EVENT): Adapt reference to inev.
2005-02-17 12:52:35 +00:00
Richard M. Stallman
799775ff76 (x_error_quitter): On GCC 3 and up, specify noinline. 2005-02-03 07:36:15 +00:00
Kim F. Storm
dbd8ee1913 (x_clip_to_row): Ensure y >= 0.
(x_draw_hollow_cursor): Use get_phys_cursor_geometry.
2005-01-27 22:34:05 +00:00
Stefan Monnier
043f7f7333 (x_error_quitter): Add a prototype. Make it static again. 2005-01-27 17:00:38 +00:00
Richard M. Stallman
b70001a192 (x_error_quitter): No longer static, and moved after x_error_handler. 2005-01-25 01:26:57 +00:00
Kim F. Storm
82ead4b142 (x_draw_glyph_string_box): Fix last_x for full width rows. 2005-01-20 15:23:22 +00:00
Jan Djärv
42d02da077 * xterm.c (handle_one_xevent): Clear area in expose event for GTK. 2004-12-31 18:16:10 +00:00
Kenichi Handa
6875d1ae8c (x_new_font): Set FRAME_COLUMN_WIDTH to
fontp->average_width, not FONT_WIDTH.  Set FRAME_SPACE_WIDTH to
fontp-?space_width..
(x_load_font): Calculate fontp->space_width and
fontp->average_width.
(x_term_init): Initialize dpyinfo->Xatom_AVERAGE_WIDTH.
2004-12-30 12:26:31 +00:00
Jan Djärv
fecad3f659 * xterm.c (xg_scroll_callback): Update XG_LAST_SB_DATA before
returning when xg_ignore_gtk_scrollbar is true.
2004-12-15 21:34:14 +00:00
Jan Djärv
c83c9f9db7 * xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff
for left and top calculations.  Remove call to x_real_positions.
(x_check_expected_move): Do not set change_gravity to 1 when calling
x_set_offset.
2004-12-11 18:46:43 +00:00
Kim F. Storm
08f6668226 (x_clip_to_row): Add area arg. Callers changed.
(x_draw_hollow_cursor, x_draw_bar_cursor): Clip to TEXT_AREA.
2004-11-21 15:49:12 +00:00
Kim F. Storm
958f04e8f0 * xterm.c (handle_one_xevent): Don't queue X selection events
here, it may be too late if we start queuing after we have already
stored some selection events into the kbd buffer.
(struct selection_event_queue, queue, x_queue_selection_requests)
(x_queue_event, x_unqueue_events, x_start_queuing_selection_requests)
(x_stop_queuing_selection_requests): Remove/move to xselect.c.
(x_catch_errors_unwind): Block input around final XSync.
2004-11-05 11:30:44 +00:00
Jan Djärv
a11e1dce8f * xterm.c (x_window_to_scroll_bar): Only call
xg_get_scroll_id_for_window if toolkit scroll bars are used.
2004-11-02 16:25:50 +00:00
Jan Djärv
c27ed90af5 * xterm.h (x_output): New member `xic_base_fontname'.
(FRAME_XIC_BASE_FONTNAME): New macro.
(xic_free_xfontset): Declare.

* xfns.c (xic_create_xfontset): Share fontsets between frames
based on base_fontname.
(xic_free_xfontset): New function.
(free_frame_xic): Use it.
(xic_set_xfontset): Ditto.

* xterm.c (xim_destroy_callback): Ditto.
2004-10-21 18:38:58 +00:00
Jan Djärv
6bd8015d00 * xterm.c (x_clear_frame): Remove call to xg_frame_cleared
(x_scroll_bar_create, XTset_vertical_scroll_bar): Remove
arguments left and width to xg_update_scrollbar_pos.
(XTset_vertical_scroll_bar): Do x_clear_area for USE_GTK also.
2004-10-19 16:40:34 +00:00
Kim F. Storm
61087d3fd6 (x_redisplay_interface): Fix flush_display_optional. 2004-10-12 14:14:07 +00:00
Kim F. Storm
f94a2622a0 (x_update_window_end): Fix flicker on vertical line between
windows.  Update vertical line after drawing window fringes, but
only if actually drawing any bitmaps--or there is no fringe.
2004-10-07 21:59:39 +00:00
Jan Djärv
b90ee8b5fe * xterm.c (x_find_modifier_meanings): Ignore any Super or Hyper for
a row if Alt or Meta has been found for that row.  Also stop scanning
for Keysyms for that row.
2004-10-05 10:52:53 +00:00
Kim F. Storm
13fcb8896e (XTset_vertical_scroll_bar): Improve handling of scroll
bars with fractional column width.  If scroll bar separates two
windows, move it towards the window it belongs to.  Only update
the padding area below the scroll bar widget when necessary,
i.e. when scroll bar widget is created, moved, or resized.
2004-10-04 14:07:06 +00:00
Stefan Monnier
2c51754c78 (x_term_init): Work around a bug in some X servers. 2004-09-18 21:36:02 +00:00
Jan Djärv
2728b5d02c * xterm.c (x_catch_errors_unwind): Do not XSync if display has closed. 2004-08-24 17:22:33 +00:00
Kim F. Storm
d64b707cb1 Rename wait_reading_process_input to wait_reading_process_output. 2004-08-20 10:34:12 +00:00
Stefan Monnier
07a6ab76c0 (x_detect_focus_change): Remove unused var `nr_events'.
(x_calc_absolute_position): Remove unused var `child'.
2004-06-30 19:36:36 +00:00
Jan Djärv
95911c7476 * xterm.c (x_draw_image_foreground_1): Subtract slice.x/y from
clip_x/y_origin.
2004-06-17 19:35:00 +00:00
Kim F. Storm
a0ecb2ac8e Update copyright. 2004-06-16 15:10:55 +00:00
Kim F. Storm
5970dbf71e (x_draw_hollow_cursor): Fix height of box for narrow lines. 2004-04-24 23:42:26 +00:00
Kim F. Storm
57326d9998 (x_draw_relief_rect): Add top_p and bot_p args.
(x_draw_glyph_string_box): Fix call to x_draw_relief_rect.
(x_draw_image_foreground, x_draw_image_relief)
(x_draw_image_foreground_1, x_draw_image_glyph_string):
Draw sliced images.
2004-04-20 22:19:23 +00:00
Kim F. Storm
40d0e2815a (handle_one_xevent): Set mouse_face_hidden after clearing highlight. 2004-04-05 21:55:16 +00:00
Kim F. Storm
ccf1626aa7 (x_initialize): Initialize ignore_next_mouse_click_timeout. 2004-03-29 22:53:14 +00:00
Kim F. Storm
0666d82cff (x_mouse_click_focus_ignore_position): New var.
(syms_of_xterm): DEFVAR_BOOL it.
(ignore_next_mouse_click_timeout): New var.
(handle_one_xevent): Clear it on KeyPress, set it on EnterNotify.
Use it to filter mouse clicks following focus event.
2004-03-29 22:49:15 +00:00
Jan Djärv
e8a84b6c3a * xterm.c (handle_one_xevent): Do not pass key press events to
GTK.
2004-03-20 16:11:23 +00:00
Jan Djärv
b59dd9c823 xfns.c (x_window): Fixed indentation
* xterm.c (x_calc_absolute_position): Call x_real_positions
  to get WM window sizes and use those to calculate position.
  (x_set_offset): Removed code commented out.
2004-02-28 16:22:06 +00:00
Kim F. Storm
89079179f3 (x_focus_changed, x_detect_focus_change): Remove
numchars arg.  Always store event into bufp arg.  Return nothing.
Callers changed accordingly.
(glyph_rect): Simplify.
(STORE_KEYSYM_FOR_DEBUG): New macro.
(SET_SAVED_MENU_EVENT): Use inev instead of bufp, etc.
(current_bufp, current_numcharsp) [USE_GTK]: Remove.
(current_hold_quit) [USE_GTK]: Add.
(event_handler_gdk): Adapt to new handle_one_xevent.
(handle_one_xevent): Remove bufp_r and numcharsp args.
Add hold_quit arg. Rework to use just one, local, inev
input_event. Store inev directly in fifo using
kbd_buffer_store_event_hold.  Update count in one place.
Postpone call to gen_help_event until inev is stored; use new
local do_help for this.
Simplify handling of keysyms (consolidate common code).  Fix bug
where count was updated with nchars instead of nbytes.
Remove local emacs_event in handing of ButtonPress event; just use
inev instead (so no reason to copy it later).
Remove `out' label.  Rename label `ret' to `done'; add various
`goto done' to clarify code flow in deeply nested blocks.
(x_dispatch_event): Simplify as handle_one_xevent now calls
kbd_buffer_store_event itself.
(XTread_socket): Remove bufp_r and numcharsp args. Add hold_quit
arg.  Call handle_one_xevent with new arglist.  Store event from
x_session_check_input in fifo.
[USE_GTK]: Setup current_hold_quit.
Decrement handling_signal before unblocking input.
(x_initialize) [USE_GTK]: Initialize current_count.
2004-02-27 23:49:48 +00:00
Kim F. Storm
82b05d81af (x_draw_fringe_bitmap): Handle wider bitmaps (max 16 bits). 2004-02-13 23:27:38 +00:00
Kim F. Storm
fe1a14c1eb (x_draw_fringe_bitmap): Handle overlayed fringe bitmaps.
Use cursor color for displaying cursor in fringe.
(x_redisplay_interface): Add null handlers for
define_fringe_bitmap and destroy_fringe_bitmap functions.
2004-02-08 23:21:19 +00:00
Jan Djärv
e69745bba5 * xterm.c (handle_one_xevent): Call x_handle_dnd_message for
ClientMessages.
2004-02-03 16:34:26 +00:00
Kim F. Storm
3c0882ae5c (x_update_window_end): Call draw_window_fringes.
(x_after_update_window_line): Just set redraw_fringe_bitmaps_p
in row instead of actually drawing fringe bitmaps.
(x_draw_fringe_bitmap): Handle bottom aligned bitmaps.
(x_draw_window_cursor): Draw cursor in fringe.
2004-01-16 18:47:40 +00:00
Jan Djärv
a633a9544b * xterm.c (handle_one_xevent): Don't handle characters that are part
of an old style (XLookupString) compose sequence.
2004-01-16 10:21:54 +00:00
Kim F. Storm
83c6eb57fc (Qface, Qmouse_face): Remove unused externs.
(x_draw_hollow_cursor): Draw cursor using glyph's rather than
row's ascent and descent, to get a sensible height on tall rows.
2003-12-28 00:13:34 +00:00
Jan Djärv
a0c6ef2d96 * xterm.c (x_window_to_scroll_bar): Move check of display to
where window_id is compared.
2003-11-17 06:06:24 +00:00
Jan Djärv
810f2256ba Implement multiple display handling for GTK. 2003-11-16 16:05:24 +00:00
Jan Djärv
0b03cc78b8 * xterm.c (x_detect_focus_change): Do not change focus frame for
Enter/LeaveNotify if the current focus frame has explicit focus.
2003-11-14 19:13:02 +00:00
Kenichi Handa
176c852b4c (x_list_fonts): Fix excluding of auto-scaled fonts. 2003-11-11 07:47:44 +00:00
Jan Djärv
cfda993e1a * xterm.c (XAW_ARROW_SCROLLBARS): Define it for Xaw 1.5E. 2003-11-08 12:45:13 +00:00
Jan Djärv
d04103a100 * xterm.c (x_term_init): Fix formatting. 2003-11-03 05:55:42 +00:00
Jan Djärv
6cc8bc072c * xterm.c (x_term_init): For GTK part, increase x_initialized
to check for more than one display.  Use error instead of return 0.
2003-10-31 22:04:05 +00:00
Jan Djärv
068ae0fd96 * w32term.c (w32_read_socket): Remove call to x_check_fullscreen_move,
that function is removed.

* xterm.c (x_set_offset): Use move_offset_left/top instead of
x/y_pixels_outer_diff.
(x_check_expected_move): Calculate move_offset_left/top.

* xterm.h (struct x_output): New members: move_offset_top/left.

* frame.c (x_set_frame_parameters): x_fullscreen_move removed,
call x_set_offset directly.

* frame.h (enum): FULLSCREEN_MOVE_WAIT removed.
2003-10-05 13:42:04 +00:00
Jan Djärv
96f09305d6 Fix memory leaks (from YAMAMOTO Mitsuharu) 2003-10-05 12:15:39 +00:00
Jan Djärv
c1f0671ae9 Make (modify-frame-parameters nil '((top . 0))) work for all types
of window managers in X.
2003-10-05 11:52:47 +00:00