void wm_redraw_ncarea(win *window) { GR_WINDOW_INFO info; GR_WM_PROPERTIES props; GR_BOOL active; Dprintf("wm_container_exposure window %d\n", window->wid); GrGetWindowInfo(window->wid, &info); GrGetWMProperties(window->clientid, &props); /* * Check for invalid window. This will be the * case if the client exited, and we're just * getting the paint notification for our parent. */ if (props.flags) { active = (window->clientid == GrGetFocus()); nxPaintNCArea(window->wid, info.width, info.height, props.title, active, props.props); } /* free title returned from GrGetWMProperties*/ if (props.title) free(props.title); }
void wm_redraw_ncarea(win *window) { GR_WINDOW_INFO info; GR_WM_PROPERTIES props; GR_BOOL active; GR_WINDOW_ID focusedwindow; Dprintf("wm_container_exposure window %d\n", window->wid); GrGetWindowInfo(window->wid, &info); GrGetWMProperties(window->clientid, &props); /* * Check for invalid window. This will be the * case if the client exited, and we're just * getting the paint notification for our parent. */ if (props.flags) { /* Get window with keyboard focus*/ focusedwindow = GrGetFocus(); /* * Check if the current window or any of its ancestors has the focus * A window is active even if any of its ancestors has focus * --Amit Kulkarni */ active = checkHasFocus(window->clientid,focusedwindow); /* * Note that we should also raise the window if its active and behind. * an active window deserves to be on the top :-) */ //if(active) //GrRaiseWindow(window->wid); // FIXME nxPaintNCArea(window->wid, info.width, info.height, props.title, active, props.props); } /* free title returned from GrGetWMProperties*/ if (props.title) free(props.title); }