handle.c
// once a window has been configured, apply a border unless it is fullscreen
once a window has been configured, apply a border unless it is fullscreen
once a window has been configured apply a border unless it is fullscreen
void handle_configurenotify(XEvent *ev)
{
	client *c;
	if (ev->xconfigure.window == root)
	{
		event_log("ConfigureNotify", root);
		event_note("root window change!");
		reset_lazy_caches();
		reset_cache_client();
		ewmh_desktop_list();
		XWindowAttributes *attr = window_get_attributes(root);
		int i; Window w;
		managed_ascend(i, w, c)
		{
			client_extended_data(c);
			client_moveresize(c, 0,
				MIN(attr->x+attr->width-1,  MAX(attr->x, c->x)),
				MIN(attr->y+attr->height-1, MAX(attr->y, c->y)),
				c->w, c->h);
		}
	}
	else
	if ((c = client_recreate(ev->xconfigure.window)))
	{
		event_log("ConfigureNotify", c->window);
		event_client_dump(c);
		if (c->manage)
		{
			client_review_border(c);
			client_review_position(c);
			if (c->active && !mouse_dragger &&
				(config_warp_mode == WARPFOCUS ||
					config_warp_mode == WARPFOLLOW))
			{
				client_warp_pointer(c);
				while(XCheckTypedEvent(display, EnterNotify, ev));
			}
		}
	}
}
void handle_configurenotify ( XEvent * ev ) { client * c ; if ( ev -> xconfigure . window == root ) { event_log ( " " , root ) ; event_note ( " " ) ; reset_lazy_caches ( ) ; reset_cache_client ( ) ; ewmh_desktop_list ( ) ; XWindowAttributes * attr = window_get_attributes ( root ) ; int i ; Window w ; managed_ascend ( i , w , c ) { client_extended_data ( c ) ; client_moveresize ( c , 0 , MIN ( attr -> x + attr -> width - 1 , MAX ( attr -> x , c -> x ) ) , MIN ( attr -> y + attr -> height - 1 , MAX ( attr -> y , c -> y ) ) , c -> w , c -> h ) ; } } else if ( ( c = client_recreate ( ev -> xconfigure . window ) ) ) { event_log ( " " , c -> window ) ; event_client_dump ( c ) ; if ( c -> manage ) { client_review_border ( c ) ; client_review_position ( c ) ; if ( c -> active && ! mouse_dragger && ( config_warp_mode == WARPFOCUS || config_warp_mode == WARPFOLLOW ) ) { client_warp_pointer ( c ) ; while ( XCheckTypedEvent ( display , EnterNotify , ev ) ) ; } } } }
once a window has been configured, apply a border unless it is fullscreen
once a window has been configured apply a border unless it is fullscreen
// we use StructureNotifyMask on root windows. this seems to be a way of detecting XRandR // shenanigans without actually needing to include xrandr or check for it, etc... // TODO: is this a legit assumption? // find all windows and ensure they're visible in the new screen layout // client_moveresize() will handle fine tuning bumping the window on-screen // all we have to do is get x/y in the right ballpark // dump any enterynotify events that have been generated // since this client was configured, else whe get focus jitter