Name

GravityNotify — (generated event).

When Generated

A GravityNotify event reports when a window is moved because of a change in the size of its parent. This happens when the win_gravity attribute of the child window is something other than StaticGravity or UnmapGravity.

Select With

This event is selected for a single window by specifying the window ID of that window with StructureNotifyMask. To receive notification of movement due to gravity for a group of siblings, specify the parent window ID with SubstructureNotifyMask.

XEvent Structure Name

typedef union _XEvent {
   ...
   XGravityEvent xgravity;
   ...
} XEvent;

Event Structure

typedef struct {
   int type;
   unsigned long serial;    /* # of last request processed by server */
   Bool send_event;         /* True if this came from SendEvent request */
   Display *display;        /* Display the event was read from */
   Window event;
   Window window;
   int x, y;
} XGravityEvent;

Event Structure Members

event 

The window that selected the event.

window 

The window that was moved.

x, y 

The new coordinates of the window relative to its parent.