diff options
author | Po Lu <luangruo@yahoo.com> | 2021-12-30 15:04:18 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2021-12-30 15:05:39 +0800 |
commit | 37ad776b9e6c90b2c289dd2413868066608594a7 (patch) | |
tree | ef9c53b9f1a9fe299e38bf29b3f69ecacb027ee2 /src/xwidget.c | |
parent | a3129af331b8893cec3036f8baec26d49e339b5f (diff) | |
download | emacs-37ad776b9e6c90b2c289dd2413868066608594a7.tar.gz |
Make xwidget motion commands hscroll the window of wide widgets
* lisp/xwidget.el (xwidget-info): New function declaration.
(xwidget-webkit-scroll-forward):
(xwidget-webkit-scroll-backward): Hscroll the window if the
widget is wider than the text area. (bug#52885)
* src/xwidget.c (xwidget_scroll, xwidget_motion_notify): Apply
clip offsets to coordinates.
Diffstat (limited to 'src/xwidget.c')
-rw-r--r-- | src/xwidget.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xwidget.c b/src/xwidget.c index 5aeb2beae2d..49e15a0955c 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -1156,7 +1156,8 @@ xwidget_motion_notify (struct xwidget_view *view, record_osr_embedder (view); target = find_widget_at_pos (model->widgetwindow_osr, - lrint (x), lrint (y), + lrint (x + view->clip_left), + lrint (y + view->clip_top), &target_x, &target_y); if (!target) @@ -1198,7 +1199,8 @@ xwidget_scroll (struct xwidget_view *view, double x, double y, record_osr_embedder (view); target = find_widget_at_pos (model->widgetwindow_osr, - lrint (x), lrint (y), + lrint (x + view->clip_left), + lrint (y + view->clip_top), &target_x, &target_y); if (!target) |