Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_border.c e_border.h e_config.c e_config.h
Log Message:
focus policy patch - adjusted :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.289
retrieving revision 1.290
diff -u -3 -r1.289 -r1.290
--- e_border.c 27 Jun 2005 10:08:52 -0000 1.289
+++ e_border.c 27 Jun 2005 12:05:24 -0000 1.290
@@ -447,6 +447,8 @@
ecore_x_window_show(bd->client.shell_win);
bd->shape = e_container_shape_add(con);
+ if (e_config->focus_setting != E_FOCUS_NONE)
+ bd->take_focus = 1;
bd->new_client = 1;
bd->changed = 1;
@@ -4405,7 +4407,26 @@
}
bd->need_shape_export = 0;
}
-
+
+ if (bd->take_focus)
+ {
+ if (e_config->focus_setting == E_FOCUS_NEW_WINDOW)
+ e_border_focus_set(bd, 1, 1);
+ else
+ {
+ if (bd->client.icccm.transient_for != 0)
+ {
+ if ((e_config->focus_setting == E_FOCUS_NEW_DIALOG) ||
+
+ ((e_config->focus_setting ==
E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED) &&
+
(e_border_find_by_client_window(bd->client.icccm.transient_for) ==
+ e_border_focused_get())))
+ e_border_focus_set(bd, 1, 1);
+ }
+ }
+ bd->take_focus = 0;
+ }
+
bd->changed = 0;
bd->changes.stack = 0;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.h,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -3 -r1.84 -r1.85
--- e_border.h 27 Jun 2005 10:08:53 -0000 1.84
+++ e_border.h 27 Jun 2005 12:05:25 -0000 1.85
@@ -33,6 +33,14 @@
E_FOCUS_SLOPPY
} E_Focus_Policy;
+typedef enum _E_Focus_Setting
+{
+ E_FOCUS_NONE,
+ E_FOCUS_NEW_WINDOW,
+ E_FOCUS_NEW_DIALOG,
+ E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED
+} E_Focus_Setting;
+
typedef enum _E_Maximize
{
E_MAXIMIZE_NONE,
@@ -275,6 +283,7 @@
unsigned int delete_requested : 1;
unsigned int ping_ok : 1;
unsigned int hung : 1;
+ unsigned int take_focus : 1;
E_Maximize maximized;
double ping;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- e_config.c 20 Jun 2005 09:38:26 -0000 1.65
+++ e_config.c 27 Jun 2005 12:05:25 -0000 1.66
@@ -141,6 +141,7 @@
E_CONFIG_LIST(D, T, path_append_modules, _e_config_path_append_edd); /**/
E_CONFIG_LIST(D, T, path_append_backgrounds, _e_config_path_append_edd);
/**/
E_CONFIG_VAL(D, T, focus_policy, INT); /**/
+ 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, use_auto_raise, INT);
@@ -232,6 +233,7 @@
e_config->evas_engine_drag = E_EVAS_ENGINE_DEFAULT;
e_config->language = strdup("");
e_config->focus_policy = E_FOCUS_MOUSE;
+ 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->use_auto_raise = 0;
@@ -724,13 +726,6 @@
/* CTRL+ALT Delete - logout */
/* CTRL+ALT End - restart */
- /* need a way to display all focused windows nicely - subsystem for
- * this that also grabs the modifier on activate (if there are any) so
- * on release of modifier(s) OR on any new action this list aborts display
- */
- /* ALT Tab - next window focus */
- /* ALT_SHIFT Tab - prev window focus */
-
/* need to support fullscreen anyway for this - ie netwm and the border
* system need to handle this as well as possibly using xrandr/xvidmode
*/
@@ -763,6 +758,7 @@
E_CONFIG_LIMIT(e_config->use_edge_flip, 0, 1);
E_CONFIG_LIMIT(e_config->edge_flip_timeout, 0.0, 2.0);
E_CONFIG_LIMIT(e_config->focus_policy, 0, 2);
+ 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->use_auto_raise, 0, 1);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- e_config.h 18 Jun 2005 04:30:35 -0000 1.32
+++ e_config.h 27 Jun 2005 12:05:26 -0000 1.33
@@ -46,7 +46,7 @@
* defaults for e to work - started at 100 when we introduced this config
* versioning feature
*/
-#define E_CONFIG_FILE_VERSION 113
+#define E_CONFIG_FILE_VERSION 114
#define E_EVAS_ENGINE_DEFAULT 0
#define E_EVAS_ENGINE_SOFTWARE_X11 1
@@ -95,6 +95,7 @@
Evas_List *path_append_modules;
Evas_List *path_append_backgrounds;
int focus_policy;
+ int focus_setting;
int pass_click_on;
int always_click_to_raise;
int use_auto_raise;
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs