*add* more task states (normal, active, iconified, urgent), with each an own background, font and asb

*fix* two memleaks
*fix* some code beautification



git-svn-id: http://tint2.googlecode.com/svn/trunk@327 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
Andreas.Fink85
2010-01-09 00:11:01 +00:00
parent 8042047cd4
commit 739af13714
24 changed files with 518 additions and 493 deletions

View File

@@ -146,7 +146,21 @@ int window_get_monitor (Window win)
int window_is_iconified (Window win)
{
return (IconicState == get_property32(win, server.atom.WM_STATE, server.atom.WM_STATE));
if (IconicState == get_property32(win, server.atom.WM_STATE, server.atom.WM_STATE)) {
// openbox sets on shaded windows the IconicState, however we do not consider these windows iconified
Atom *at;
int count, i;
at = server_get_property (win, server.atom._NET_WM_STATE, XA_ATOM, &count);
for (i = 0; i < count; i++) {
if (at[i] == server.atom._NET_WM_STATE_SHADED) {
XFree(at);
return 0;
}
}
XFree(at);
return 1;
}
return 0;
}