About events propagation in gtk+-1.3.3



Hi all GTK+ mantainers,
i have noticed a strange behaviour about event propagation: in several
widgets happens that if an event-callback returns TRUE it prevents
further event dissemination also for others separated connections. 
This behaviour appeared recently in latest cvs snapshots and gtk+-1.3.3
release as well, i didn't find any mention on various ChangeLogs 
so i can't say if it is intentional or a bug.
However this behaviours ends with errors: for instance applying drag and
drop
capability to some widgets makes them insensitive to other event/signal
such as "click" or others. This because into the event callback
gtk_drag_source_event_cb () the retval is always TRUE. Setting a retval
to FALSE restablishes right behaviour and you can both drag and/or click
a
button for instance. Other examples can be made: in GtkTextView for
instance, making a
connection to key_press_event and returning TRUE from the handler, this
makes the overall widget insensitive to further key presses. 
Also if you connect a window with configure_event and return TRUE from
the handler, this makes all widgets to do not honour geometry requests
(such as window resizing, maximimizing,etc). A work around is to
connect_after or return FALSE but often this is not possible or
convenient. This is a recent and nasty bug, please clarify if i'm right
or i'm missing something.
/mario
-- 
Mario Motta
AI Research Group - Rimini
http://vdkbuilder.sourceforge.net





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