mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
[text] Use the base class binding pool
Bug 1518 - [Patch] Widget derivied from ClutterText will crash on key_press_event In clutter_text_key_press() we are using G_OBJECT_TYPE_NAME to find out the actor's type name. However, if some widget is derived from ClutterText, when the key press handler is called, G_OBJECT_TYPE_NAME will return the name of the derived widget. The default implementation should get the binding pool for the base class. Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
parent
02ea81ce02
commit
a362a4a889
@ -1174,7 +1174,11 @@ clutter_text_key_press (ClutterActor *actor,
|
||||
|
||||
keyval = clutter_key_event_symbol (event);
|
||||
|
||||
pool = clutter_binding_pool_find (G_OBJECT_TYPE_NAME (actor));
|
||||
/* we need to use the ClutterText type name to find our own
|
||||
* key bindings; subclasses will override or chain up this
|
||||
* event handler, so they can do whatever they want there
|
||||
*/
|
||||
pool = clutter_binding_pool_find (g_type_name (CLUTTER_TYPE_TEXT));
|
||||
g_assert (pool != NULL);
|
||||
|
||||
/* we allow passing synthetic events that only contain
|
||||
|
Loading…
Reference in New Issue
Block a user