Cleanup stuff in client_manage for loading properties

Remove a double call to ewmh_check_client_hints, and only call
move_client_to_screen() when needed.

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-03-23 21:54:55 +01:00
parent 507ef3c21d
commit db0932f77a
1 changed files with 19 additions and 29 deletions

View File

@ -325,7 +325,8 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
client_updatewmhints(c);
/* Try to load props if any */
retloadprops = client_loadprops(c, screen);
if(!(retloadprops = client_loadprops(c, screen)))
move_client_to_screen(c, screen, True);
/* Then check clients hints */
ewmh_check_client_hints(c);
@ -333,22 +334,14 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
/* default titlebar position */
c->titlebar = globalconf.screens[screen].titlebar_default;
/* First check clients hints */
ewmh_check_client_hints(c);
/* get the matching rule if any */
rule = rule_matching_client(c);
/* Then apply rules if no props */
if(!retloadprops)
{
/* Get the client's rule */
if(rule)
if(!retloadprops && rule)
{
if(rule->screen != RULE_NOSCREEN)
move_client_to_screen(c, rule->screen, True);
else
move_client_to_screen(c, screen, True);
tag_client_with_rule(c, rule);
switch(rule->isfloating)
@ -366,9 +359,6 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
if(rule->opacity >= 0.0f)
window_settrans(c->win, rule->opacity);
}
else
move_client_to_screen(c, screen, True);
}
/* check for transient and set tags like its parent,
* XGetTransientForHint returns 1 on success