summaryrefslogtreecommitdiff
path: root/src/xwidget.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Send scroll stop events to xwidgets when built with XInput 2Po Lu2021-12-031-0/+3
| | | | | | | | | | | | | | | * src/xwidget.c (xwidget_scroll): Set xg_event->scroll.is_stop when appropriate.
* | | Merge remote-tracking branch 'origin/master' into feature/pgtkPo Lu2021-11-301-84/+523
|\| |
| * | Fix xwidget popups on XI2 againPo Lu2021-11-281-0/+10
| | | | | | | | | | | | * src/xwidget.c (xwidget_button_1): Release seat grab.
| * | Fix xwidget popups on XI2Po Lu2021-11-281-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | * src/gtkutil.c (xg_is_menu_window): Determine whether wdesc is a menu generated by a menu bar more reliably. * src/xwidget.c (xwidget_button_1): Release all XI2 grabs on click.
| * | Make `xwidget-display-event' a special event as wellPo Lu2021-11-221-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/commands.texi (Xwidget Events): Document that `xwidget-display-event' is a special event, and that it should be handled through callbacks. * etc/NEWS: Update NEWS entry. * lisp/xwidget.el (xwidget-webkit-new-session) (xwidget-webkit-import-widget): Attach display callback. (xwidget-webkit-display-event): Call display callback instead. (xwidget-webkit-display-callback): New function. * src/keyboard.c (make_lispy_event): Store source information for XWIDGET_DISPLAY_EVENT correctly. * src/xwidget.c (store_xwidget_display_event): Store source of the display request. (webkit_ready_to_show): Store source if available. (webkit_create_cb_1): Store source if available. (kill_xwidget): Remove dead widget from internal_xwidget_list.
| * | Implement `pick_embedded_child' for offscreen xwidgetsPo Lu2021-11-211-0/+29
| | | | | | | | | | | | | | | | | | * src/xwidget.c (pick_embedded_child): New function. (Fmake_xwidget): Connect `pick-embedded-child' signal to offscreen window.
| * | Attach download-started signals to correct WebKit contextPo Lu2021-11-211-4/+4
| | | | | | | | | | | | * src/xwidget.c (Fmake_xwidget): Use correct context.
| * | Allow handling smooth scroll events in xwidgetsPo Lu2021-11-211-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | * src/xterm.c (handle_one_xevent): Pass through XI2 motion events to xwidgets. * src/xterm.c (xwidget_button): Don't handle legacy scroll events on XInput 2. (xwidget_motion_notify, xwidget_scroll): New functions.
| * | Fix xwidgets with XInput 2 buildsPo Lu2021-11-201-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xwidget.c (Fmake_xwidget): Refrain from synthesizing a focus event here on XI2 builds. (Fxwidget_perform_lispy_event): Try to set embedder on XI2 builds and do nothing otherwise. (synthesize_focus_in_event): Use focus_change.window as opposed to any.window. (x_draw_xwidget_glyph_string): Synthesize focus event here instead on XI2 builds.
| * | Allow terminating page loading operations in webkit xwidgetsPo Lu2021-11-201-0/+25
| | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Xwidgets): Document new function. * etc/NEWS: Announce `xwidget-webkit-stop-loading'. * src/xwidget.c (Fxwidget_webkit_stop_loading): New function. (syms_of_xwidget): Define new subr.
| * | Fix documentation of last commitEli Zaretskii2021-11-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-cookie-file): Don't use "path" for file names in the doc string. Improve wording and markup of the doc string. * src/xwidget.c (Fxwidget_webkit_set_cookie_storage_file): * doc/lispref/display.texi (Xwidgets): Don't use "path" for file names. * etc/NEWS: Improve the wording of the entry about 'xwidget-webkit-cookie-file'.
| * | Allow controlling where xwidget-webkit stores cookiesPo Lu2021-11-191-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Xwidgets): Document new function. * etc/NEWS: Announce `xwidget-webkit-cookie-file' and `xwidget-webkit-set-cookie-storage-file'. * lisp/xwidget.el (xwidget-webkit-cookie-file): New user option. (xwidget-webkit-new-session): Set cookie storage file. * src/xwidget.c (Fmake_xwidget): Create new context for each unrelated widget. (Fxwidget_webkit_set_cookie_storage_file): New function. (syms_of_xwidget): Define new subr.
| * | Use CHECK_LIVE_XWIDGET in xwidget-webkit-estimated-load-progressPo Lu2021-11-191-1/+1
| | | | | | | | | | | | | | | * src/xwidget.c (Fxwidget_webkit_estimated_load_progress): Check for live xwidgets instead.
| * | Add `xwidget-webkit-estimated-load-progress'Po Lu2021-11-191-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Xwidgets): Document new function. * etc/NEWS: Announce new function. * src/xwidget.c (Fxwidget_webkit_estimated_load_progress): New function. (syms_of_xwidget): Define new subr.
| * | Prevent subprocess hangs in xwidgetPo Lu2021-11-171-5/+5
| | | | | | | | | | | | | | | | | | * src/xwidget.c (Fmake_xwidget, Fxwidget_webkit_goto_url): Use `catch_child_signal' instead of trying to preserve the previous signal handler.
| * | Don't draw xwidgets that have just been resizedPo Lu2021-11-171-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This serves to eliminate the huge black bar displayed when the offscreen widget has been resized (and as such the damage event signal is sent), but the X window hasn't. * src/xwidget.c (xv_do_draw): Don't draw xwidgets that have just been resized. (x_draw_xwidget_glyph_string) (xwidget_init_view): Clear just_resized. (Fxwidget_resize): Set just_resized first, then queue allocate.
| * | Lower xwidget views owned by parent when lowering framePo Lu2021-11-161-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | * src/xterm.c (x_lower_frame): Lower parent frame's xwidget views as well. * src/xwidget.h (lower_frame_xwidget_views): * src/xwidget.c (lower_frame_xwidget_views): New function.
| * | Prevent xwidget windows from obscuring child framesPo Lu2021-11-161-0/+1
| | | | | | | | | | | | | | | * src/xwidget.c (x_draw_xwidget_glyph_string): Lower view window when creating it.
| * | Fix documentation stringPo Lu2021-11-161-2/+2
| | | | | | | | | | | | | | | * src/xwidget.c (Vxwidget_list, Vxwidget_views_list): Fix horrid doc string.
| * | Fix xwidget-webkit-back-forward-listPo Lu2021-11-151-2/+2
| | | | | | | | | | | | | | | * src/xwidget.c (Fxwidget_webkit_back_forward_list): Use correct list variable in loop.
| * | Stop assuming xwidget views will only be displayed in TEXT_AREAPo Lu2021-11-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xterm.c (x_scroll_run): Use view->area when calculating xwidget view clipping. * src/xwidget.c (x_draw_xwidget_glyph_string): Set view->area to s->area and use that instead. * src/xwidget.h (struct xwidget_view): Add glyph row area field.
| * | Expose xwidget navigation history to Lisp codePo Lu2021-11-141-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Xwidgets): Document changes. * etc/NEWS: Announce new function. * src/xwidget.c (Fxwidget_webkit_back_forward_list): New function. (syms_of_xwidget): Define new subr.
| * | Add `kill-xwidget'Po Lu2021-11-141-24/+57
| | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Xwidgets): Document 'kill-xwidget'. * src/xwidget.c (kill_xwidget, Fkill_xwidget): New function. (syms_of_xwidget): Define new subr. (kill_buffer_xwidgets): Use `kill_xwidget' instead.
| * | Fix crash in xwidget_end_redisplayPo Lu2021-11-141-10/+7
| | | | | | | | | | | | | | | * src/xwidget.c (xwidget_end_redisplay): Always test if xv is NULL.
| * | Use GTK native file choosers in xwidget callbackPo Lu2021-11-131-12/+8
| | | | | | | | | | | | | | | * src/xwidget.c (run_file_chooser_cb): Use GtkFileChooserNative instead.
* | | Remove garbage #ifndefYuuki Harano2021-11-171-1/+0
| | | | | | | | | | | | | | | | | | | | | Maybe it was left by git merge miss. It prevented feature/pgtk from successful X-build with xwidget. * src/xwidget.c (Fxwidget_resize):
* | | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano2021-11-131-68/+235
|\| |
| * | Prevent NULL-pointer dereference on xwidget callback errorPo Lu2021-11-131-2/+2
| | | | | | | | | | | | | | | * src/xwidget.c (webkit_javascript_finished_cb): Check if `error' is NULL before freeing it.
| * | Fix file chooser hangs inside xwidget-webkitPo Lu2021-11-131-0/+71
| | | | | | | | | | | | | | | | | | * src/xwidget.c (run_file_chooser_cb): New function that runs a nested event loop instead of acting asynchronously. (Fmake_xwidget): Attach file chooser signal.
| * | Remove obsolete commentPo Lu2021-11-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The comment probably dated back to when xwidgets supported many other GTK+ widgets with other data. In the current implementation of xwidgets, everything that should be freed is already freed in `kill_buffer_xwidgets'. * src/xwidget.c (kill_buffer_xwidgets): Remove outdated TODO.
| * | Fix doc string for xwidget-webkit-load-htmlPo Lu2021-11-121-1/+1
| | | | | | | | | | | | * src/xwidget.c (Fxwidget_webkit_load_html): Fix doc string.
| * | Fix potential NULL dereference in xwidget-webkit-uriPo Lu2021-11-121-1/+4
| | | | | | | | | | | | | | | * src/xwidget.c (Fxwidget_webkit_uri): Don't assume webkit_web_view_get_uri will always return a valid string.
| * | Check for WebKit xwidgets inside all xwidget-webkit functionsPo Lu2021-11-121-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done in preparation for the introduction of other xwidgets, such as media xwidgets, even though there are only WebKit widgets at present. * src/xwidget.c (CHECK_WEBKIT_XWIDGET): New macro. (WEBKIT_FN_INIT): Use CHECK_WEBKIT_XWIDGET. (Fxwidget_webkit_search, Fxwidget_webkit_next_result) (Fxwidget_webkit_previous_result) (Fxwidget_webkit_finish_search) (Fxwidget_webkit_load_html): Check that xwidget is a WebKit widget.
| * | Prevent crashes from Lisp code modifying xwidget-listPo Lu2021-11-121-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xwidget.c (internal_xwidget_view_list) (internal_xwidget_list): New variable. (find_xwidget_for_offscreen_window) (define_cursors, offscreen_damage_event) (webkit_ready_to_show, xwidget_init_view) (Fxwidget_resize, Fdelete_xwidget_view) (Fxwidget_view_lookup, xwidget_spec_value) (lookup_xwidget, xwidget_end_redisplay) (kill_frame_xwidget_views, kill_buffer_xwidgets) (Fmake_xwidget, Fget_buffer_xwidgets): Use internal list. (syms_of_xwidget): Initialize internal xwidget lists.
| * | Prevent crashes in xwidgets whose buffers have been killedPo Lu2021-11-121-35/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Xwidgets): Explain meaning of killed xwidgets. * src/xwidget.c (Fxwidget_live_p): New function. (Fxwidget_perform_lispy_event, WEBKIT_FN_INIT) (Fxwidget_resize, Fxwidget_size_request) (Fxwidget_info, Fxwidget_plist) (Fset_xwidget_buffer, Fset_xwidget_plist) (Fset_xwidget_query_on_exit_flag) (Fxwidget_query_on_exit_flag) (Fxwidget_webkit_search) (Fxwidget_webkit_next_result) (Fxwidget_webkit_previous_result) (Fxwidget_webkit_finish_search) (Fxwidget_webkit_load_html): Check for live xwidgets instead of just xwidgets. (xwidget_button, xwidget_motion_or_crossing) (xv_do_draw, x_draw_xwidget_glyph_string) (Fdelete_xwidget_view): Ignore killed xwidgets. (syms_of_xwidget): Define new symbols and subrs and define appropriate weakness of id_to_xwidget map. (kill_buffer_xwidgets): Check live xwidgets instead of killed xwidgets, set xwidget buffer to nil, and rely on GC to free the hash table for us instead. * src/xwidget.h (XWIDGET_LIVE_P, CHECK_LIVE_XWIDGET): New macros.
| * | Add `xwidget-webkit-load-html'Po Lu2021-11-111-0/+41
| | | | | | | | | | | | | | | | | | | | | * 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.
* | | Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano2021-11-111-186/+1306
|\| |
| * | Prevent GDK warning about missing event devices in most casesPo Lu2021-11-101-0/+5
| | | | | | | | | | | | | | | * src/xwidget.c (synthesize_focus_in_event): Set event device to selected frame's pointer if it's an X frame.
| * | Remove obsolete limitationPo Lu2021-11-101-3/+1
| | | | | | | | | | | | | | | * src/xwidget.c (Fxwidget_webkit_goto_history): Accept any fixnum as REL-POS, to be consistent with docstring.
| * | Fix incorrect offset calculation for clipped xwidget viewsPo Lu2021-11-101-4/+4
| | | | | | | | | | | | | | | * src/xwidget.c (from_embedder, to_embedder): Remove incorrect adjustment of position by view clipping.
| * | Fix invisible content in WebKit dialogsPo Lu2021-11-101-4/+15
| | | | | | | | | | | | | | | * src/xwidget.c (webkit_script_dialog_cb): Use custom label instead of dialog box title to display message.
| * | Set embedder correctly to fix menus appearing in the wrong locationPo Lu2021-11-101-0/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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'.
| * | Prevent BadValue errors when creating tiny xwidget viewsPo Lu2021-11-101-2/+18
| | | | | | | | | | | | | | | * src/xwidget.c (x_draw_glph_string): Avoid resizing xwidget views to an invalid size (bug#51707).
| * | Fix default target of motion eventsPo Lu2021-11-091-1/+1
| | | | | | | | | | | | | | | * src/xwidget.c (xwidget_motion_or_crossing): Default to widget_osr instead of its window (bug#51703).
| * | Make `kill_frame_xwidget_views' safePo Lu2021-11-091-1/+2
| | | | | | | | | | | | | | | * src/xwidget.c (kill_frame_xwidget_views): Check XWIDGET_VIEW_P (bug#51701).
| * | ARGUMENTS in Fmake_xwidget is optionalLars Ingebrigtsen2021-11-091-1/+1
| | | | | | | | | | | | | | | * src/xwidget.c (Fmake_xwidget): The ARGUMENTS argument isn't mandatory.
| * | Raise an error if creating an unknown xwidget typePo Lu2021-11-091-0/+3
| | | | | | | | | | | | * src/xwidget.c (Fmake_xwidget): Error if TYPE is invalid (bug#51682).
| * | Really fix xwidget scroll optimization and clipPo Lu2021-11-091-4/+4
| | | | | | | | | | | | | | | | | | * 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).
| * | Remove code what would always maximize xwidgets on MacosLars Ingebrigtsen2021-11-081-16/+0
| | | | | | | | | | | | | | | | | | | | | * 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.
| * | Fix resize of xwidgets on GTKPo Lu2021-11-081-1/+2
| | | | | | | | | | | | | | | * src/xwidget.c (Fxwidget_resize): Queue widget for re-allocation after setting its size request (bug#51679).