Sliding doors and windows are an easy way to attract burglars when they are open and unsupervised. To prevent the thought of burglars and feel safe in your own home, you can purchase pieces of wood or PVC pipe.
I would recommend cutting the wood or PVC pipe to a desired size so that no one can fit through the opening and yet the door or windows can still be open for ventilation and air. Measure your sliding door and windows and cut off 4 to 5 inches from that length measured.
Now when we are home running around or upstairs, we can still have our doors and windows open while feeling secure. Even when the sliding door and windows are completely locked and shut, we still put the wood and PVC pipe in the track incase of a break-in, it would be much harder.