Fix a newly exposed bug, i3 indicating an active window that does not exists

This commit is contained in:
QC 2014-05-25 11:34:45 +02:00
parent 3a14ec9746
commit fb56250d18

View file

@ -647,8 +647,13 @@ void monitor_active ( workarea *mon )
&& type == XA_WINDOW && count > 0 ) && type == XA_WINDOW && count > 0 )
{ {
XWindowAttributes *attr = window_get_attributes ( id ); XWindowAttributes *attr = window_get_attributes ( id );
monitor_dimensions ( screen, attr->x, attr->y, mon ); // Window might not exists anymore.
return; // This could very well be a bug in i3.
if ( attr != NULL )
{
monitor_dimensions ( screen, attr->x, attr->y, mon );
return;
}
} }
int x, y; int x, y;