]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix incorrect offset calculation for clipped xwidget views
authorPo Lu <luangruo@yahoo.com>
Wed, 10 Nov 2021 06:29:54 +0000 (14:29 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 10 Nov 2021 06:29:54 +0000 (14:29 +0800)
* src/xwidget.c (from_embedder, to_embedder): Remove incorrect
adjustment of position by view clipping.

src/xwidget.c

index 4da5318706834d8fbcf9b11eeed201c794c43b63..034989b339c5e554034daace73c9897ef6dfddaf 100644 (file)
@@ -530,8 +530,8 @@ from_embedder (GdkWindow *window, double x, double y,
                                        FRAME_GTK_OUTER_WIDGET (xvw->frame),
                                        0, 0, &xoff, &yoff);
 
-      *xout = x - (xvw->x + xvw->clip_left) - xoff;
-      *yout = y - (xvw->y + xvw->clip_top) - yoff;
+      *xout = x - xvw->x - xoff;
+      *yout = y - xvw->y - yoff;
     }
 }
 
@@ -562,8 +562,8 @@ to_embedder (GdkWindow *window, double x, double y,
                                        FRAME_GTK_OUTER_WIDGET (xvw->frame),
                                        0, 0, &xoff, &yoff);
 
-      *xout = x + xvw->x + xvw->clip_left + xoff;
-      *yout = y + xvw->y + xvw->clip_top + yoff;
+      *xout = x + xvw->x + xoff;
+      *yout = y + xvw->y + yoff;
     }
 }