You would need some kind of software to send the mouse 4 and 5 to all windows. Although unless it was also making sure the cursor was in the correct place in all windows at the same time, then the mouse buttons can be interpreted differently, because mouse buttons are designed to be handled by GUI elements, and in a 3d freelook world, the cursor may be over a different in game entity which changes the behaviour of the mouse buttons. That said, if over a 2d element, like a game menu or action bar, then it will usually behave as expected.