gtk: Point right-click context menu exactly at cursor to improve behaviour at edges and closeness to cursor

This commit is contained in:
azhn
2025-02-12 19:01:04 +11:00
parent 338a07ecad
commit bf5351ed41

View File

@ -1284,8 +1284,8 @@ fn showContextMenu(self: *Surface, x: f32, y: f32) void {
const rect: c.GdkRectangle = .{
.x = @intFromFloat(point.x),
.y = @intFromFloat(point.y),
.width = 1,
.height = 1,
.width = 0,
.height = 0,
};
c.gtk_popover_set_pointing_to(@ptrCast(@alignCast(window.context_menu)), &rect);