Esempio n. 1
0
void focusprev(void)
{
	int curid = workspace_get_active();
	WnckWindow *cur = window_get_active();
	WnckWindow *prev = workspace_get_prev(curid, cur);
	if (NULL != prev) {
		window_activate(prev);
	}
}
Esempio n. 2
0
void focusnext(void)
{
	int curid = workspace_get_active();
	WnckWindow *cur = window_get_active();
	WnckWindow *next = workspace_get_next(curid, cur);
	if (NULL != next) {
		window_activate(next);
	}
}
Esempio n. 3
0
void active_task()
{
	if (task_active) {
		set_task_state(task_active, window_is_iconified(task_active->win) ? TASK_ICONIFIED : TASK_NORMAL);
		task_active = 0;
	}

	Window w1 = window_get_active();
	//printf("Change active task %ld\n", w1);

	if (w1) {
		if (!task_get_tasks(w1)) {
			Window w2;
			while (XGetTransientForHint(server.dsp, w1, &w2))
				w1 = w2;
		}
		set_task_state((task_active = task_get_task(w1)), TASK_ACTIVE);
	}
}
Esempio n. 4
0
int
main(int argc, char *argv[])
{
	g_thread_init(NULL);
	gdk_threads_init();
	
	gtk_init(&argc, &argv);

	config_load();
	
	create_main_window();

	_debug = FALSE;

	window_printf(window_get_active(), "[%s-%s (%s)] : [%s] : [placeholderforquotes]\n", APP_NAME, APP_VERSION, APP_VERSION_NAME, APP_WEBSITE);

	gtk_main();

	return 0;
}
Esempio n. 5
0
void event_configure_notify(Window win) {
    // change in root window (xrandr)
    if (win == server.root_win) {
        signal_pending = SIGUSR1;
        return;
    }

    // 'win' is a trayer icon
    TrayWindow* traywin;
    GSList* l;
    for (l = systray.list_icons; l; l = l->next) {
        traywin = (TrayWindow*)l->data;
        if (traywin->tray_id == win) {
            XMoveResizeWindow(server.dsp, traywin->id, traywin->x, traywin->y,
                              traywin->width, traywin->height);
            XResizeWindow(server.dsp, traywin->tray_id, traywin->width,
                          traywin->height);
            panel_refresh = 1;
            return;
        }
    }

    // 'win' move in another monitor
    if (nb_panel == 1) return;
    Task* tsk = task_get_task(win);
    if (!tsk) return;

    Panel* p = tsk->area.panel;
    if (p->monitor != window_get_monitor(win)) {
        remove_task(tsk);
        tsk = add_task(win);
        if (win == window_get_active()) {
            set_task_state(tsk, TASK_ACTIVE);
            task_active = tsk;
        }
        panel_refresh = 1;
    }
}
Esempio n. 6
0
void close_window(void)
{
	WnckWindow *window = window_get_active();
	window_close(window);
}
Esempio n. 7
0
void unhandle(void)
{
	WnckWindow *window = window_get_active();
	window_handle(window, FALSE);
}
Esempio n. 8
0
void handle(void)
{
	WnckWindow *window = window_get_active();
	window_handle(window, TRUE);
}