From: Dana Jansens Date: Sun, 27 May 2007 22:38:48 +0000 (+0000) Subject: improve the colormap setting code X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=a59540f25aed8551262a89b6426b201546a8418c;p=chaz%2Fopenbox improve the colormap setting code --- 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); }