get a widget's location in screenspace

The absolute coordinate is in desktop space that’s why it works in fullscreen. You’d need remove the viewport’s inverse transform, to get it in viewport space. Though I don’t know if that transform is readily available.