xwindow: check that window exists before setting opacity
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
4717feb02b
commit
d5e3a25bbc
|
@ -182,6 +182,8 @@ xwindow_get_opacity_from_reply(xcb_get_property_reply_t *prop_r)
|
|||
*/
|
||||
void
|
||||
xwindow_set_opacity(xcb_window_t win, double opacity)
|
||||
{
|
||||
if(win)
|
||||
{
|
||||
if(opacity >= 0 && opacity <= 1)
|
||||
{
|
||||
|
@ -192,6 +194,7 @@ xwindow_set_opacity(xcb_window_t win, double opacity)
|
|||
else
|
||||
xcb_delete_property(globalconf.connection, win, _NET_WM_WINDOW_OPACITY);
|
||||
}
|
||||
}
|
||||
|
||||
/** Send WM_TAKE_FOCUS client message to window
|
||||
* \param win destination window
|
||||
|
|
Loading…
Reference in New Issue