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
This commit is contained in:
Shuhrat Dehkanov 2016-04-18 12:00:20 -04:00 committed by Mike Blumenkrantz
parent 0c0377c686
commit be742c4adc
1 changed files with 1 additions and 1 deletions

View File

@ -543,7 +543,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;