Reputation: 2577
We have a specific scenarion in gtk based application, where there is a toplevel gtk window containing gtkwidgets which are actually webviews created by webkit.
Our use case is such that we need to fire a resize of the child widgets(webview) after hiding the toplevel gtkwindow because the application makes a transition from one scene to another. This ends up in a situation that the resize only happens when we show the toplevel window because the callback to resize the child widgets is registered with the size_allocate signal which only gets emmitted during the show call.
A workaround for this problem could be that we register the callback for the configure_event signal instead of the size_allocate because configure_event signal is emitted even if the window is in hidden state.(in case of size_allocate signal, the signal is scheduled to get emitted only on the next show call, so we have a graphics nuisance that the transition isnt seamless.) Now, the problem is that the configure_event is only emitted for the toplevel window and not for the child widgets.
We tested a simple gtk sample in which we created a toplevel window and a button. Following observations we can make out of it:
Now two questions:
What is this event that gets propogated to the child widget which on returning false doesnt get to the widget?(we didnt get any callback for configure_event registered for the child button)
As our case has a custom webview widget, it does not behave as the standard gtk button widget behaves for the configure_event.So the only way out is to know which event do we register for,register a callback for it and call a custom resize on the webview widget from that callback.
Upvotes: 1
Views: 1489
Reputation: 6886
the return value of the callback matters. A TRUE
has the meaning I handled this, do not propagte this event any further down the widget tree
. A FALSE
propagates the event further. It has nothing to do with any other event.
Upvotes: 0