We have performed molecular-dynamics simulations of atactic polystyrene thin films to study the effect of shear rate, pressure, and temperature on the stress-strain behaviour, the relevant energetic contributions and non-affine displacements of polymer chains during constant-shear deformation. Under this deformation sliding motion is observed at high shear rates between the top substrate and top polymer layer, which disappears when the shear rate decreases. At low shear rates stick-slip motion of the whole film with respect to the bottom substrate takes place. We found that at low shear rates the yield stress logarithmically depends on the shear rate; this behaviour can be explained in terms of the Eyring model. It was also observed that an increase in the normal pressure leads to an increase in the yield stress in agreement with experiments. The contributions to the total shear stress and energy are mainly given by the excluded-volume interactions. It corresponds to a local translational dynamics under constant shear in which particles are forced to leave their original cages much earlier as compared to the case of the isotropic, non-sheared film. Moreover, it was observed that under constant-shear deformation the polymer glass is deformed non-affinely. As a result, the middle part of the film is much more deformed than the layers close to the supporting substrates, meaning that the well-known effect of shear-banding occurs.