diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2017-04-01 23:25:13 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2017-05-25 16:25:58 +0200 |
commit | d39afa60118f6e7a5cc2305c0f7bcfcf9ab955ee (patch) | |
tree | 192398294447efc44c076c85354b14cc7af0541e /modules/input/imbroadway.c | |
parent | 5836beee78fc3acf7a48ec01ab1dda72eac2bfc0 (diff) | |
download | gtk+-d39afa60118f6e7a5cc2305c0f7bcfcf9ab955ee.tar.gz |
imcontext: Remove API dependency on GdkWindow
There is now a set_client_widget() to hint the IM about positioning
and whatnot.
Diffstat (limited to 'modules/input/imbroadway.c')
-rw-r--r-- | modules/input/imbroadway.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/input/imbroadway.c b/modules/input/imbroadway.c index 140aa0e8c6..6a15999428 100644 --- a/modules/input/imbroadway.c +++ b/modules/input/imbroadway.c @@ -34,7 +34,7 @@ typedef struct _GtkIMContextBroadway { GtkIMContextSimple parent; - GdkWindow *client_window; + GtkWidget *client_widget; } GtkIMContextBroadway; typedef struct _GtkIMContextBroadwayClass @@ -66,11 +66,11 @@ static const GtkIMContextInfo *info_list[] = #endif static void -broadway_set_client_window (GtkIMContext *context, GdkWindow *window) +broadway_set_client_widget (GtkIMContext *context, GtkWidget *widget) { GtkIMContextBroadway *bw = GTK_IM_CONTEXT_BROADWAY (context); - bw->client_window = window; + bw->client_widget = widget; } static void @@ -79,9 +79,9 @@ broadway_focus_in (GtkIMContext *context) GtkIMContextBroadway *bw = GTK_IM_CONTEXT_BROADWAY (context); GdkDisplay *display; - if (bw->client_window) + if (bw->client_widget) { - display = gdk_window_get_display (bw->client_window); + display = gtk_widget_get_display (bw->client_widget); gdk_broadway_display_show_keyboard (GDK_BROADWAY_DISPLAY (display)); } } @@ -92,9 +92,9 @@ broadway_focus_out (GtkIMContext *context) GtkIMContextBroadway *bw = GTK_IM_CONTEXT_BROADWAY (context); GdkDisplay *display; - if (bw->client_window) + if (bw->client_widget) { - display = gdk_window_get_display (bw->client_window); + display = gtk_widget_get_display (bw->client_widget); gdk_broadway_display_hide_keyboard (GDK_BROADWAY_DISPLAY (display)); } } @@ -106,7 +106,7 @@ gtk_im_context_broadway_class_init (GtkIMContextClass *klass) klass->focus_in = broadway_focus_in; klass->focus_out = broadway_focus_out; - klass->set_client_window = broadway_set_client_window; + klass->set_client_widget = broadway_set_client_widget; } static void |