ime: Stop using gdk_surface_get_user_data

Use gtk_root_get_for_surface instead.
This commit is contained in:
Matthias Clasen 2019-02-23 16:52:23 -05:00
parent a13d8501d4
commit 2501152842

View File

@ -29,6 +29,7 @@
#include "gtkimcontextime.h"
#include "gtkimmoduleprivate.h"
#include "gtkroot.h"
#include "imm-extra.h"
@ -878,9 +879,9 @@ gtk_im_context_ime_set_preedit_font (GtkIMContext *context)
if (!context_ime->client_surface)
return;
gdk_surface_get_user_data (context_ime->client_surface, (gpointer) &widget);
if (!GTK_IS_WIDGET (widget))
return;
widget = gtk_root_get_for_surface (context_ime->client_surface);
if (!widget)
return
hwnd = gdk_win32_surface_get_impl_hwnd (context_ime->client_surface);
himc = ImmGetContext (hwnd);