From: <enl...@li...> - 2005-09-27 16:36:21
|
Enlightenment CVS committal Author : tsauerbeck Project : e17 Module : apps/e Dir : e17/apps/e/src/bin Modified Files: e_border.c e_config.c e_config.h e_focus.c e_ipc_handlers.h e_ipc_handlers_list.h Log Message: 'clicking-a-window-always-focuses-it' otherwise known as 'always-click-to-focus' is in. doesn't apply instantly, need to restart. i think that's the same with always-click-to-raise, so i'm not trying to do something about it =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v retrieving revision 1.426 retrieving revision 1.427 diff -u -3 -r1.426 -r1.427 --- e_border.c 27 Sep 2005 09:35:05 -0000 1.426 +++ e_border.c 27 Sep 2005 16:36:14 -0000 1.427 @@ -4149,7 +4149,8 @@ if (type != ECORE_X_EVENT_MOUSE_BUTTON_DOWN) return 0; ev = event; - if ((e_config->pass_click_on) || (e_config->always_click_to_raise)) + if ((e_config->pass_click_on) || (e_config->always_click_to_raise) || + (e_config->always_click_to_focus)) { E_Border *bd; =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.c,v retrieving revision 1.104 retrieving revision 1.105 diff -u -3 -r1.104 -r1.105 --- e_config.c 27 Sep 2005 11:22:46 -0000 1.104 +++ e_config.c 27 Sep 2005 16:36:14 -0000 1.105 @@ -290,6 +290,7 @@ E_CONFIG_VAL(D, T, focus_setting, INT); /**/ E_CONFIG_VAL(D, T, pass_click_on, INT); /**/ E_CONFIG_VAL(D, T, always_click_to_raise, INT); /**/ + E_CONFIG_VAL(D, T, always_click_to_focus, INT); /**/ E_CONFIG_VAL(D, T, use_auto_raise, INT); /**/ E_CONFIG_VAL(D, T, auto_raise_delay, DOUBLE); /**/ E_CONFIG_VAL(D, T, use_resist, INT); /**/ @@ -411,6 +412,7 @@ 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 = 1; e_config->use_auto_raise = 0; e_config->auto_raise_delay = 0.5; e_config->use_resist = 1; @@ -1364,6 +1366,7 @@ E_CONFIG_LIMIT(e_config->focus_setting, 0, 3); E_CONFIG_LIMIT(e_config->pass_click_on, 0, 1); E_CONFIG_LIMIT(e_config->always_click_to_raise, 0, 1); + E_CONFIG_LIMIT(e_config->always_click_to_focus, 0, 1); E_CONFIG_LIMIT(e_config->use_auto_raise, 0, 1); E_CONFIG_LIMIT(e_config->auto_raise_delay, 0.0, 5.0); E_CONFIG_LIMIT(e_config->use_resist, 0, 1); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.h,v retrieving revision 1.54 retrieving revision 1.55 diff -u -3 -r1.54 -r1.55 --- e_config.h 27 Sep 2005 11:22:46 -0000 1.54 +++ e_config.h 27 Sep 2005 16:36:14 -0000 1.55 @@ -108,6 +108,7 @@ int focus_setting; int pass_click_on; int always_click_to_raise; + int always_click_to_focus; int use_auto_raise; double auto_raise_delay; int use_resist; =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_focus.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- e_focus.c 24 Sep 2005 09:04:39 -0000 1.16 +++ e_focus.c 27 Sep 2005 16:36:14 -0000 1.17 @@ -88,6 +88,11 @@ if (!bd->lock_user_stacking) e_border_raise(bd); } + else if (e_config->always_click_to_focus) + { + if (!bd->lock_focus_out) + e_border_focus_set(bd, 1, 1); + } } void @@ -99,7 +104,8 @@ e_focus_event_focus_in(E_Border *bd) { if ((e_config->focus_policy == E_FOCUS_CLICK) && - (!e_config->always_click_to_raise)) + (!e_config->always_click_to_raise) && + (!e_config->always_click_to_focus)) { if (!bd->button_grabbed) return; e_bindings_mouse_ungrab(E_BINDING_CONTEXT_BORDER, bd->win); @@ -117,7 +123,8 @@ e_focus_event_focus_out(E_Border *bd) { if ((e_config->focus_policy == E_FOCUS_CLICK) && - (!e_config->always_click_to_raise)) + (!e_config->always_click_to_raise) && + (!e_config->always_click_to_focus)) { if (bd->button_grabbed) return; ecore_x_window_button_grab(bd->win, 1, @@ -140,7 +147,8 @@ e_focus_setup(E_Border *bd) { if ((e_config->focus_policy == E_FOCUS_CLICK) || - (e_config->always_click_to_raise)) + (e_config->always_click_to_raise) || + (e_config->always_click_to_focus)) { if (bd->button_grabbed) return; ecore_x_window_button_grab(bd->win, 1, =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers.h,v retrieving revision 1.81 retrieving revision 1.82 diff -u -3 -r1.81 -r1.82 --- e_ipc_handlers.h 27 Sep 2005 11:22:46 -0000 1.81 +++ e_ipc_handlers.h 27 Sep 2005 16:36:14 -0000 1.82 @@ -2854,6 +2854,46 @@ #undef HDL /****************************************************************************/ +#define HDL E_IPC_OP_ALWAYS_CLICK_TO_FOCUS_SET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-always-click-to-focus-set", 1, "Set the always click to focus policy, 1 for enabled 0 for disabled", 0, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_INT(atoi(params[0]), HDL); +#elif (TYPE == E_WM_IN) + START_INT(policy, HDL); + e_config->always_click_to_focus = policy; + E_CONFIG_LIMIT(e_config->always_click_to_focus, 0, 1); + SAVE; + END_INT; +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_ALWAYS_CLICK_TO_FOCUS_GET +#if (TYPE == E_REMOTE_OPTIONS) + OP("-always-click-to-focus-get", 0, "Get the always click to focus policy, 1 for enabled 0 for disabled", 1, HDL) +#elif (TYPE == E_REMOTE_OUT) + REQ_NULL(HDL); +#elif (TYPE == E_WM_IN) + SEND_INT(e_config->always_click_to_focus, E_IPC_OP_ALWAYS_CLICK_TO_FOCUS_GET_REPLY, HDL); +#elif (TYPE == E_REMOTE_IN) +#endif +#undef HDL + +/****************************************************************************/ +#define HDL E_IPC_OP_ALWAYS_CLICK_TO_FOCUS_GET_REPLY +#if (TYPE == E_REMOTE_OPTIONS) +#elif (TYPE == E_REMOTE_OUT) +#elif (TYPE == E_WM_IN) +#elif (TYPE == E_REMOTE_IN) + START_INT(policy, HDL); + printf("REPLY: POLICY=%d\n", policy); + END_INT; +#endif +#undef HDL + +/****************************************************************************/ #define HDL E_IPC_OP_USE_AUTO_RAISE_SET #if (TYPE == E_REMOTE_OPTIONS) OP("-use-auto-raise-set", 1, "Set use auto raise policy, 1 for enabled 0 for disabled", 0, HDL) =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers_list.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- e_ipc_handlers_list.h 27 Sep 2005 11:22:46 -0000 1.25 +++ e_ipc_handlers_list.h 27 Sep 2005 16:36:14 -0000 1.26 @@ -283,3 +283,7 @@ #define E_IPC_OP_RESIZE_INFO_VISIBLE_SET 276 #define E_IPC_OP_RESIZE_INFO_VISIBLE_GET 277 #define E_IPC_OP_RESIZE_INFO_VISIBLE_GET_REPLY 278 + +#define E_IPC_OP_ALWAYS_CLICK_TO_FOCUS_SET 279 +#define E_IPC_OP_ALWAYS_CLICK_TO_FOCUS_GET 280 +#define E_IPC_OP_ALWAYS_CLICK_TO_FOCUS_GET_REPLY 281 |