Great question...reading between the lines!
As this seems to be more an answer based upon opinion, I can only tell you what I think.
In Harper Lee's To Kill a Mockingbird, Atticus Finch is a gentleman, of this there is no doubt. He has a strong sense of fair play, believing someone is innocent until proven guilty, and that every person on God's green earth has the right to a fair trial, as best as he is able to provide one for Tom Robinson in Maycomb. Atticus shows concern for Boo Radley and Mrs. Dubose. He has a strong moral compass and cares that the example he sets for his children by the way he lives is one they will learn from, and still be proud enough of him to be able to look him in the eye.
With all this said, Atticus is getting ready to cross-examine a member of the Ewell family. Everyone knows them, and they are neither upstanding citizens of Maycomb, or kind or honest folk, as opposed to, for example, Walter Cunningham. Bob Ewell drinks, he is a bigot, his children often go hungry, they are a disrespectful bunch (remember Burris in Scout's class), and Bob Ewell appears to be physically abusive, and is probably emotionally and psychologically abusive as well.
Atticus is a good lawyer. He is also confronting a witness who, if anything like her father, is not going to be easy to deal with. When he turns to the window, I believe Atticus is probably gathering his thoughts about how best to approach Mayella. I doubt it would occur to him to be anything but a gentleman, but perhaps he is trying to decide at what level to approach this witness who is already terrified of him, and clearly is not as bright (or clever) as her father, as she is upset that Atticus seems to have tricked her father into admitting he is left handed. Even Scout asks Jem: "Has she got good sense?" (Jem isn't sure yet.)
(Turning away will also give Atticus time to let the dust settle after the prosecution has finished. And when Mayella becomes upset and antagonistic because Atticus is respectfully addressing her as "Miss Mayella" or "ma'm," Atticus leaves this to the judge and returns to the window again.)
If I were to try to find the meaning behind Atticus' movement to the window, I believe he does so in order to decide how to proceed with Mayella in such a way that it will most help get to the truth for the sake of Tom Robinson—which is a tall order in that courtroom, in that town.