GtkText still not `ungrabbing' on right-click menus



Kinda of a follow up:

I used the following callback for a button_press_event signal (connected
after) for a GtkText widget:


                    /* Tried a bunch of variants for this. */
/*                  gdk_pointer_ungrab(GDK_CURRENT_TIME); */

                    /* Map menu. */
                    gtk_menu_popup(
                        GTK_MENU(w),
                        NULL, NULL, NULL, (gpointer)editor,
                        button->button, button->time
                    );

                    /* Need to mark the text widget's button as 0 or
                     * else it will keep marking.
                     */
                    GTK_TEXT(widget)->button = 0;


Basically setting the GtkText's button to 0 dosen't seem to ungrab it.

The problem is as follows, after a right-click on the GtkText, the menu
pops up as usual and I select an item on the menu then it unmaps.

But then if I press a button anywhere else (say on another widget), the
GtkText grabs it and sets the cursor position on the GtkText and dosen't
let the intended widget recieve the button press. This always happens
right after a right-click on a GtkText widget with the above condition,
did anyone figure out how to work around that?

--
Sincerely,                  ,"-_                         \|/
-Capt. Taura M.             ,   O=__                    --X--
..__                         ,_JNMNNEO=_                 /|\
OMNOUMmnne.                  {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn.               'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe              '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe.                "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
EEBNNMMMNWNWWEEIMMNe.             __  7EMMMNNNNNWWWEEEEEEEOO.     " .
NNMMMMWWWMMMWEINMMMNn            "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
                  http://furry.ao.net/~learfox/





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