summaryrefslogtreecommitdiff
path: root/src/actions.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2006-12-14 12:06:04 +0000
committersabetts <sabetts>2006-12-14 12:06:04 +0000
commit1ca0ac6946589f8450cd166ae5bff31689abe1b8 (patch)
treee19692556cd44d19a8229396c588bc5298e8f3d2 /src/actions.c
parent382f48f4cd9861e8c08d8d9c7ea7f67e87bd4e00 (diff)
downloadratpoison-1ca0ac6946589f8450cd166ae5bff31689abe1b8.zip
*** empty log message ***
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();