summaryrefslogtreecommitdiff
path: root/src/bar.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/bar.c
parent382f48f4cd9861e8c08d8d9c7ea7f67e87bd4e00 (diff)
downloadratpoison-1ca0ac6946589f8450cd166ae5bff31689abe1b8.zip
*** empty log message ***
Diffstat (limited to 'src/bar.c')
-rw-r--r--src/bar.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bar.c b/src/bar.c
index 01ecfcd..08c8d23 100644
--- a/src/bar.c
+++ b/src/bar.c
@@ -62,6 +62,14 @@ hide_bar (rp_screen *s)
{
s->bar_is_raised = 0;
XUnmapWindow (dpy, s->bar_window);
+
+ /* Possibly restore colormap. */
+ if (current_window())
+ {
+ XUninstallColormap (dpy, s->def_cmap);
+ XInstallColormap (dpy, current_window()->colormap);
+ }
+
return 1;
}
@@ -78,6 +86,11 @@ show_bar (rp_screen *s, char *fmt)
XMapRaised (dpy, s->bar_window);
update_window_names (s, fmt);
+ /* Switch to the default colormap */
+ if (current_window())
+ XUninstallColormap (dpy, current_window()->colormap);
+ XInstallColormap (dpy, s->def_cmap);
+
reset_alarm();
return 1;
}
@@ -381,6 +394,11 @@ prepare_bar (rp_screen *s, int width, int height)
{
s->bar_is_raised = BAR_IS_MESSAGE;
XMapRaised (dpy, s->bar_window);
+
+ /* Switch to the default colormap */
+ if (current_window())
+ XUninstallColormap (dpy, current_window()->colormap);
+ XInstallColormap (dpy, s->def_cmap);
}
XRaiseWindow (dpy, s->bar_window);