diff options
author | John Ralls <jralls@ceridwen.us> | 2021-10-10 13:16:49 -0700 |
---|---|---|
committer | John Ralls <jralls@ceridwen.us> | 2021-10-10 13:16:49 -0700 |
commit | cfadca696bee8f576834a8ccf6b927dd9c2b4030 (patch) | |
tree | 72313f14f0a9991e70f786479e6f7dd7f528735a | |
parent | 5311616ca15ecbca19cfa7b81ba20a44a151cb62 (diff) | |
download | gtk+-cfadca696bee8f576834a8ccf6b927dd9c2b4030.tar.gz |
[gtkimcontextquartz] Accommodate moving GdkSurface widget to private.
Fixes macOS build.
-rw-r--r-- | gtk/gtkimcontextquartz.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkimcontextquartz.c b/gtk/gtkimcontextquartz.c index fc1e1ff3a8..a64b9a22e0 100644 --- a/gtk/gtkimcontextquartz.c +++ b/gtk/gtkimcontextquartz.c @@ -28,6 +28,7 @@ #include "gdk/macos/gdkmacos.h" #include "gdk/macos/gdkmacosdisplay-private.h" #include "gdk/macos/gdkmacossurface-private.h" +#include "gdk/gdksurfaceprivate.h" #import "gdk/macos/GdkMacosBaseView.h" @@ -304,6 +305,7 @@ static void quartz_set_cursor_location (GtkIMContext *context, GdkRectangle *area) { GtkIMContextQuartz *qc = GTK_IM_CONTEXT_QUARTZ (context); + GtkWidget* surface_widget = GTK_WIDGET (gdk_surface_get_widget (qc->client_surface)); int sx, sy; double wx, wy; @@ -316,8 +318,9 @@ quartz_set_cursor_location (GtkIMContext *context, GdkRectangle *area) return; gdk_surface_get_origin (qc->client_surface, &sx, &sy); - gtk_widget_translate_coordinates(qc->client_widget, qc->client_surface->widget, area->x, area->y, &wx, &wy); - + gtk_widget_translate_coordinates(qc->client_widget, surface_widget, + area->x, area->y, &wx, &wy); + qc->cursor_rect->x = sx + (int) wx; qc->cursor_rect->y = sy + (int) wy; qc->cursor_rect->width = area->width; |