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
397bee1dc3
Fix C-r inside xwidget isearch
...
* lisp/xwidget.el (xwidget-webkit-isearch-backward): Ask for previous
result.
2021-11-07 15:16:29 +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
Jim Porter
e31086fe1a
; * test/lisp/net/tramp-tests.el: Rearrange tests to be in order.
2021-11-07 13:59:32 +01:00
Po Lu
a05f6bb671
Document the xwidget type
...
* doc/lispref/elisp.texi: Add Xwidget Type to the menu.
* doc/lispref/objects.texi (Editing Types): Add Xwidget Type to the
menu.
(Xwidget Type): New node.
2021-11-07 14:51:16 +02: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
Basil L. Contovounesios
e9a5084c45
; Fix some recent typos/thinkos.
2021-11-07 12:59:18 +02:00
Cristian
35ff4f800b
Another addition to latin-2 input methods
...
* lisp/leim/quail/latin-pre.el ("latin-2-prefix"):
* lisp/leim/quail/latin-post.el ("latin-2-postfix"): Add variants
of "`t" and "t," for Romanian. (Bug#51638)
Copyright-paperwork-exempt: yes
2021-11-07 12:46:25 +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
Eli Zaretskii
54b726c815
; * etc/PROBLEMS: More specific recipe for WebKit-related crashes.
2021-11-07 09:34:30 +02:00
Stefan Monnier
f80fd099fc
* doc/lispref/tips.texi (Coding Conventions): Mention GNU "path" convention
...
Suggested by Ihor Radchenko <yantar92@gmail.com>.
2021-11-07 01:11:28 -04: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
Po Lu
e20c27c770
Fix backspace in xwidget webkit isearch
...
* lisp/xwidget.el: Set backspace to
xwidget-webkit-isearch-erasing-char (bug#51647).
2021-11-07 04:32:20 +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
969ce9d201
Improve xwidget isearch visuals
...
* lisp/xwidget.el (xwidget-webkit-isearch--update): New argument
ONLY-MESSAGE.
(xwidget-webkit-isearch-forward)
(xwidget-webkit-isearch-backward): Always refresh message.
(xwidget-webkit-isearch-mode): Update message when enabling.
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
Po Lu
686ce501cb
Rationalize creation decisions
...
* src/xwidget.c (webkit_create_cb): Only create a new widget if type
is OTHER.
2021-11-07 02:59:42 +01:00
Po Lu
0be966f97e
Make "open in new window" from an xwidget's context menu work
...
* doc/lispref/commands.texi (Xwidget Events): Document new event type.
* doc/lisprefdisplay.texi (Xwidgets): Document new argument to
make-xwidget, and new function.
* etc/NEWS: Document changes.
* lisp/xwidget.el: Bind xwidget-display-event to
xwidget-webkit-display-event.
(xwidget-webkit-import-widget): New function.
(xwidget-webkit-display-event): New command.
* src/keyboard.c (kbd_buffer_get_event): New event type.
(make_lispy_event): Handle XWIDGET_DISPLAY_EVENTs.
(syms_f_keyboard): Define new symbol.
* src/termhooks.h (enum event_kind): New enum XWIDGET_DISPLAY_EVENT.
* src/xwidget.c (webkit_create_cb)
(store_xwidget_display_event)
(webkit_ready_to_show)
(webkit_create_cb_1, webkit_create_cb)
(Fset_xwidget_buffer): New functions.
(Fmake_xwidget): Add internal argument RELATED and connect create
signal.
(syms_of_xwidget): Define now subrs.
2021-11-07 02:59:42 +01:00
Po Lu
1a84537f79
Add xwidget-webkit-isearch to the menu bar and tool bar
...
* lisp/xwidget.el: Add isearch to tool bar and menu bar.
(xwidget-webkit-mode-map)
(xwidget-webkit-isearch-mode-map): Reorder key definitions so the
equivalent key shows up as `C-s' in the menu bar.
2021-11-07 02:59:42 +01:00
Po Lu
e7503291d3
Add xwidget-webkit-isearch-mode
...
* etc/NEWS:
* doc/emacs/misc.texi: Document changes
* lisp/xwidget.el (xwidget-webkit-mode-map): Bind C-s and C-r to
webkit isearch.
(xwidget-webkit-isearch--string, xwidget-webkit-isearch--is-reverse):
New buffer-local variables.
(xwidget-webkit-isearch--update, xwidget-webkit-isearch-erasing-char)
(xwidget-webkit-isearch-printing-char, xwidget-webkit-isearch-forward)
(xwidget-webkit-isearch-backward, xwidget-webkit-isearch-exit):
New functions.
(xwidget-webkit-isearch-mode-map): New keymap.
(xwidget-webkit-isearch-mode): New minor mode.
2021-11-07 02:59:41 +01:00
Po Lu
286467a6b1
Add functions for performing searches on xwidgets
...
* etc/NEWS:
* doc/lispref/display.texi: Document changes.
* src/xwidget.c (Fxwidget_webkit_search)
(Fxwidget_webkit_next_result)
(Fxwidget_webkit_previous_result)
(Fxwidget_wenkit_finish_search): New functions.
(syms_of_xwidget): Define new built-ins.
(kill_buffer_xwidgets): Free search query if present.
* src/xwidget.h (struct xwidget): Add field for search query.
2021-11-07 02:59:41 +01:00
Po Lu
cb45114363
Make it safe to have non-xwidget views in xwidget-view-list
...
* src/xwidget.c (define_cursors, offscreen_damage_event): Check
XWIDGET_VIEW_P before XXWIDGET_VIEW.
2021-11-07 02:59:41 +01:00
Po Lu
cd1f02e1e3
Make xwidgets print nicer
...
* src/print.c (print_vectorlike): Print xwidgets with ID and widget
pointer, and print xwidget views separately.
2021-11-07 02:59:41 +01:00
Po Lu
eb5a079fee
Fix cursor for new widget views
...
* src/xwidget.c (Fmake_xwidget): Clear hit result.
(cursor_for_hit): Use integer hit result.
(define_cursors): Set hit result appropriately.
(widget_init_view): Set cursor to the existing hit result.
* src/xwidget.h (struct xwidget): Add hit result field.
2021-11-07 02:59:41 +01:00
Po Lu
1cc19d0437
Add support for cursors in xwidget views
...
* src/xwidget.c (mouse_target_changed): New function.
(Fmake_xwidget): Attach mouse target changed signal.
(cursor_for_hit, define_cursors, mouse_target_changed): New functions.
(xwidget_init_view): Set default cursor to nontext cursor.
(x_draw_xwidget_glyph_string): Define cursor.
* src/xwidget.h (struct xwidget_view): Add cursor field.
2021-11-07 02:59:41 +01:00
Po Lu
74711c0298
Display page titles in xwidget webkit header line
...
* lisp/xwidget.el (xwidget-webkit--title): New variable.
(xwidget-webkit-callback, xwidget-webkit-mode): Set header line format
and associated variables.
2021-11-07 02:59:41 +01:00
Po Lu
7269bdd599
Improve detail of load-changed xwidget events
...
* src/xwidget.c (webkit_view_load_changed_cb): Improve event detail.
* etc/NEWS: Document changes.
* doc/lispref/commands.texi: Document Xwidget events.
* doc/lispref/display.texi (Xwidgets): Add reference to Xwidget events.
2021-11-07 02:59:41 +01:00
Po Lu
f1fbf87775
Make the WebKit inspector available
...
* etc/NEWS: Document changes.
* src/xwidget.c (find_widget_at_pos)
(find_widget)
(find_widget_cb): New functions.
(struct widget_search_data): New structure.
(Fmake_xwidget): Enable web inspector for WebKit widgets.
(Fxwidget_perform_lispy_event): Use current focus instead of
hard-coded widget.
(xwidget_button_1, xwidget_button, xwidget_motion_or_crossing):
Use window at event position instead of the default widget.
2021-11-07 02:59:41 +01:00
Po Lu
8729ae29d8
Add xwidget-webkit-copy-selection-as-kill to the menu bar
...
* lisp/xwidget.el: New menu item
`xwidget-webkit-copy-selection-as-kill'.
2021-11-07 02:59:41 +01:00
Po Lu
cd7158edd3
Add new tool-bar items to xwidget-webkit
...
* etc/images/README: Update copyright information for new images.
* etc/images/connect-to-url.pbm:
* etc/images/connect-to-url.xpm: Import new images from GNOME.
* lisp/xwidget.el (xwidget-webkit-tool-bar-map): New keymap variable.
(xwidget-webkit-mode): Set tool-bar-map to the appropriate map.
2021-11-07 02:59:41 +01:00
Po Lu
d97718c87c
Add a menu to xwidget-webkit
...
* lisp/xwidget.el: Add a menu to xwidget-webkit-mode-map.
2021-11-07 02:59:41 +01:00
Po Lu
32ec485e5c
Redisplay xwidget view windows instead of just setting their size
...
* src/xwidget.c (Fxwidget_resize): Mark windows as needing redisplay
and redisplay instead.
2021-11-07 02:59:40 +01:00
Po Lu
49ed706683
Select window when clicking on an xwidget view
...
* src/xterm.c (handle_one_xevent): Select window when clicking on an
xwidget view.
2021-11-07 02:59:40 +01:00
Po Lu
650e5e8e92
Fix xwidget scrolling
...
* src/xterm.c (x_scroll_run): Use from_y and height.
2021-11-07 02:59:40 +01:00
Po Lu
8ddeebbe0c
Allow enabling xwidget-webkit-edit-mode via a binding
...
* doc/emacs/misc.texi: Document changes.
* lisp/xwidget.el (xwidget-webkit-mode-map): Add shortcut for
xwidget-webkit-edit-mode.
2021-11-07 02:59:40 +01:00
Po Lu
6ed7454f17
Add xwidget-webkit-edit-mode to make using the WebKit browser easier
...
* doc/emacs/misc.texi: Document changes.
* etc/NEWS: Document recent changes.
* lisp/xwidget.el (xwidget-webkit-pass-command-event): New variable.
* lisp/xwidget.el (xwidget-perform-lispy-event): New function
declaration.
* lisp/xwidget.el (xwidget-webkit-edit-mode): New minor mode.
2021-11-07 02:59:40 +01:00
Po Lu
b48a89fd2e
Fix special events in xwidgets
...
* src/xwidget.c (set_widget_if_text_view): New function.
(Fxwidget_perform_lispy_event): Fix for webkit widgets.
2021-11-07 02:59:40 +01:00
Po Lu
32b9df6d21
Fix drag on xwidget motion events
...
* src/xwidget.c (xwidget_motion_or_crossing): Set state.
2021-11-07 02:59:40 +01:00
Po Lu
3e640399d8
Handle crossing events on xwidget windows correctly
...
* src/xterm.c (handle_one_xevent): Clear help and mouse face
when handling xwidget entry events.
* src/xwidget.c (xwidget_motion_or_crossing): Add device to crossing
events.
(x_draw_xwidget_glyph_string): Add EnterWindowMask and
LeaveWindowMask.
2021-11-07 02:59:40 +01:00
Po Lu
e111a5f3a0
Draw offscreen surface
...
* src/xwidget.c (xv_do_draw): Draw offscreen surface.
2021-11-07 02:59:40 +01:00
Po Lu
b39f1f158b
Implement function for sending events to widgets
...
* doc/lispref/display.texi (Xwidgets): Document changes.
* src/keyboard.c (lispy_function_keys): Make non-static on X.
* src/keyboard.h (lispy_function_keys): Expose lispy_function_keys on
X.
* src/xterm.c (x_emacs_to_x_modifiers): Export function.
* src/xterm.h (x_emacs_to_x_modifiers): Likewise.
* src/xwidget.c (Fxwidget_perform_lispy_event)
(find_suitable_keyboard): New functions.
(syms_of_xwidget): Define new subr.
2021-11-07 02:59:40 +01:00
Po Lu
c9c1b436ae
Use gtk_widget_queue_draw instead of xv_do_draw
...
* src/xwidget.c (x_draw_xwidget_glyph_string): Call
gtk_widget_queue_draw.
2021-11-07 02:59:40 +01:00
Po Lu
1e16fc2634
Prefer XMoveResizeWindow to XMoveWindow for resizing xwidgets
...
* src/xwidget.c (x_draw_xwidget_glyph_string): Prefer
XMoveResizeWindow to avoid extra expose events.
2021-11-07 02:59:40 +01:00
Po Lu
f52f772530
Allow xwidgets to accept motion and button events
...
* src/xterm.c (handle_one_xevent): Pass through some events to
xwidgets.
* src/xwidget.c (synthesize_focus_in_event)
(find_suitable_pointer, xwidget_button_1)
(xwidget_button, xwidget_motion_or_crossing): New functions.
(xwidget_view_from_window): Draw offscreen window instead of the
widget.
(x_draw_xwidget_glyph_string): Set appropriate event masks.
* src/xwidget.h (xwidget_button, xwidget_motion_or_crossing): New
functions.
2021-11-07 02:59:40 +01:00
Po Lu
9c9e15a018
Destroy xwidgets when destroying frames
...
* src/xterm.c (x_free_frame_resources): Make sure to kill xwidget views.
* src/xwidget.c (Fmake_xwidget): Attach damage event signal.
(offscreen_damage_event): Operate on xwidgets and not individual
views.
(xwidget_init_view): Don't attach damage event signal here.
(Fdelete_xwidget_view): Destroy window correctly and stop removing
damage event signal.
(kill_frame_xwidget_views): New function.
* src/xwidget.c (kill_frame_xwidget_views): New function.
2021-11-07 02:59:39 +01:00
Po Lu
5c387ad437
Enable scrolling optimization for xwidgets
...
* src/dispextern.h (struct glyph): Store xwidget ID instead of a
reference.
* src/dispnew.c (scrolling_window): Enable scrolling optimization on
xwidget builds.
* src/xdisp.c (fill_xwidget_glyph_string, produce_xwidget_glyph):
Obtain xwidget from ID.
* src/xterm.c (x_scroll_run): Scroll xwidget windows.
* src/xwidget.c (id_to_xwidget_map, xwidget_counter): New xwidget
variables.
(Fmake_xwidget): Assign each xwidget a unique ID, and keep track of
that ID.
(xwidget_from_id): New function.
(syms_of_xwidget): Initialize id_to_xwidget_map.
(xwidget_end_redisplay): Lookup xwidgets via ID.
* src/xwidget.h (struct xwidget): Add ID field.
(xwidget_from_id): New function.
2021-11-07 02:59:39 +01:00