Only set a simplewindow's opacity if there is a window

Technically setting the opacity of an invalid window doesn't hurt, but
still it's nicer to catch this instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2009-05-25 16:28:20 +02:00 committed by Julien Danjou
parent 0b93a6a6a8
commit c56453347e
1 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,8 @@ static inline void
simplewindow_opacity_set(simple_window_t *sw, double opacity)
{
sw->opacity = opacity;
window_opacity_set(sw->window, opacity);
if(sw->window != XCB_NONE)
window_opacity_set(sw->window, opacity);
}
/** Get a simplewindow's opacity.