1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-12 10:44:12 -08:00
Commit graph

44371 commits

Author SHA1 Message Date
Eli Zaretskii
2c082ce800 ; * src/term.c (init_tty): Fix last change. 2021-11-11 16:58:47 +02:00
Eli Zaretskii
4a261ce91d ; * src/term.c (init_tty): Fix style of parentheses. 2021-11-11 16:56:46 +02:00
Eli Zaretskii
386289bdc8 Fix 8-color PuTTY -nw sessions broken by a recent commit
* src/term.c (init_tty): Fix the change which introduced support
for the terminfo Tc flag.  The code as installed broke colors in
PuTTY -nw sessions, because 'tigetflag' returned -1, which is
non-zero, so it was treated as the sign that true color is
supported.  But if the value returned by 'tigetflag' is -1, it means
the capability is not a boolean one, so that's not to be used as a
valid support for 24-bit color.  (Bug#44950)
2021-11-11 16:55:11 +02:00
Tim Ruffing
f30f531159 Support Tc terminfo flag for 24-bit color support in terminal
* src/term.c (init_tty): Use the Tc flag (bug#44950).

Copyright-paperwork-exempt: yes
2021-11-11 07:14:57 +01:00
Po Lu
3d253fa3aa Add `xwidget-webkit-load-html'
* doc/lispref/display.texi (Xwidgets): Document new function.
* etc/NEWS: Announce new function.
* src/xwidget.c (Fxwidget_webkit_load_html): New function.
(syms_of_xwidget): Define new subr.
2021-11-11 08:31:09 +08:00
Eli Zaretskii
32086ea233 Fix font weights on MS-Windows
* src/w32font.c (w32_decode_weight, w32_encode_weight)
(w32_to_fc_weight): Adjust weight translations to match those in
font.c and gtkutil.c:xg_weight_to_symbol.  (Bug#51704)
2021-11-10 20:17:33 +02:00
Po Lu
4d99388c16 Prevent GDK warning about missing event devices in most cases
* src/xwidget.c (synthesize_focus_in_event): Set event device to
selected frame's pointer if it's an X frame.
2021-11-10 19:43:53 +08:00
Stefan Kangas
1bb3fb4e45 Merge from origin/emacs-28
2782bc113e Revert "Fix localized display of date and time in the NS p...
2021-11-10 12:12:29 +01:00
Po Lu
32d1a735ce Remove obsolete limitation
* src/xwidget.c (Fxwidget_webkit_goto_history): Accept any fixnum as
REL-POS, to be consistent with docstring.
2021-11-10 15:47:56 +08:00
Po Lu
465ec29926 Fix incorrect offset calculation for clipped xwidget views
* src/xwidget.c (from_embedder, to_embedder): Remove incorrect
adjustment of position by view clipping.
2021-11-10 14:29:54 +08:00
Po Lu
9653cbf355 Fix invisible content in WebKit dialogs
* src/xwidget.c (webkit_script_dialog_cb): Use custom label instead of
dialog box title to display message.
2021-11-10 14:19:15 +08:00
Po Lu
1e5eb566cc Set embedder correctly to fix menus appearing in the wrong location
* src/xwidget.c (record_osr_embedder, from_embedder, to_embedder): New
functions.
(Fmake_xwidget): Attach from-embedder and to-embedder signals.
(find_widget_for_offscreen_window): New function.
(xwidget_button, xwidget_motion_or_crossing): Set embedder on event.
(Fdelete_xwidget_view): Remove embedder status if applicable.

* src/xwidget.h (struct xwidget): New fields `embedder' and
`embedder-view'.
2021-11-10 14:06:07 +08:00
Po Lu
e27ca55ecb Revert "Fix mouse face in NS port"
This reverts commit 278e4fc9c6.
2021-11-10 14:04:26 +08:00
Po Lu
2e2260427e Revert "*** empty log message ***"
This reverts commit 68a2a3307d.
2021-11-10 14:04:25 +08:00
Po Lu
b21f1cabd8 Revert "Add support for event processing via XInput 2"
This reverts commit 346cfc8124.
2021-11-10 14:04:24 +08:00
Po Lu
12beb77ec8 Revert "Fix erasing cursor on top of raised boxes in NS port"
This reverts commit 2b5a2ab50b.
2021-11-10 14:04:22 +08:00
Po Lu
da5de19423 Revert "Revert "Fix erasing cursor on top of raised boxes in NS port""
This reverts commit 7117bbc7aa.
2021-11-10 14:04:21 +08:00
Po Lu
e9b954f0fd Revert "Support opening the toolkit menu bar on NS"
This reverts commit ff9cf991c1.
2021-11-10 14:04:05 +08:00
oldosfan
ff9cf991c1 Support opening the toolkit menu bar on NS
* src/nsmenu.m (ns_activate_menubar, Fns_open_menubar): New functions.
* src/nsterm.m (ns_create_terminal): Add activate_menubar_hook.
* lisp/menu-bar.el (menu-bar-open): Use ns-menu-bar-open on Nextstep.
2021-11-10 13:27:01 +08:00
oldosfan
7117bbc7aa Revert "Fix erasing cursor on top of raised boxes in NS port"
This reverts commit 960f0eb9ab657af85c532574b937d8851049b178.
2021-11-10 13:27:01 +08:00
oldosfan
2b5a2ab50b Fix erasing cursor on top of raised boxes in NS port
* src/nsterm.m (ns_draw_relief): Clear top and bottom line areas
first, if required.
2021-11-10 13:27:01 +08:00
oldosfan
346cfc8124 Add support for event processing via XInput 2
* configure.ac: Add an option to use XInput 2 if available
* src/Makefile.in (XINPUT_LIBS, XINPUT_CFLAGS): New variables
(EMACS_CFLAGS): Add Xinput CFLAGS
(LIBES): Add XInput libs
* src/xmenu.c (popup_activated_flag): Expose flag if XInput 2 is
available
* src/xfns.c (x_window): Set XInput 2 event mask
* src/xterm.c (x_detect_focus_change): Handle XInput 2 GenericEvents
(handle_one_xevent): Handle XInput 2 events
(x_term_init): Ask the server for XInput 2 support and set xkb_desc if
available
(x_delete_terminal): Free XKB kb desc if it exists, and free XI2
devices if they exist
(x_free_xi_devices, x_init_master_valuators): New functions
(x_get_scroll_valuator_delta): New function
(init_xterm): Don't tell GTK to only use Core Input when built with
XInput 2 support
* src/xterm.h (struct x_display_info): Add fields for XKB and XI2
support
* src/gtkutil.c (xg_event_is_for_menubar): Handle XIDeviceEvents
(xg_is_menu_window): New function
(xg_event_is_for_scrollbar): Handle XIDeviceEvents
2021-11-10 13:27:01 +08:00
oldosfan
68a2a3307d *** empty log message *** 2021-11-10 13:27:01 +08:00
oldosfan
278e4fc9c6 Fix mouse face in NS port
* src/nsterm.m (ns_draw_glyph_string): Set s->face to the mouse face.
2021-11-10 13:27:01 +08:00
Lars Ingebrigtsen
63fa896cb0 Try to fix intermittent build problem on Macos
* src/Makefile.in (@): Also sign the bootstrap-emacs executable
2021-11-10 02:21:48 +01:00
Po Lu
912ae5de92 Prevent BadValue errors when creating tiny xwidget views
* src/xwidget.c (x_draw_glph_string): Avoid resizing xwidget views
to an invalid size (bug#51707).
2021-11-10 00:52:47 +01:00
Stefan Kangas
2782bc113e Revert "Fix localized display of date and time in the NS port"
This reverts commit 5e05be566b.

This was discussed in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51321#93
2021-11-09 08:49:34 +01:00
Po Lu
606d8ffe45 Fix default target of motion events
* src/xwidget.c (xwidget_motion_or_crossing): Default to widget_osr
instead of its window (bug#51703).
2021-11-09 08:24:45 +01:00
Po Lu
e9ff213639 Make `kill_frame_xwidget_views' safe
* src/xwidget.c (kill_frame_xwidget_views): Check XWIDGET_VIEW_P
(bug#51701).
2021-11-09 07:47:17 +01:00
Lars Ingebrigtsen
a097303ebb ARGUMENTS in Fmake_xwidget is optional
* src/xwidget.c (Fmake_xwidget): The ARGUMENTS argument isn't
mandatory.
2021-11-09 05:51:37 +01:00
Po Lu
35f9e0f469 Fix flicker when setting hscroll of xwidget
* src/xterm.c (x_scroll_run): Use original height of xwidget instead
of window height and set cairo surface size (bug#51697).
2021-11-09 05:06:24 +01:00
Po Lu
b5efdccefb Raise an error if creating an unknown xwidget type
* src/xwidget.c (Fmake_xwidget): Error if TYPE is invalid (bug#51682).
2021-11-09 05:03:47 +01:00
Po Lu
394f6b9167 Really fix xwidget scroll optimization and clip
* src/xterm.c (x_scroll_run): Improve clip detection.
* src/xwidget.c (xv_do_draw): Use cairo_translate.
(xwidget_motion_or_crossing): Use correct fields (bug#51681).
2021-11-09 05:02:25 +01:00
Lars Ingebrigtsen
846ff29420 Remove code what would always maximize xwidgets on Macos
* src/xwidget.c (x_draw_xwidget_glyph_string): Remove code that
would always maximize the widget on Macos (bug#51674).  This code
was probably added to work around a resizing bug that has since
been fixed.
2021-11-08 08:01:07 +01:00
Po Lu
51aa6cee2c Fix resize of xwidgets on GTK
* src/xwidget.c (Fxwidget_resize): Queue widget for re-allocation
after setting its size request (bug#51679).
2021-11-08 07:38:41 +01:00
Po Lu
553e4b74f7 Fix hang when displaying xwidget script dialog
* src/xwidget.c (webkit_script_dialog_cb): New function.
(Fmake_xwidget): Attach script callback signal (bug#51674).
2021-11-08 06:25:02 +01:00
Po Lu
6fa5f0cbbc Set clipping when dumping stretch glyphs in some cases
* src/nsterm.m (ns_draw_glyph_string): Always focus even when dumping
stretch glyphs in s->next (bug#51653).
2021-11-08 01:16:29 +01:00
Michael Albinus
54fd811eec Merge from origin/emacs-28
7fdb2ae412 Add some unit tests for 'abbreviate-file-name'
21de5e7b2e Fix compilation MinGW warnings
54b726c815 ; * etc/PROBLEMS: More specific recipe for WebKit-related ...
d85cf33e49 Escape '%' in filenames to fix flymake warnings
6243a43ac2 Fix search string generation in nnimap-make-thread-query
f05b8a939b Update to Org 9.5-68-g77e2ec
2021-11-07 18:06:24 +01:00
Eli Zaretskii
21de5e7b2e Fix compilation MinGW warnings
* src/w32.h (prepare_standard_handles, reset_standard_handles):
Fix prototypes.  Reported by Andy Moreton
<andrewjmoreton@gmail.com> in
https://lists.gnu.org/archive/html/emacs-devel/2021-11/msg00597.html.
2021-11-07 17:02:46 +02:00
Po Lu
73d17fd4b7 Free find text in correct procedure
* src/xwidget.c (Fxwidget_webkit_previous_result): Don't free find
text.
(Fxwidget_webkit_finish_search): Free find text here instead.
2021-11-07 15:16:53 +01:00
Po Lu
48a9621db7 Fix xwidget-webkit-goto-history
* src/xwidget.c (xwidget-webkit-goto-history): Use
WebKitBackForwardList and XFIXNUM instead of XFIXNAT (bug#51651).
2021-11-07 14:41:43 +01:00
Po Lu
cbc14f9b4e Handle WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION appropriately
* src/xwidget.c (webkit_decide_policy_cb): Send an xwidget display
event when a webpage asks to create a new window.
2021-11-07 14:14:43 +01:00
Eli Zaretskii
75f4af0b30 Improve detection of suspiciously reordered text segments
* src/bidi.c (bidi_find_first_overridden): Detect reordered weak
and neutral characters as well.

* lisp/international/mule-cmds.el
(highlight-confusing-reorderings): Count and announce how many
instances were found.

* test/src/xdisp-tests.el
(xdisp-tests--find-directional-overrides-case-3): New test.
(xdisp-tests--find-directional-overrides-case-2): Adjust expected
result.
2021-11-07 14:22:15 +02:00
Eli Zaretskii
d5bb053809 Fix documentation and coding style in recent xwidget commits
* src/xwidget.c (Fmake_xwidget, find_widget)
(xwidget_motion_or_crossing, xwidget_button_1, xwidget_button):
Fix style in comments.
(Fxwidget_perform_lispy_event): Doc fix.
* src/xwidget.c (set_widget_if_text_view, kill_frame_xwidget_views):
* src/keyboard.c (make_lispy_event): Fix style of braces.

* lisp/xwidget.el (xwidget-webkit-isearch-mode): Fix keys in doc
string.

* doc/lispref/commands.texi (Xwidget Events): Fix markup and
wording.
* doc/lispref/display.texi (Xwidgets): Fix wording and markup.
* doc/emacs/misc.texi (Embedded WebKit Widgets): Fix wording.

* etc/NEWS: Fix wording and punctuation.
2021-11-07 11:50:06 +02:00
Lars Ingebrigtsen
c5767603ae Ensure that the x_show_hourglass is seen
* src/xterm.c (x_show_hourglass): Ensure that the hourglass is
seen (bug#51649).
2021-11-07 05:12:00 +01:00
Lars Ingebrigtsen
858868e36d Actually start the alarms in atimer
* src/atimer.c (set_alarm): Actually start both timerfd and
alarms (attempted in 4107549a).
2021-11-07 04:55:02 +01:00
Lars Ingebrigtsen
b42a4884d8 Remove too-agressive window refresh in the hourglass code
* src/xterm.c (x_show_hourglass): Don't force a spurious refresh
(bug#51649).
2021-11-07 04:10:56 +01:00
Po Lu
5b7ab895e1 Fix build on nextstep
* src/xwidget.h: Make some prototypes conditional to X-Windows.
(struct xwidget): Move find_text field out of GTK conditional.

* src/xwidget.c (Fmake_xwidget): Move find_text out of GTK
conditional.
* src/print.c (print_vectorlike): Print correct pointer on macOS.
2021-11-07 02:59:42 +01:00
Po Lu
3e04f1f7d2 Fix web inspector
* src/xwidget.c (Fmake_xwidget): Move developer extra initialization.
2021-11-07 02:59:42 +01:00
Po Lu
eabd735e6c Default to creating new related sessions
* doc/lispref/display.texi:
* etc/NEWS: Document changes.

* lisp/xwidget.el (xwidget-insert): Accept an extra RELATED argument.
(xwidget-webkit-new-session): Pass current session as RELATED if
present.

* src/xwidget.c (Fmake_xwidget): Make RELATED argument public.
2021-11-07 02:59:42 +01:00