From 1ca0ac6946589f8450cd166ae5bff31689abe1b8 Mon Sep 17 00:00:00 2001 From: sabetts Date: Thu, 14 Dec 2006 12:06:04 +0000 Subject: *** empty log message *** --- src/bar.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/bar.c') 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); -- cgit v1.2.3