1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 16:21:07 -08:00
Commit graph

45265 commits

Author SHA1 Message Date
Po Lu
11add52bec Prevent duplicate grab setting with xwidgets
* src/xwidget.c (xwidget_show_view): Don't set passive grab if
already set.
2022-01-28 17:56:17 +08:00
Po Lu
15f8c6b11e Use the real cursor beneath the pointer on xwidgets
* src/xwidget.c (define_cursors): Make manual cursor definition
code PGTK-only.
(xw_update_cursor_for_view):
(xw_last_crossing_cursor_cb): New functions.
(xw_maybe_synthesize_crossing): Attach and disconnect cursor
signal handler where appropriate.
(xwidget_init_view): Set the default cursor to the nontext
cursor.
(Fxwidget_delete_view): Disconnect last crossing signal if
appropriate.
* src/xwidget.h (struct xwidget_view): New field
`last_crossing_cursor_signal'.
2022-01-28 16:40:40 +08:00
Po Lu
bad16c6f56 Fix xwidget build on PGTK
* src/xwidget.c (xw_forward_event_translate): Adjust calls to
`find_widget_at_pos' for recent changes.
2022-01-28 16:08:59 +08:00
Eli Zaretskii
b293e254eb ; Rename 'startup--require-comp-safetly'
* src/comp.c (maybe_defer_native_compilation):
* lisp/startup.el (startup--require-comp-safely): Rename from
'startup--require-comp-safetly'.  All callers changed.
2022-01-28 09:37:28 +02:00
Po Lu
84d4a34919 Fix duplicate scroll events without XI2
* src/xwidget.c (xwidget_button): Only generate scroll events
when the button was released.
2022-01-28 14:07:35 +08:00
Po Lu
2f0d67b047 Clear xwidget passive grab whenever a drag begins
* src/xwidget.c (xv_drag_begin_cb): New function.
(xwidget_view_from_window): Attach said function to grab widget
when a grab starts.
* src/xwidget.h (struct xwidget_view): New field
`passive_grab_drag_signal'.
2022-01-28 11:08:20 +08:00
Po Lu
bc404cd8ea * src/xterm.c (handle_one_xevent): Remove obsolete workaround. 2022-01-28 10:51:33 +08:00
Po Lu
47b7ec2a3d Fix inappropriate use of killed xwidgets
* src/xwidget.c (x_draw_xwidget_webkit_view): Don't record
embedder or synthesize focus events if the widget is killed.
2022-01-28 10:48:12 +08:00
Po Lu
8471c6f06c Implement xwidget passive grabs
* src/xwidget.c (find_widget_at_pos): New parameters for
controlling whether to respect grabs.  All callers changed.
(window_coords_from_toplevel): Make work when the widget is
the toplevel.
(find_widget): Fix coding style.
(xwidget_button_1): Set and clear passive grabs if appropriate.
(xw_maybe_synthesize_crossing): Allow current_window to be NULL
if the mode is XW_CROSSING_LEFT.
2022-01-28 10:41:03 +08:00
Lars Ingebrigtsen
8eaf04de83 Add new switch --init-directory
* doc/emacs/cmdargs.texi (Initial Options): Mention it.
* lisp/startup.el (normal-top-level): Move the eln init to after
we've processed the command line arguments.
(command-line): Interpret the --init-directory switch.

* src/emacs.c (standard_args): Add.
2022-01-27 23:38:13 +01:00
Andrea Corallo
536a57b72c Fix potential native compiler circular dependencies during load
* lisp/startup.el (startup--require-comp-safetly): New function.
(startup--honor-delayed-native-compilations): Make use of
`startup--require-comp-safetly'.
* src/comp.c (CALL0I): New define.
(maybe_defer_native_compilation): Make use of
`startup--require-comp-safetly'.
2022-01-27 23:02:31 +01:00
Eli Zaretskii
10c680551e Improve detection of glyphless characters on TTY frames
* src/term.c (produce_glyphs): If the terminal can report for
which characters it has glyphs, use that to determine whether
a given character should be displayed as glyphless.
2022-01-27 20:35:22 +02:00
Lars Ingebrigtsen
decd6f830c Revert "Don't output spurious prefixes in read-char-exclusive"
This reverts commit 701ec0bda2.

This change broke display of `C-q-' when doing the `C-q' command,
so it has to be fixed a different way.
2022-01-27 16:20:38 +01:00
Po Lu
0991e8686c Improve xwidget window ancestry calculations
* src/xwidget.c (xw_find_common_ancestor):
(xw_notify_virtual_upwards_until)
(xw_notify_virtual_downwards_until): New functions.
(xw_maybe_synthesize_crossing): Synthesize virtual events like
GTK does for non-linear changes.
2022-01-27 21:38:07 +08:00
Andreas Schwab
63255de48b * src/pdumper.c (dump_vectorlike): Handle PVEC_SYMBOL_WITH_POS. 2022-01-27 12:30:17 +01:00
Stefan Kangas
a8862f313b Merge from origin/emacs-28
c9524819ea Partially revert a fill-region-as-paragraph regression
6075ea0b79 Fix 'make_lispy_position' when there's an image at EOB

