1. A computer-implemented method for managing graphical user interface (GUI) elements, the method comprising: receiving, at a graphics management system, a window comprising one or more structural regions, wherein each of the one or more structural regions comprises: a parent context, zero or more child contexts, a shape, and an ordering, and wherein each of the window and the one or more structural regions comprises an event mask; receiving, at the graphics management system, a first message from a first process for granting one or more rights to a second process for accessing a GUI element; receiving, at the graphics management system, an incoming event; determining, based, at least in part, on the event masks of the window and the one or more structural regions, a location where the incoming event should be routed, wherein the determination comprises at least one of the following: routing to the window, routing to one of the one or more structural regions, routing to a different window, or dropping the incoming event; and routing the incoming event to the determined location.