1. One or more computer readable storage media comprising instructions that, when executed by at least one processor, cause the at least one processor to implement a method for grouping windows, the method comprising: collecting window events associated with the windows; modeling states of the windows based on the collected window events, wherein different states of the windows correspond to different sets of the collected window events; assigning various ones of the windows to various different groups based on the modeled states; modeling, based on the window events, changing display states of the windows over a period of time, wherein changes in how the windows are displayed comprise switches between windows over time, and wherein the modeled changing display states indicate changes in displayed sizes and/or locations of windows and co-presence on the display; and clustering the windows based on the modeled display states.