We had a problem with our curtains always moving away from the wall so Bob took a narrow piece of trim board. He sandwiched the curtain between the board and the wall and just nailed the in place. They no longer pull away from the wall!
We also use bag clips to hold the curtains closed...