2011-08-15 02:21:12 -07:00
|
|
|
/* Ask about focus mode */
|
2012-11-30 06:38:34 -08:00
|
|
|
#include "e_wizard.h"
|
2018-05-27 06:51:15 -07:00
|
|
|
#include "e_wizard_api.h"
|
2008-10-25 22:46:45 -07:00
|
|
|
|
2008-10-26 02:04:05 -07:00
|
|
|
static int focus_mode = 1;
|
2012-11-30 02:46:48 -08:00
|
|
|
/*
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API int
|
2015-03-18 15:09:09 -07:00
|
|
|
wizard_page_init(E_Wizard_Page *pg EINA_UNUSED, Eina_Bool *need_xdg_desktops EINA_UNUSED, Eina_Bool *need_xdg_icons EINA_UNUSED)
|
2008-10-25 22:46:45 -07:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
2011-08-15 02:21:12 -07:00
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API int
|
2015-03-18 15:09:09 -07:00
|
|
|
wizard_page_shutdown(E_Wizard_Page *pg EINA_UNUSED)
|
2008-10-25 22:46:45 -07:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
2012-11-30 02:46:48 -08:00
|
|
|
*/
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API int
|
2016-03-11 14:14:17 -08:00
|
|
|
wizard_page_show(E_Wizard_Page *pg EINA_UNUSED)
|
2008-10-25 22:46:45 -07:00
|
|
|
{
|
2016-03-11 14:14:17 -08:00
|
|
|
Evas_Object *o, *of, *ob, *rg;
|
2011-08-16 04:26:02 -07:00
|
|
|
|
|
|
|
if (e_config->focus_policy == E_FOCUS_CLICK) focus_mode = 0;
|
2012-06-28 06:12:13 -07:00
|
|
|
|
2018-05-27 06:51:15 -07:00
|
|
|
api->wizard_title_set(_("Window Focus"));
|
2012-06-28 06:12:13 -07:00
|
|
|
|
2016-03-11 14:14:17 -08:00
|
|
|
of = elm_frame_add(e_comp->elm);
|
|
|
|
elm_object_text_set(of, _("Focus:"));
|
|
|
|
o = elm_box_add(of);
|
|
|
|
elm_box_homogeneous_set(o, 1);
|
|
|
|
elm_object_content_set(of, o);
|
2008-10-26 02:04:05 -07:00
|
|
|
|
2016-03-11 14:14:17 -08:00
|
|
|
rg = ob = elm_radio_add(o);
|
2008-10-26 02:04:05 -07:00
|
|
|
evas_object_show(ob);
|
2016-03-11 14:14:17 -08:00
|
|
|
E_ALIGN(ob, 0, 0.5);
|
|
|
|
elm_box_pack_end(o, ob);
|
|
|
|
elm_object_text_set(ob, _("Whenever a window is clicked"));
|
|
|
|
elm_radio_state_value_set(ob, 0);
|
|
|
|
elm_radio_value_pointer_set(ob, &focus_mode);
|
|
|
|
|
|
|
|
ob = elm_radio_add(o);
|
|
|
|
E_ALIGN(ob, 0, 0.5);
|
2008-10-26 02:04:05 -07:00
|
|
|
evas_object_show(ob);
|
2016-03-11 14:14:17 -08:00
|
|
|
elm_box_pack_end(o, ob);
|
|
|
|
elm_radio_group_add(ob, rg);
|
|
|
|
elm_object_text_set(ob, _("Whenever the mouse enters a window"));
|
|
|
|
elm_radio_state_value_set(ob, 1);
|
2012-06-28 06:12:13 -07:00
|
|
|
|
2018-05-27 06:51:15 -07:00
|
|
|
api->wizard_page_show(of);
|
2011-08-30 17:05:44 -07:00
|
|
|
// pg->data = o;
|
2008-10-25 22:46:45 -07:00
|
|
|
return 1; /* 1 == show ui, and wait for user, 0 == just continue */
|
|
|
|
}
|
2011-08-15 02:21:12 -07:00
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API int
|
2015-03-18 15:09:09 -07:00
|
|
|
wizard_page_hide(E_Wizard_Page *pg EINA_UNUSED)
|
2008-10-25 22:46:45 -07:00
|
|
|
{
|
2008-10-26 02:04:05 -07:00
|
|
|
if (!focus_mode)
|
|
|
|
{
|
2011-08-15 02:21:12 -07:00
|
|
|
e_config->focus_policy = E_FOCUS_CLICK;
|
|
|
|
e_config->focus_setting = E_FOCUS_NEW_WINDOW;
|
|
|
|
e_config->pass_click_on = 1;
|
2013-10-08 00:20:59 -07:00
|
|
|
e_config->always_click_to_raise = 1;
|
|
|
|
e_config->always_click_to_focus = 1;
|
2013-12-29 14:04:26 -08:00
|
|
|
e_config->raise_on_revert_focus = 1;
|
2011-08-15 02:21:12 -07:00
|
|
|
e_config->focus_last_focused_per_desktop = 1;
|
|
|
|
e_config->pointer_slide = 0;
|
2013-02-05 05:33:49 -08:00
|
|
|
e_config->disable_all_pointer_warps = 1;
|
2012-11-26 05:37:19 -08:00
|
|
|
e_config->winlist_warp_while_selecting = 0;
|
|
|
|
e_config->winlist_warp_at_end = 0;
|
2013-01-08 03:51:56 -08:00
|
|
|
e_config->winlist_no_warp_on_direction = 1;
|
2008-10-26 02:04:05 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-08-15 02:21:12 -07:00
|
|
|
e_config->focus_policy = E_FOCUS_SLOPPY;
|
|
|
|
e_config->focus_setting = E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED;
|
|
|
|
e_config->pass_click_on = 1;
|
|
|
|
e_config->always_click_to_raise = 0;
|
|
|
|
e_config->always_click_to_focus = 0;
|
|
|
|
e_config->focus_last_focused_per_desktop = 1;
|
|
|
|
e_config->pointer_slide = 1;
|
2020-04-16 05:13:25 -07:00
|
|
|
// auto raise seems to irritate some people so request - disable in wiz
|
|
|
|
// e_config->use_auto_raise = 1;
|
|
|
|
// e_config->auto_raise_delay = 0.5;
|
2008-10-26 02:04:05 -07:00
|
|
|
}
|
2011-08-30 17:05:44 -07:00
|
|
|
// evas_object_del(pg->data);
|
2011-08-15 02:21:12 -07:00
|
|
|
return 1;
|
|
|
|
}
|
2012-11-30 02:46:48 -08:00
|
|
|
/*
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API int
|
2015-03-18 15:09:09 -07:00
|
|
|
wizard_page_apply(E_Wizard_Page *pg EINA_UNUSED)
|
2011-08-15 02:21:12 -07:00
|
|
|
{
|
2008-10-25 22:46:45 -07:00
|
|
|
return 1;
|
|
|
|
}
|
2012-11-30 02:46:48 -08:00
|
|
|
*/
|