Exemplo n.º 1
0
void raise_wrapped(GtkWidget* display_win_gtk, gchar* term_win_str) {

	Display* Xdisplay;
	Window display_win, term_win;

	Xdisplay = GDK_DRAWABLE_XDISPLAY(display_win_gtk->window);
	display_win = GDK_WINDOW_XID(display_win_gtk->window);
	term_win = str_to_win(term_win_str);

	if (display_win == 0 || term_win == 0)
		return;

	gint term_desktop = get_desktop(Xdisplay, term_win);
	gint disp_desktop = get_desktop(Xdisplay, display_win);

	if (term_desktop != -1 && disp_desktop != -1
			&& term_desktop != disp_desktop) {
		window_to_desktop(Xdisplay, display_win, term_desktop);
	}

	static int i = 0; i++;
	g_warning("raise %d", i);
	/*raise_window(Xdisplay, display_win, term_win, TRUE);*/
	//XMapRaised(Xdisplay, display_win);
	XRaiseWindow(Xdisplay, display_win);
}
Exemplo n.º 2
0
global
XA_CLIENT *desktop_owner(void)
{
	return get_desktop()->owner;
}