From 12584caa5dfb1888a89a1fc999f451b2c4d12619 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 14 Mar 2008 17:34:25 +0100 Subject: [PATCH] Compute the rule only one time --- client.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client.c b/client.c index e377300b8..3eb8dc7ce 100644 --- a/client.c +++ b/client.c @@ -363,11 +363,14 @@ client_manage(Window w, XWindowAttributes *wa, int screen) /* default titlebar position */ c->titlebar.position = globalconf.screens[screen].titlebar_default_position; + /* 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 = rule_matching_client(c))) + if(rule) { if(rule->screen != RULE_NOSCREEN) move_client_to_screen(c, rule->screen, True); @@ -443,7 +446,7 @@ client_manage(Window w, XWindowAttributes *wa, int screen) } /* attach to the stack */ - if((rule = rule_matching_client(c))) + if(rule) switch(rule->ismaster) { case Yes: