diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-06-30 19:44:21 +0300 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-07-10 04:26:12 +0300 |
| commit | 89cbe7ed5f863c206f9c877fa484dbdb45040aad (patch) | |
| tree | 5de1bf07442b6f4439cb37d23513a7afe24de82e /monsterwm.c | |
| parent | 175a668370d3b0231bc80e8809567cee3767db11 (diff) | |
rework propertynotify function - add parenthesis and check XWMHints pointer before free
Diffstat (limited to 'monsterwm.c')
| -rw-r--r-- | monsterwm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/monsterwm.c b/monsterwm.c index 9d4391d..a913392 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -687,8 +687,8 @@ void propertynotify(XEvent *e) { Client *c = wintoclient(e->xproperty.window); if (!c || e->xproperty.atom != XA_WM_HINTS) return; XWMHints *wmh = XGetWMHints(dis, c->win); - c->isurgent = c != curr && wmh && (wmh->flags & XUrgencyHint); - XFree(wmh); + c->isurgent = (c != curr && wmh && (wmh->flags & XUrgencyHint)); + if (wmh) XFree(wmh); desktopinfo(); } |
