SVN revision: 15565
This commit is contained in:
Carsten Haitzler 2005-06-29 08:49:54 +00:00
parent 748605c300
commit 2ebbd99565
4 changed files with 30 additions and 12 deletions

2
TODO
View File

@ -163,8 +163,6 @@ Some of the things (in very short form) that need to be done to E17...
* winlist could divide windows up into blocks - sub-lists within a container * winlist could divide windows up into blocks - sub-lists within a container
pwer desktop (with stick windows considered to live on the "current" desk pwer desktop (with stick windows considered to live on the "current" desk
when winlist starts) when winlist starts)
* make auto kill client and the kill() stuff config options
* make 10.0 sec ping time and the 10.0 sec wait for a SIGKILL an option
* make it easy for modules to hook into ipc and extend it for themselves * make it easy for modules to hook into ipc and extend it for themselves
* gadman needs some changes to virtualise the canvas/container the gadget * gadman needs some changes to virtualise the canvas/container the gadget
ends up in (eg in popups or border) ends up in (eg in popups or border)

View File

@ -1691,23 +1691,21 @@ e_border_act_close_begin(E_Border *bd)
if (bd->client.netwm.ping) if (bd->client.netwm.ping)
e_border_ping(bd); e_border_ping(bd);
} }
else else if (e_config->kill_if_close_not_possible)
e_border_act_kill_begin(bd); e_border_act_kill_begin(bd);
} }
void void
e_border_act_kill_begin(E_Border *bd) e_border_act_kill_begin(E_Border *bd)
{ {
if (bd->client.netwm.pid > 1) if ((bd->client.netwm.pid > 1) && (e_config->kill_process))
{ {
printf("%i\n", bd->client.netwm.pid);
kill(bd->client.netwm.pid, SIGINT); kill(bd->client.netwm.pid, SIGINT);
bd->kill_timer = ecore_timer_add(10.0, _e_border_cb_kill_timer, bd); bd->kill_timer = ecore_timer_add(e_config->kill_timer_wait,
_e_border_cb_kill_timer, bd);
} }
else else
{ ecore_x_kill(bd->client.win);
ecore_x_kill(bd->client.win);
}
e_border_hide(bd, 0); e_border_hide(bd, 0);
} }
@ -1846,7 +1844,9 @@ e_border_ping(E_Border *bd)
ecore_x_netwm_ping_send(bd->client.win); ecore_x_netwm_ping_send(bd->client.win);
bd->ping = ecore_time_get(); bd->ping = ecore_time_get();
if (bd->ping_timer) ecore_timer_del(bd->ping_timer); if (bd->ping_timer) ecore_timer_del(bd->ping_timer);
bd->ping_timer = ecore_timer_add(10.0, _e_border_cb_ping_timer, bd); if (e_config->ping_clients)
bd->ping_timer = ecore_timer_add(e_config->ping_clients_wait,
_e_border_cb_ping_timer, bd);
} }
void void

View File

@ -170,6 +170,11 @@ e_config_init(void)
E_CONFIG_VAL(D, T, winlist_pos_max_w, INT); E_CONFIG_VAL(D, T, winlist_pos_max_w, INT);
E_CONFIG_VAL(D, T, winlist_pos_max_h, INT); E_CONFIG_VAL(D, T, winlist_pos_max_h, INT);
E_CONFIG_VAL(D, T, maximize_policy, INT); E_CONFIG_VAL(D, T, maximize_policy, INT);
E_CONFIG_VAL(D, T, kill_if_close_not_possible, INT);
E_CONFIG_VAL(D, T, kill_process, INT);
E_CONFIG_VAL(D, T, kill_timer_wait, DOUBLE);
E_CONFIG_VAL(D, T, ping_clients, INT);
E_CONFIG_VAL(D, T, ping_clients_wait, DOUBLE);
e_config = e_config_domain_load("e", _e_config_edd); e_config = e_config_domain_load("e", _e_config_edd);
if (e_config) if (e_config)
@ -262,6 +267,11 @@ e_config_init(void)
e_config->winlist_pos_max_w = 320; e_config->winlist_pos_max_w = 320;
e_config->winlist_pos_max_h = 320; e_config->winlist_pos_max_h = 320;
e_config->maximize_policy = E_MAXIMIZE_FULLSCREEN; e_config->maximize_policy = E_MAXIMIZE_FULLSCREEN;
e_config->kill_if_close_not_possible = 1;
e_config->kill_process = 1;
e_config->kill_timer_wait = 10.0;
e_config->ping_clients = 1;
e_config->ping_clients_wait = 10.0;
{ {
E_Config_Module *em; E_Config_Module *em;
@ -787,7 +797,12 @@ e_config_init(void)
E_CONFIG_LIMIT(e_config->winlist_pos_max_w, 8, 4000); E_CONFIG_LIMIT(e_config->winlist_pos_max_w, 8, 4000);
E_CONFIG_LIMIT(e_config->winlist_pos_max_h, 8, 4000); E_CONFIG_LIMIT(e_config->winlist_pos_max_h, 8, 4000);
E_CONFIG_LIMIT(e_config->maximize_policy, E_MAXIMIZE_FULLSCREEN, E_MAXIMIZE_FILL); E_CONFIG_LIMIT(e_config->maximize_policy, E_MAXIMIZE_FULLSCREEN, E_MAXIMIZE_FILL);
; E_CONFIG_LIMIT(e_config->kill_if_close_not_possible, 0, 1);
E_CONFIG_LIMIT(e_config->kill_process, 0, 1);
E_CONFIG_LIMIT(e_config->kill_timer_wait, 0.0, 120.0);
E_CONFIG_LIMIT(e_config->ping_clients, 0, 1);
E_CONFIG_LIMIT(e_config->ping_clients_wait, 0.0, 120.0);
/* apply lang config - exception because config is loaded after intl setup */ /* apply lang config - exception because config is loaded after intl setup */
if ((e_config->language) && (strlen(e_config->language) > 0)) if ((e_config->language) && (strlen(e_config->language) > 0))

View File

@ -46,7 +46,7 @@ typedef Eet_Data_Descriptor E_Config_DD;
* defaults for e to work - started at 100 when we introduced this config * defaults for e to work - started at 100 when we introduced this config
* versioning feature * versioning feature
*/ */
#define E_CONFIG_FILE_VERSION 114 #define E_CONFIG_FILE_VERSION 115
#define E_EVAS_ENGINE_DEFAULT 0 #define E_EVAS_ENGINE_DEFAULT 0
#define E_EVAS_ENGINE_SOFTWARE_X11 1 #define E_EVAS_ENGINE_SOFTWARE_X11 1
@ -124,6 +124,11 @@ struct _E_Config
int winlist_pos_max_w; int winlist_pos_max_w;
int winlist_pos_max_h; int winlist_pos_max_h;
int maximize_policy; int maximize_policy;
int kill_if_close_not_possible;
int kill_process;
double kill_timer_wait;
int ping_clients;
double ping_clients_wait;
}; };
/* FIXME: all of thsie needs to become eet lumps for enmcode/decode */ /* FIXME: all of thsie needs to become eet lumps for enmcode/decode */