Ejemplo n.º 1
0
static void 
handle_button_press_event (GtkWidget *popup,
			   XKeyEvent *event)
{
	Window window;

	remove_popup (popup);

	if (event->subwindow == None)
		return;

	if (wm_state_atom == None)
		wm_state_atom = XInternAtom (event->display, "WM_STATE", FALSE);

	window = find_managed_window (event->display, event->subwindow);

	if (window != None) {
#if GTK_CHECK_VERSION (3, 0, 0)
		if (!gdk_x11_window_lookup_for_display (gdk_x11_lookup_xdisplay (event->display), window))
#else
		if (!gdk_xid_table_lookup_for_display (gdk_x11_lookup_xdisplay (event->display), window))
#endif
			kill_window_question ((gpointer) window);
	}
}
static void 
handle_button_press_event (GtkWidget *popup,
			   XKeyEvent *event)
{
	Window window;

	remove_popup (popup);

	if (event->subwindow == None)
		return;

	if (wm_state_atom == None)
		wm_state_atom = XInternAtom (gdk_display, "WM_STATE", FALSE);

	window = find_managed_window (event->subwindow);

	if (window != None) {
		if (!gdk_xid_table_lookup_for_display (gdk_display_get_default (), window))
			kill_window_question ((gpointer) window);
	}
}
Ejemplo n.º 3
0
static void 
handle_button_press_event (GtkWidget *popup,
			   Display *display,
			   Window subwindow)
{
	Window window;

	remove_popup (popup);

	if (subwindow == None)
		return;

	if (wm_state_atom == None)
		wm_state_atom = XInternAtom (display, "WM_STATE", FALSE);

	window = find_managed_window (display, subwindow);

	if (window != None) {
		if (!gdk_x11_window_lookup_for_display (gdk_x11_lookup_xdisplay (display), window))
			kill_window_question ((gpointer) window);
	}
}