summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-02-11 11:46:46 -0500
committerDana Jansens <danakj@orodu.net>2010-02-11 14:06:00 -0500
commit41dbce908a981214d2d61e813c17d9415f938d87 (patch)
tree7f9c320739b41325bf839b91b8447552ba520371 /openbox
parent43d62990e407f409f76f60a405c529f9b15d33f6 (diff)
make obt translate keypress events to a valid utf8 character (note this makes openbox not compile)
Diffstat (limited to 'openbox')
-rw-r--r--openbox/prompt.c4
-rw-r--r--openbox/prompt.h2
2 files changed, 6 insertions, 0 deletions
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 <glib.h>
#include <X11/Xlib.h>
@@ -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