monitor.c
// determine which monitor holds the active window, or failing that the mouse pointer
determine which monitor holds the active window, or failing that the mouse pointer
determine which monitor holds the active window or failing that the mouse pointer
void monitor_active(workarea *mon)
{
	client *c = client_active(0);
	if (c)
	{
		client_extended_data(c);
		memmove(mon, &c->monitor, sizeof(workarea));
		return;
	}
	int x, y;
	if (pointer_get(&x, &y))
	{
		monitor_dimensions_struts(x, y, mon);
		return;
	}
	monitor_dimensions_struts(0, 0, mon);
}
void monitor_active ( workarea * mon ) { client * c = client_active ( 0 ) ; if ( c ) { client_extended_data ( c ) ; memmove ( mon , & c -> monitor , sizeof ( workarea ) ) ; return ; } int x , y ; if ( pointer_get ( & x , & y ) ) { monitor_dimensions_struts ( x , y , mon ) ; return ; } monitor_dimensions_struts ( 0 , 0 , mon ) ; }
determine which monitor holds the active window, or failing that the mouse pointer
determine which monitor holds the active window or failing that the mouse pointer