summaryrefslogtreecommitdiff
path: root/openbox/screen.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-27 22:38:48 +0000
committerDana Jansens <danakj@orodu.net>2007-05-27 22:38:48 +0000
commita59540f25aed8551262a89b6426b201546a8418c (patch)
tree9fe028d9fa6cd2419cf2ea43ae2a53075311cbea /openbox/screen.c
parent35889c2854b55c14a41c854271249fa813e81cf1 (diff)
improve the colormap setting code
Diffstat (limited to 'openbox/screen.c')
-rw-r--r--openbox/screen.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/openbox/screen.c b/openbox/screen.c
index f424ca04..deaf55ee 100644
--- a/openbox/screen.c
+++ b/openbox/screen.c
@@ -1026,17 +1026,16 @@ void screen_show_desktop(gboolean show, ObClient *show_only)
void screen_install_colormap(ObClient *client, gboolean install)
{
- if (client == NULL) {
+ if (client == NULL || client->colormap == None) {
if (install)
XInstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst));
else
XUninstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst));
} else {
xerror_set_ignore(TRUE);
- if (install) {
- if (client->colormap != None)
- XInstallColormap(RrDisplay(ob_rr_inst), client->colormap);
- } else
+ if (install)
+ XInstallColormap(RrDisplay(ob_rr_inst), client->colormap);
+ else
XUninstallColormap(RrDisplay(ob_rr_inst), client->colormap);
xerror_set_ignore(FALSE);
}