summaryrefslogtreecommitdiff
path: root/src/actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c
index 969fa95..70136d8 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -3135,6 +3135,11 @@ cmd_license (int interactive, struct cmdarg **args)
"[Press any key to end.] ",
NULL};
+ /* Switch to the default colormap. */
+ if (current_window())
+ XUninstallColormap (dpy, current_window()->colormap);
+ XInstallColormap (dpy, s->def_cmap);
+
XMapRaised (dpy, s->help_window);
XGrabKeyboard (dpy, s->help_window, False, GrabModeSync, GrabModeAsync, CurrentTime);
@@ -3171,6 +3176,13 @@ cmd_license (int interactive, struct cmdarg **args)
XUngrabKeyboard (dpy, CurrentTime);
XUnmapWindow (dpy, s->help_window);
+ /* Possibly restore colormap. */
+ if (current_window())
+ {
+ XUninstallColormap (dpy, s->def_cmap);
+ XInstallColormap (dpy, current_window()->colormap);
+ }
+
/* The help window overlaps the bar, so redraw it. */
if (current_screen()->bar_is_raised)
redraw_last_message();
@@ -3199,6 +3211,11 @@ cmd_help (int interactive, struct cmdarg **args)
int drawing_keys = 1; /* 1 if we are drawing keys 0 if we are drawing commands */
char *keysym_name;
+ /* Switch to the default colormap. */
+ if (current_window())
+ XUninstallColormap (dpy, current_window()->colormap);
+ XInstallColormap (dpy, s->def_cmap);
+
XMapRaised (dpy, s->help_window);
XGrabKeyboard (dpy, s->help_window, False, GrabModeSync, GrabModeAsync, CurrentTime);
@@ -3289,6 +3306,13 @@ cmd_help (int interactive, struct cmdarg **args)
XUngrabKeyboard (dpy, CurrentTime);
XUnmapWindow (dpy, s->help_window);
+ /* Possibly restore colormap. */
+ if (current_window())
+ {
+ XUninstallColormap (dpy, s->def_cmap);
+ XInstallColormap (dpy, current_window()->colormap);
+ }
+
/* The help window overlaps the bar, so redraw it. */
if (current_screen()->bar_is_raised)
redraw_last_message();