For laptops, you need to take them out of the bag unless you have a TSA approved laptop bag.
One of the few times i've had a problem with TSA revolved around my TSA approved laptop bag. At one small airport, I opened up the laptop bag so that it folded in half and laid it down on the conveyor belt like I always did when going through security. One of the TSA agents at the conveyor belt picked up my bag and zipped it back up! Of course, that made me have to stop, wait and have the bag go through another screening with their supervisor since I had a laptop in the bag. He was explaining what I needed to do for laptops, of which I kept saying "uh huh" in response. At the end of his instruction (which I already knew), I told him that I did follow their rules and unzipped the bag, however the agent over there (pointing to the agent) zipped it back up! The supervisor was visibly in shock and apologized profusely. After he finished with me, I watched him go over to the agent that had zipped up the bag and instructed her on the spot about TSA approved bags and not to zip them back up!