Exemplo n.º 1
0
int wm_update(GR_EVENT_UPDATE *event)
{
	win *window;

	Dprintf("wm_update: wid %d, subwid %d, x %d, y %d, width %d, height %d, "
	       "utype %d\n", event->wid, event->subwid, event->x, event->y, event->width,
	       event->height, event->utype);
	
	if(!(window = wm_find_window(event->subwid))) {
		if (event->utype == GR_UPDATE_MAP)
			wm_new_client_window(event->subwid);
	  	return 0;
	}

	if(window->type == WINDOW_TYPE_CONTAINER) {
		if (event->utype == GR_UPDATE_ACTIVATE)
			wm_redraw_ncarea(window);
		return 0;
	}

	if (window->type == WINDOW_TYPE_CLIENT) {
		if(event->utype == GR_UPDATE_MAP)
			wm_client_window_remap(window);
		if(event->utype == GR_UPDATE_DESTROY)
			wm_client_window_destroy(window);
		if(event->utype == GR_UPDATE_UNMAP)
			wm_client_window_unmap(window);
		if(event->utype == GR_UPDATE_SIZE)
			wm_client_window_resize(window);
	}
	return 0;
}
Exemplo n.º 2
0
void wm_container_exposure(win *window, GR_EVENT_EXPOSURE *event)
{
	Dprintf("wm_container_exposure window %d\n", window->wid);

	wm_redraw_ncarea(window);
}