Skip to content

GTK4 gdk/broadway: correct gdk_broadway_device_query_state() to return pointer coordinates relative to the upper left corner of surface

gdk_broadway_surface_get_device_state() function in gdk/brooadway/gdksurface-broaway.c, which implements get_device_state vfunc for GdkBroadwaySurface, expects gdk_broadway_device_query_state() function to return pointer coordinates relative to the upper left corner of the surface. However, in the current main branch the absolute pointer coordinates are returned (relative to tho the top left cornet of the browser where broadway.js is running.

This is causing pointer click positions misinterpreted for any GTK window not positioned at the top left corner of the browser. E.g. for the Print Unix Dialog with more than one printer available and displayed by GTK at the default position, the click on a printer in the list leads to a printer listed just below a target one is selected.

This merge request fixes this issue.

Merge request reports