How to make an app window stay always on top?

How to make an app window stay always on top?

BY 29 Apr 2017 Native Application Development

I am developing an app which requires a window staying always on top of the screen.
 

Code snippet.

     ad->win = elm_win_add(NULL, "org.example.floating_win", ELM_WIN_BASIC);
	 elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_HIDE);

	 elm_win_floating_mode_set(ad->win, EINA_TRUE);
	 elm_win_alpha_set(ad->win, EINA_TRUE);
	 evas_object_move(ad->win, 50, 50);
	 evas_object_resize(ad->win, 10, 10);

It should not be lowered on home button press.

It should stay floating on top even if user opens some other app. Something like video player popup feature.

How to achieve this?

Please advice according to my code snippet.

Written by