Re: Help with popup/popdown with pointer grab.



Hi Havoc,

However even putting gdk_flush()'es before the grab
doesn't solve the  problem. What is the solution then ?
How can i wait till window is mapped ?

Thanx
Mitch

-------- Original Message --------
Subject: Re: Help with popup/popdown with pointer grab.
Date: 16 Jun 2001 11:12:11 -0400
From: Havoc Pennington <hp redhat com>
To: <Dave 0Bits COM>
CC: <gtk-list gnome org>
References:
<Pine LNX 4 33 0106161157320 3830-100000 dhcpassigned uk sun com>


<Dave 0Bits COM> writes:
>       /* Popup window and grab pointer */
>       gdk_window_show(window->window);
>       gdk_window_raise(window->window);
>       if (gdk_pointer_grab (window->window,
> 			FALSE, GDK_POINTER_MOTION_MASK,
> 			window->window, NULL, GDK_CURRENT_TIME)==0)
> 	printf("grab succeeded\n");
>       else

This is a race condition. The window manager gets a request to
deiconify, and then will map your window. However, the window is
probably still unmapped when you do the grab. Remember that X is
asynchronous. If gdk_pointer_grab() is returning GrabNotViewable then
this is almost certainly the problem.

Havoc

_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]