diff options
Diffstat (limited to 'src/input.c')
-rw-r--r-- | src/input.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/input.c b/src/input.c index cadd5cb..afef806 100644 --- a/src/input.c +++ b/src/input.c @@ -497,6 +497,11 @@ get_more_input (char *prompt, char *preinput, /* We don't want to draw overtop of the program bar. */ hide_bar (s); + /* Switch to the default colormap. */ + if (current_window()) + XUninstallColormap (dpy, current_window()->colormap); + XInstallColormap (dpy, s->def_cmap); + XMapWindow (dpy, s->input_window); XRaiseWindow (dpy, s->input_window); XClearWindow (dpy, s->input_window); @@ -547,5 +552,12 @@ get_more_input (char *prompt, char *preinput, XUngrabKeyboard (dpy, CurrentTime); XUnmapWindow (dpy, s->input_window); + /* Possibly restore colormap. */ + if (current_window()) + { + XUninstallColormap (dpy, s->def_cmap); + XInstallColormap (dpy, current_window()->colormap); + } + return final_input; } |