Does your custom window have child widgets inside it? It is possible that they are receiving and handling the mouse events and not passing them up to the parent.