# Conflicts:
#	test/lisp/textmodes/fill-tests.el
2022-01-27 09:45:49 +01:00
Po Lu
b89ae23636 Implement crossing event generation between windows for xwidgets on X
* src/xwidget.c (enum xw_crossing_mode): New enum.
(xwidget_motion_notify):
(xwidget_motion_or_crossing): Synthesize crossing events if the
pointer moved between different windows.
(window_coords_from_toplevel):
(xw_maybe_synthesize_crossing): New functions.
(xwidget_init_view): Initialize new field to NULL.
(Fdelete_xwidget_view): Clear last crossing window.

* src/xwidget.h (struct xwidget_view): New field
`last_crossing_window'.
2022-01-27 14:00:46 +08:00
Po Lu
a0fbdb5166 Improve XI2 valuator reset logic
* src/xterm.c (handle_one_xevent): Clear valuators on XI_Leave
instead of XI_Enter.
2022-01-27 10:03:56 +08:00
Po Lu
458024a3d9 * src/xterm.c (x_focus_frame): Set input focus on outer window. 2022-01-27 09:33:11 +08:00
Po Lu
7116092eaf Get rid of unnecessary draw locking in haikumenu.c
* src/haikumenu.c (Fhaiku_menu_bar_open): Stop holding the draw
lock.
2022-01-27 01:26:54 +00:00
Po Lu
824440a7c8 Apply fix for bug#52761 to GTK native input as well
* src/xgselect.c (xg_select): Apply said fix on regular GTK
builds when native input is being used.
2022-01-27 09:20:25 +08:00
Mattias Engdegård
a3aeee88aa Minor concat tweaks
* src/fns.c (concat): Do things in the right order for speed.
(concat_strings): Initialise variable.
2022-01-26 17:10:16 +01:00
Eli Zaretskii
6075ea0b79 Fix 'make_lispy_position' when there's an image at EOB
* src/xdisp.c (move_it_to): Don't compare IT_CHARPOS with an
invalid TO_CHARPOS.  (Bug#53546)
2022-01-26 16:44:14 +02:00
Po Lu
9421678987 Add workaround for super modifier misconfiguration to non-XKB code
* src/xterm.c (x_find_modifier_meanings): Don't let a modifier
be both Hyper and Super.
2022-01-26 20:36:35 +08:00
Andrea Corallo
1200e55b6f Make use of NILP where possible
* src/w32menu.c (menubar_selection_callback, w32_menu_show): Use NILP
where possible.
* src/w32fns.c (w32_set_mouse_color): Likewise.
* src/w16select.c (Fw16_selection_exists_p): Likewise.
* src/process.c (Fnetwork_lookup_address_info): Likewise.
* src/cygw32.c (Fcygwin_convert_file_name_to_windows)
(Fcygwin_convert_file_name_from_windows): Likewise.
2022-01-26 12:59:10 +01:00
Po Lu
a2eb83d037 Simplify Haiku scrolling code
* src/haikuterm.c (haiku_scroll_run): Remove code that can never
be reached since Cairo frames are always double buffered.
2022-01-26 06:05:35 +00:00
Po Lu
401ccb0b9c Fix GTK menu bar height reporting when scaled
* src/gtkutil.c (xg_update_frame_menubar): Multiply requisition
height by GDK scale.
2022-01-26 13:53:20 +08:00
Po Lu
3e00ab5efb ; * src/xterm.c (handle_one_xevent): Fix formatting of XI2 switch. 2022-01-26 13:51:06 +08:00
Stefan Kangas
f97c3f9ced Merge from origin/emacs-28
7eca80b204 ; * src/composite.c (syms_of_composite) <auto-composition-...
2022-01-26 06:30:26 +01:00
Po Lu
db7de56eef Simplify Haiku underline code
* src/haikuterm.c (haiku_draw_text_decoration): Remove code left
over from when mouse face had to be set manually.
2022-01-26 05:09:09 +00:00
Po Lu
bca6855084 Make `haiku-menu-bar-open' faster
* src/haikumenu.c (Fhaiku_menu_bar_open): Get draw lock before
updating the menu bar.
* src/haikuterm.c (haiku_read_socket): Don't update menu bar if
b->no_lock.
2022-01-26 01:20:48 +00:00
Stefan Kangas
51fdcca000 * src/image.c (parse_image_spec): Use NILP. 2022-01-26 00:42:10 +01:00
Andrea Corallo
50fea24b8b * src/comp.c (emit_lisp_obj_rval): Make use of NILP. 2022-01-25 22:15:51 +01:00
Andrea Corallo
2d4d6f1a3f ;* src/fns.c (concat_strings): Add missing space. 2022-01-25 22:05:05 +01:00
Stefan Monnier
f4ed3f39c9 * src/comp.c (emit_limple_insn): Fix another int/Lisp_Object mixup 2022-01-25 14:36:48 -05:00
Eli Zaretskii
d25cb37694 ; * src/fns.c (concat_strings): Fix comment style. 2022-01-25 19:12:50 +02:00
Andrea Corallo
65172e61cc * src/fns.c (concat_strings): Clean-up unused variable. 2022-01-25 17:52:43 +01:00
Stefan Monnier
e8c66036d1 * src/lisp.h (lisp_h_EQ, lisp_h_NILP): Fix length and indent 2022-01-25 10:03:01 -05:00
Mattias Engdegård
697723b63d Faster concat, append, vconcat, copy-sequence, etc
Split the C auxiliary function `concat` into separate functions for
string and list/vector as target types, respectively.  This makes them
simpler and faster.

