예제 #1
0
파일: window.c 프로젝트: sylware/lboxwm
Window window_top(struct wm_window *self)
{
	switch (self->type) {
	case WM_WINDOW_CLASS_CLIENT:
		return WINDOW_AS_CLIENT(self)->frame->window;
	case WM_WINDOW_CLASS_INTERNAL:
		return WINDOW_AS_INTERNAL(self)->window;
	}
	g_assert_not_reached();
	return None;
}
예제 #2
0
파일: window.c 프로젝트: deters/openbox
Window window_top(ObWindow *self)
{
    switch (self->type) {
    case OB_WINDOW_CLASS_MENUFRAME:
        return WINDOW_AS_MENUFRAME(self)->window;
    case OB_WINDOW_CLASS_DOCK:
        return WINDOW_AS_DOCK(self)->frame;
    case OB_WINDOW_CLASS_CLIENT:
        return WINDOW_AS_CLIENT(self)->frame->window;
    case OB_WINDOW_CLASS_INTERNAL:
        return WINDOW_AS_INTERNAL(self)->window;
    case OB_WINDOW_CLASS_PROMPT:
        return WINDOW_AS_PROMPT(self)->super.window;
    }
    g_assert_not_reached();
    return None;
}