1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

Remove never-set variable net_state_from_client

Even though net_state_from_client was never being set, it was
being tested inside a

	if (!wwin->flags.net_state_from_client)

which according to testing was always being true (probably because gcc
initializes it to zero). But this situation is confusing, so it's
better to remove the if() test altogether as that is the intention
if net_state_from_client is not explicitly set (which it isn't in
the current wmaker source).

This situation is analogous to:

[mafra@Pilar:c]$ cat init.c

int main(void)
{
	int a;

	if (!a)
		printf("No a = %d\n", a);
        return 0;
}
[mafra@Pilar:c]$ ./init
No a = 0
This commit is contained in:
Rodolfo García Peñas (kix)
2012-06-25 21:53:23 +02:00
committed by Carlos R. Mafra
parent dd94b98b81
commit a13eb4e920
2 changed files with 1 additions and 4 deletions

View File

@@ -795,9 +795,7 @@ static void updateWorkspaceHint(WWindow * wwin, Bool fake, Bool del)
static void updateStateHint(WWindow * wwin, Bool changedWorkspace, Bool del)
{ /* changeable */
if (del) {
if (!wwin->flags.net_state_from_client) {
XDeleteProperty(dpy, wwin->client_win, net_wm_state);
}
XDeleteProperty(dpy, wwin->client_win, net_wm_state);
} else {
Atom state[15]; /* nr of defined state atoms */
int i = 0;