Implement `Fcopy_sequence` more efficiently for strings, lists and
vectors instead of using `concat`.

The result is a significant performance increase for the Lisp
built-ins concat, append, vconcat, copy-sequence and anything using
them such as mapconcat, copy-alist and propertize.

* src/fns.c (concat2, concat3, Fconcat): Use concat_strings.
(Fappend, Fvconcat): Adapt to changed signature of concat.
(Fcopy_sequence): Faster implementation for lists, strings, and vectors.
(concat_strings): New.
(concat): Strip code for string target, simplify, optimise.
(Fcopy_alist): Use Fcopy_sequence.
2022-01-25 15:51:25 +01:00
Eli Zaretskii
7eca80b204 ; * src/composite.c (syms_of_composite) <auto-composition-mode>: Doc fix. 2022-01-25 14:15:36 +02:00
Po Lu
4d342f36a6 Improve reliability of menu bar updates on Haiku
* src/haiku_support.cc (class EmacsWindow): New fields
`menu_update_cv', `menu_update_mutex' and `menu_updated_p'.
(~EmacsWindow): Destroy cv and mutex.
(MenusBeginning): Release lock and wait for condition to be
become true.
(EmacsWindow_signal_menu_update_complete): New function.
* src/haiku_support.h (struct haiku_menu_bar_state_event): New
field `no_lock'.
* src/haikumenu.c (Fhaiku_menu_bar_open): Always update menu
bar.
* src/haikuterm.c (haiku_read_socket): Always update menu bar
and signal the window thread after update completion.
2022-01-25 11:19:20 +00:00
Po Lu
03c9257b11 * src/haiku_support.cc (Highlight): Send events if !highlight_p. 2022-01-25 10:18:35 +00:00
Po Lu
0a70f748e7 Don't send menu help events on Haiku if the pointer isn't in the menu
* src/haiku_support.cc (Highlight): Only send help events
if the mouse cursor is actually in the menu.
2022-01-25 10:02:16 +00:00
Po Lu
b373c8ad71 Fix tool bar size reporting on GTK when the display is scaled
* src/gtkutil.c (xg_update_tool_bar_sizes): Multiply sizes to
turn them into device pixels.
2022-01-25 14:43:12 +08:00
Po Lu
ec403abc60 Improve portability of X11 IM code
* configure.ac: Test for XICCallback.callback if X11R6 or later.
* src/xfns.c (Xxic_preedit_start_callback): Use XICCallback if
present.
2022-01-25 11:49:39 +08:00
Po Lu
ea953db0a0 Fix invalid picture after toggling the tool bar or menu bar on GTK
* src/xterm.c (x_drop_xrender_surfaces): New function.
(handle_one_xevent): Call x_drop_xrender_surfaces instead of
just font_drop_xrender_surfaces.
2022-01-25 10:15:16 +08:00
Po Lu
eb4edfa0c8 Fix GTK native input on scaled displays
* src/xfns.c (xic_set_preeditarea): Scale preedit spot rectangle
before giving it to GTK.
2022-01-25 08:22:30 +08:00
Lars Ingebrigtsen
701ec0bda2 Don't output spurious prefixes in read-char-exclusive
* src/keyboard.c (read_char): Don't touch the echo area if
Vecho_keystrokes is nil.
* src/lread.c (read_filtered_event): Bind echo_keystrokes to nil
to avoid outputting prefixes we're not going to act on anyway
(bug#19718).
2022-01-24 18:19:38 +01:00
Mattias Engdegård
067e84116d ; * src/bytecode.c (exec_byte_code): Silence GCC warning 2022-01-24 15:03:20 +01:00
Po Lu
806a121007 Remove redundant declarations from keyboard.h that are now in lisp.h
* src/keyboard.h (process_pending_signals)
(pending_signals): Remove declarations.
2022-01-24 18:49:54 +08:00