Skip to content

Instantly share code, notes, and snippets.

View learning's full-sized avatar
🏠
Working from home

Schopenlaam learning

🏠
Working from home
View GitHub Profile
@learning
learning / test_imcontext.c
Created October 31, 2016 02:51
Test GtkIMContext in gtk+2.0
#include <stdio.h>
#include <gtk/gtk.h>
static gboolean focus_callback(GtkWidget *gtk_window,
GdkEvent *event,
GtkIMContext *im_context) {
gtk_widget_grab_focus(gtk_window);
gtk_im_context_focus_in(im_context);
gtk_im_context_reset(im_context);
return TRUE;