Re: Discarding key pressed events.



> > How to avoid this? maybe i could delete the keys' event from the
> > events queue? Any help?
> >
> Actually I did a workaround for this problem:

...

> The problem actually is that I cant call "set_events" on a widget which
> is already realized, and I am get a lot of warnings indeed.
> So, my problem is still unresolved. Anyone could help me?

g_signal_handlers_block_by_func (instance, func, data)
g_signal_handlers_unblock_by_func (instance, func, data)

Maybe easier

gulong my_handler = g_signal_connect( obj, "key-pressed-event", ... )
g_signal_handler_block( obj, my_handler );
...
g_signal_handler_unblock( obj, my_handler );

HTH

Jan-Marek



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