Created attachment 456348 [details] [diff] [review] implement this With titlebars present on a popup, there is a need to have a way to get the screen position and size including window decorations of the popup. The usual screen coordinate retrieval methods return the position and size without decorations.
Created attachment 520627 [details] [diff] [review] fix up whitespace
Comment on attachment 520627 [details] [diff] [review] fix up whitespace This doesn't work in a popupshowing handler. In the case of a standalone popup, the rectangle returned is that from when the popup was last shown. In the case of a popup attached to a menu, the rectangle returned is also wrong, but in a different way which I didn't investigate further.
Created attachment 525728 [details] [diff] [review] updated patch
The views and widgets are set to 0,0 size while closed, so the value during a popupshowing handler isn't valid. So here I just always set the rectangle to (0,0,0,0) during popupshowing.
Neil, please put metadata in your checkin-needed patches?