When Logan breaks the window with his gun, it's the second pane from the bottom, on the left side, as seen from outside the building. When he comes out to have the showdown with Hollister, it's the bottom, center pane that is broken.
When Anna gives the string with the gun attached to Hollister through the jail cell window, you can see that she is within reach of the pegs under the window. When the gun gets caught in the pegs, she is now out of reach of the gun.