ewmh_modify_state: Prevent using uninitialized state; simplify code.

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1224 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Peter Åstrand 2006-04-09 20:22:11 +00:00
parent 9e3dd0b7ab
commit 6e285f3440

View File

@ -240,7 +240,7 @@ ewmh_modify_state(Window wnd, int add, Atom atom1, Atom atom2)
int result;
unsigned long nitems;
unsigned char *props;
uint32 state;
uint32 state = WithdrawnState;
/* The spec states that the window manager must respect any
_NET_WM_STATE attributes on a withdrawn window. In order words, we
@ -253,7 +253,7 @@ ewmh_modify_state(Window wnd, int add, Atom atom1, Atom atom2)
XFree(props);
}
if ((result < 0) || !nitems || (state == WithdrawnState))
if (state == WithdrawnState)
{
if (add)
{