In Add logo to bottom right corner of a plain frame which already has an image a way is described to put an image in the corner. However, in my theme (Madrid) there is also an infoline at the bottom. I tried adding the beamercolorbox infoline height, which is 2.25ex according to the default beamer infoline theme style file, of the infoline to my tikz placement as follows:
\begin{frame}
\begin{tikzpicture}[remember picture,overlay]
\draw[red] ($(current page.south east)+(-2cm, 2cm)+(0,2.25ex)$) rectangle ($(current page.south east)+(0, 2.25ex)$);
\end{tikzpicture}%
\end{frame}
But it still overshoots, notice the white between the red rectangle and blue infoline. To be clear, I want there to be no white visible between the red and the blue. Is there a way to query the height of the footline in beamer? I couldn't find it in the manual. Or is there some component of beamercolorbox that makes the height somehow smaller that I am forgetting? I would be grateful for any ideas or tips!