From 79e19284273f35a2b17c444e3dad4dbcaf875fc6 Mon Sep 17 00:00:00 2001 From: Shuhrat Dehkanov Date: Mon, 18 Apr 2016 12:00:20 -0400 Subject: [PATCH] xkbswitch: establish parent/child relationship Summary: There is an edge case that results in SIGFAULT in Enlightenment when "Keyboard Settings" dialog is closed prior to "Add New Configuration" dialog and "OK" button is pressed in the latter one. This makes sure that closing the dialogs follows the parent/child logic. @fix Test Plan: 1. Go to Settings -> All -> Input -> Keyboard and press "Add" 2. Observe that "Add New Configuration" dialog is opened 3. Select/highlight any new layout 4. Go back to "Keyboard Settings" dialog and close it 5. Press "OK" in "Keyboard Settings" dialog 6. Observe that Enlightenment sigfaults Reviewers: zmike, raster Subscribers: cedric, seoz Differential Revision: https://phab.enlightenment.org/D3901 --- src/modules/xkbswitch/e_mod_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/xkbswitch/e_mod_config.c b/src/modules/xkbswitch/e_mod_config.c index 64f54adf5..1e3748b4b 100644 --- a/src/modules/xkbswitch/e_mod_config.c +++ b/src/modules/xkbswitch/e_mod_config.c @@ -541,7 +541,7 @@ _dlg_add_new(E_Config_Dialog_Data *cfdata) Evas_Coord mw, mh; Evas_Object *mainn, *available, *modelss, *variants; - if (!(dlg = e_dialog_new(NULL, "E", "xkbswitch_config_add_dialog"))) return NULL; + if (!(dlg = e_dialog_new(e_win_evas_win_get(cfdata->evas), "E", "xkbswitch_config_add_dialog"))) return NULL; e_dialog_resizable_set(dlg, 1); dlg->data = cfdata;