diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-04-24 01:29:53 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-04-24 01:29:53 +0000 |
| commit | 7ae95e46606a1fa22e302fd2c1ea99cb23acbd81 (patch) | |
| tree | 78c8d149eb8e981e06408206347f9b5fb624e03b /openbox/screen.c | |
| parent | 3595da62ca70f494f3341af744da627af414cb18 (diff) | |
save windows' colormaps rather than querying them from the server every time you focus it
Diffstat (limited to 'openbox/screen.c')
| -rw-r--r-- | openbox/screen.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/openbox/screen.c b/openbox/screen.c index 74b8e71d..587dc647 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -907,23 +907,19 @@ void screen_show_desktop(gboolean show) void screen_install_colormap(ObClient *client, gboolean install) { - XWindowAttributes wa; - if (client == NULL) { if (install) XInstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst)); else XUninstallColormap(RrDisplay(ob_rr_inst), RrColormap(ob_rr_inst)); } else { - if (XGetWindowAttributes(ob_display, client->window, &wa) && - wa.colormap != None) { - xerror_set_ignore(TRUE); - if (install) - XInstallColormap(RrDisplay(ob_rr_inst), wa.colormap); - else - XUninstallColormap(RrDisplay(ob_rr_inst), wa.colormap); - xerror_set_ignore(FALSE); - } + xerror_set_ignore(TRUE); + if (install) { + if (client->colormap != None) + XInstallColormap(RrDisplay(ob_rr_inst), client->colormap); + } else + XUninstallColormap(RrDisplay(ob_rr_inst), client->colormap); + xerror_set_ignore(FALSE); } } |
