[Fixed 1.05][Bug 1.04] right click through dialogs

When I am using a dialog, such as the slot selection or stockpile changes or any other type of dialog, right clicks fall through the dialog and register on the factory floor. Since my right mouse button is very sensitive it happens to me a lot, especially when using the scroll wheel. So this causes me to delete things unintentionally.