Quantifying dispersal is crucial both for understanding ecological population dynamics, and for gaining insight into factors that affect the genetic structure of populations. The role of dispersal becomes pronounced in highly fragmented landscapes inhabited by spatially structured populations. We consider a landscape consisting of a set of habitat patches surrounded by unsuitable matrix, and model dispersal by assuming that the individuals follow a random walk with parameters that may be specific to the habitat type. We allow for spatial variation in patch quality, and account for edge-mediated behavior, the latter meaning that the individuals bias their movement towards the patches when close to an edge between a patch and the matrix. We employ a diffusion approximation of the random walk model to derive analytical expressions for various characteristics of the dispersal process. For example, we derive formulae for the time that an individual is expected to spend in its current patch i, and for the time that it will spend in the matrix, both conditional on the individual hitting next a given patch j before hitting any of the other patches or dying. The analytical formulae are based on the assumptions that the landscape is infinitely large, that the patches are circularly shaped, and that the patches are small compared to interpatch distances. We evaluate the effect of these assumptions by comparing the analytical results to numerical results in a real patch network that violates all of the three assumptions. We then consider a landscape that fulfills the assumptions, and show that in this case the analytical results are in a very good agreement with the numerical results. The results obtained here allow the construction of computationally efficient dispersal models that can be used as components of metapopulation models.