@@ -1719,29 +1719,44 @@ locate_pointer_key_handler (GVariant *value,
17191719 gpointer * result ,
17201720 gpointer data )
17211721{
1722- MetaKeyCombo combo ;
1723- const gchar * string_value ;
1722+ MetaKeyCombo * combo ;
1723+ const gchar * * string_values ;
1724+ gboolean output ;
1725+ int i ;
17241726
17251727 * result = NULL ; /* ignored */
1726- string_value = g_variant_get_string (value , NULL );
1728+ string_values = g_variant_get_strv (value , NULL );
1729+ output = TRUE;
17271730
1728- if (! string_value || ! meta_parse_accelerator ( string_value , & combo ) )
1731+ for ( i = 0 ; string_values && string_values [ i ]; i ++ )
17291732 {
1730- meta_topic (META_DEBUG_KEYBINDINGS ,
1731- "Failed to parse value for locate-pointer-key\n" );
1732- return FALSE;
1733- }
17341733
1735- combo . modifiers = 0 ;
1734+ combo = g_malloc0 ( sizeof ( MetaKeyCombo )) ;
17361735
1737- if (locate_pointer_key_combo .keysym != combo .keysym ||
1738- locate_pointer_key_combo .keycode != combo .keycode )
1736+ if (!meta_parse_accelerator (string_values [i ], combo ))
1737+ {
1738+ meta_topic (META_DEBUG_KEYBINDINGS ,
1739+ "Failed to parse keybinding value \"%s\" for locate-pointer-key\n" ,
1740+ string_values [i ]);
1741+
1742+ g_free (combo );
1743+
1744+ output = FALSE;
1745+ }
1746+
1747+ combo -> modifiers = 0 ;
1748+ }
1749+
1750+ if (locate_pointer_key_combo .keysym != combo -> keysym ||
1751+ locate_pointer_key_combo .keycode != combo -> keycode )
17391752 {
1740- locate_pointer_key_combo = combo ;
1753+ locate_pointer_key_combo = * combo ;
17411754 queue_changed (META_PREF_KEYBINDINGS );
17421755 }
17431756
1744- return TRUE;
1757+ g_free (string_values );
1758+
1759+ return output ;
17451760}
17461761
17471762static gboolean
0 commit comments