From 41dbce908a981214d2d61e813c17d9415f938d87 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 11 Feb 2010 11:46:46 -0500 Subject: make obt translate keypress events to a valid utf8 character (note this makes openbox not compile) --- openbox/prompt.c | 4 ++++ openbox/prompt.h | 2 ++ 2 files changed, 6 insertions(+) (limited to 'openbox') diff --git a/openbox/prompt.c b/openbox/prompt.c index 73536152..9fd56773 100644 --- a/openbox/prompt.c +++ b/openbox/prompt.c @@ -166,6 +166,8 @@ ObPrompt* prompt_new(const gchar *msg, const gchar *title, CopyFromParent, CWOverrideRedirect, &attrib); + self->ic = obt_keyboard_context_new(self->super.window, + self->super.window); /* make it a dialog type window */ OBT_PROP_SET32(self->super.window, NET_WM_WINDOW_TYPE, ATOM, @@ -239,6 +241,8 @@ void prompt_unref(ObPrompt *self) prompt_list = g_list_remove(prompt_list, self); + obt_keyboard_context_unref(self->ic); + for (i = 0; i < self->n_buttons; ++i) { window_remove(self->button[i].window); XDestroyWindow(obt_display, self->button[i].window); diff --git a/openbox/prompt.h b/openbox/prompt.h index 3c46c309..13585740 100644 --- a/openbox/prompt.h +++ b/openbox/prompt.h @@ -22,6 +22,7 @@ #include "window.h" #include "geom.h" #include "obrender/render.h" +#include "obt/keyboard.h" #include #include @@ -47,6 +48,7 @@ struct _ObPrompt ObInternalWindow super; gint ref; + ObtIC *ic; guint event_mask; /* keep a copy of this because we re-render things that may need it -- cgit v1.2.3