From 1bf0c713bd27334b88931a4dbc0e991612090b14 Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Sun, 20 Sep 2009 09:26:54 +0000 Subject: [PATCH] Make e16keyedit work in e16 window mode. SVN revision: 42579 --- ipc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ipc.c b/ipc.c index 1ecd249..6ab2cad 100644 --- a/ipc.c +++ b/ipc.c @@ -27,8 +27,9 @@ typedef struct _client Client *e_client = NULL; -static Window comms_win = 0; -static Window my_win = 0; +static Window root_win = None; +static Window comms_win = None; +static Window my_win = None; static GdkWindow *gdkwin = NULL; static GdkWindow *gdkwin2 = NULL; static void (*msg_receive_callback) (gchar * msg) = NULL; @@ -216,7 +217,12 @@ CommsFilter(GdkXEvent * gdk_xevent, GdkEvent * event, gpointer data) static void CommsSetup(void) { - my_win = XCreateSimpleWindow(GDK_DISPLAY(), GDK_ROOT_WINDOW(), + char *str; + + str = getenv("ENL_WM_ROOT"); + root_win = (str) ? strtoul(str, NULL, 0) : GDK_ROOT_WINDOW(); + + my_win = XCreateSimpleWindow(GDK_DISPLAY(), root_win, -100, -100, 5, 5, 0, 0, 0); } @@ -236,7 +242,7 @@ CommsFindCommsWindow(void) if (a != None) { s = NULL; - XGetWindowProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(), a, 0, 14, False, + XGetWindowProperty(GDK_DISPLAY(), root_win, a, 0, 14, False, AnyPropertyType, &ar, &format, &num, &after, &s); if (s) {