Revert to default binding mode before reloading the config.
If a user reloads the config while in some binding mode, the binding mode will revert to the default, but no event will ever be fired, causing a broken i3bar mode display. This patch explicitly reverts to the default binding mode before reloading the config. We reload rather than switch to the binding mode after having reloaded the config because there's no guarantee that mode will even still exist. fixes #2228
This commit is contained in:
@ -71,6 +71,11 @@ bool parse_configuration(const char *override_configpath, bool use_nagbar) {
|
||||
*/
|
||||
void load_configuration(xcb_connection_t *conn, const char *override_configpath, bool reload) {
|
||||
if (reload) {
|
||||
/* If we are currently in a binding mode, we first revert to the
|
||||
* default since we have no guarantee that the current mode will even
|
||||
* still exist after parsing the config again. See #2228. */
|
||||
switch_mode("default");
|
||||
|
||||
/* First ungrab the keys */
|
||||
ungrab_all_keys(conn);
|
||||
|
||||
|
Reference in New Issue
Block a user