The key is do-it-yourself seat-blocking.
If I find myself in a block of three seats to myself, I take the middle seat and, if necessary, keep something on the aisle seat. I do this during the critical seat-shifting phase of the flight.
As far as the lady taking the window seat and trying to talk to you, another approach would have been to take the middle seat, right beside her. Order as much alcohol as possible at the first drinks service, and set up your tray with all the drinks set out. Then immediately pretend to fall asleep and feign collapsing on her for the duration of the flight, always catching yourself at the last minute. Sometimes people need to be actively punished, not simply ignored.