summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-06-23 11:59:55 +0000
committerMatthias Clasen <mclasen@redhat.com>2022-06-23 11:59:55 +0000
commit0660bb834ea964f46bcc8958ea88bea6012f2933 (patch)
treef97d5288904cc50c17b7cf99d2c2610e33754bb9 /gdk
parent5be54fad828a3fcf584d06e13baae578a7e136ca (diff)
parent5301a74bd3554612540ef7a59079a78e732644c5 (diff)
downloadgtk+-0660bb834ea964f46bcc8958ea88bea6012f2933.tar.gz
Merge branch 'bad-popup-extents' into 'main'
[x11] Fix coordinate space of rect in gdk_x11_surface_get_frame_extents when called on popups. See merge request GNOME/gtk!4820
Diffstat (limited to 'gdk')
-rw-r--r--gdk/x11/gdksurface-x11.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index fb3b0bd7df..e21ba9b5b6 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -2793,14 +2793,19 @@ gdk_x11_surface_get_frame_extents (GdkSurface *surface,
impl = GDK_X11_SURFACE (surface);
/* Refine our fallback answer a bit using local information */
- rect->x = impl->abs_x * impl->surface_scale;
- rect->y = impl->abs_y * impl->surface_scale;
- rect->width = surface->width * impl->surface_scale;
- rect->height = surface->height * impl->surface_scale;
+ rect->x = impl->abs_x;
+ rect->y = impl->abs_y;
+ rect->width = surface->width;
+ rect->height = surface->height;
if (GDK_SURFACE_DESTROYED (surface) || impl->override_redirect)
return;
+ rect->x *= impl->surface_scale;
+ rect->y *= impl->surface_scale;
+ rect->width *= impl->surface_scale;
+ rect->height *= impl->surface_scale;
+
nvroots = 0;
vroots = NULL;