Enlightenment CVS committal Author : ningerso Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_popup.c Log Message: Flag popups as transient for the parent window of the widget they follow. =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_popup.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- ewl_popup.c 7 Mar 2007 09:13:51 -0000 1.11 +++ ewl_popup.c 7 Mar 2007 22:23:07 -0000 1.12 @@ -260,6 +260,31 @@ if (ewl_window_keyboard_grab_get(EWL_WINDOW(w))) ewl_window_keyboard_grab_set(EWL_WINDOW(w), TRUE); + /* Popups should be flagged as transient for their parent windows */ + if (EWL_POPUP(w)->follow) { + Ewl_Embed *emb; + emb = ewl_embed_widget_find(EWL_POPUP(w)->follow); + if (emb) { + void *pwin = NULL; + /* + * If the followed window is transient, defer to that + * window's parent + */ + if (EWL_WINDOW_IS(emb)) { + Ewl_Window *win = EWL_WINDOW(emb); + + if (win->flags & EWL_WINDOW_TRANSIENT) + pwin = win->transient.ewl->window; + else if (win->flags & EWL_WINDOW_TRANSIENT_FOREIGN) + pwin = win->transient.foreign; + } + + if (!pwin) + pwin = emb->canvas_window; + ewl_window_transient_for_foreign(EWL_WINDOW(w), pwin); + } + } + DLEAVE_FUNCTION(DLEVEL_STABLE); } ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs