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:
parent
507ef3c21d
commit
db0932f77a
16
client.c
16
client.c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue