2006-02-22 06:35:04 -08:00
|
|
|
#include "e.h"
|
2010-07-27 18:50:35 -07:00
|
|
|
#include "e_mod_main.h"
|
|
|
|
|
2012-07-05 01:01:29 -07:00
|
|
|
static void *_create_data(E_Config_Dialog *cfd);
|
|
|
|
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
|
|
|
static void _fill_data(E_Config_Dialog_Data *cfdata);
|
|
|
|
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
|
|
|
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
2010-07-27 18:50:35 -07:00
|
|
|
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
|
|
|
|
2012-07-05 01:01:29 -07:00
|
|
|
static void _cb_method_change(void *data, Evas_Object *obj, void *event_info);
|
2013-10-26 01:59:32 -07:00
|
|
|
static void _login_method_change(void *data, Evas_Object *obj, void *event_info);
|
2012-07-05 01:01:29 -07:00
|
|
|
static void _cb_login_change(void *data, Evas_Object *obj);
|
|
|
|
static int _zone_count_get(void);
|
2006-03-02 16:02:32 -08:00
|
|
|
|
2012-07-05 01:01:29 -07:00
|
|
|
static void _cb_bg_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event);
|
2009-04-26 19:54:43 -07:00
|
|
|
|
2009-04-27 18:49:17 -07:00
|
|
|
struct _E_Config_Dialog_Data
|
2006-02-22 06:35:04 -08:00
|
|
|
{
|
2013-10-26 10:02:20 -07:00
|
|
|
Evas_Object *lock_cmd_entry, *passwd_entry, *pin_entry;
|
2010-07-27 18:50:35 -07:00
|
|
|
E_Config_Dialog *cfd, *bg_fsel;
|
2009-04-27 18:49:17 -07:00
|
|
|
|
2007-03-01 13:12:46 -08:00
|
|
|
/* Common vars */
|
2012-07-05 01:01:29 -07:00
|
|
|
int use_xscreensaver;
|
|
|
|
int zone_count;
|
2008-11-13 12:39:13 -08:00
|
|
|
|
2010-06-05 07:15:18 -07:00
|
|
|
/* Locking */
|
2012-07-05 01:01:29 -07:00
|
|
|
int start_locked;
|
|
|
|
int lock_on_suspend;
|
|
|
|
int auto_lock;
|
2013-10-26 01:59:32 -07:00
|
|
|
int desklock_auth_method;
|
2012-07-05 01:01:29 -07:00
|
|
|
int login_zone;
|
|
|
|
int zone;
|
2013-10-26 01:59:32 -07:00
|
|
|
char *desklock_personal_passwd;
|
2013-10-26 10:02:20 -07:00
|
|
|
char *pin_str;
|
2012-07-05 01:01:29 -07:00
|
|
|
char *custom_lock_cmd;
|
|
|
|
|
2012-10-02 07:04:04 -07:00
|
|
|
/* Layout */
|
2012-10-03 02:00:12 -07:00
|
|
|
const char *desklock_layout;
|
2012-10-02 07:04:04 -07:00
|
|
|
|
2010-06-05 07:15:18 -07:00
|
|
|
/* Timers */
|
2012-07-05 01:01:29 -07:00
|
|
|
int screensaver_lock;
|
|
|
|
double idle_time;
|
|
|
|
double post_screensaver_time;
|
2009-04-27 18:49:17 -07:00
|
|
|
|
2007-03-01 13:12:46 -08:00
|
|
|
/* Adv props */
|
2012-07-16 06:25:17 -07:00
|
|
|
E_Desklock_Background_Method bg_method;
|
2012-07-09 05:36:08 -07:00
|
|
|
int bg_method_prev;
|
2012-07-16 06:25:17 -07:00
|
|
|
Eina_List *bgs;
|
2012-07-05 01:01:29 -07:00
|
|
|
int ask_presentation;
|
|
|
|
double ask_presentation_timeout;
|
2009-04-19 01:30:21 -07:00
|
|
|
|
2010-06-05 07:15:18 -07:00
|
|
|
struct
|
2012-07-05 01:01:29 -07:00
|
|
|
{
|
2012-10-02 07:04:04 -07:00
|
|
|
Evas_Object *kbd_list;
|
2012-07-05 01:01:29 -07:00
|
|
|
Evas_Object *loginbox_slider;
|
|
|
|
Evas_Object *auto_lock_slider;
|
2012-07-05 05:33:33 -07:00
|
|
|
Evas_Object *o_table;
|
|
|
|
Eina_List *bgs;
|
2012-07-05 01:01:29 -07:00
|
|
|
} gui;
|
2006-02-22 06:35:04 -08:00
|
|
|
};
|
|
|
|
|
2010-01-22 12:28:39 -08:00
|
|
|
E_Config_Dialog *
|
2014-11-02 18:35:13 -08:00
|
|
|
e_int_config_desklock(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
2006-02-22 06:35:04 -08:00
|
|
|
{
|
2006-10-08 01:04:18 -07:00
|
|
|
E_Config_Dialog *cfd;
|
|
|
|
E_Config_Dialog_View *v;
|
2009-04-27 18:49:17 -07:00
|
|
|
|
2009-12-04 14:37:18 -08:00
|
|
|
if (e_config_dialog_find("E", "screen/screen_lock")) return NULL;
|
2006-10-08 01:04:18 -07:00
|
|
|
v = E_NEW(E_Config_Dialog_View, 1);
|
2007-03-13 09:27:01 -07:00
|
|
|
if (!v) return NULL;
|
2007-03-01 13:12:46 -08:00
|
|
|
|
2010-07-27 18:50:35 -07:00
|
|
|
v->create_cfdata = _create_data;
|
|
|
|
v->free_cfdata = _free_data;
|
2007-03-01 13:12:46 -08:00
|
|
|
v->basic.create_widgets = _basic_create;
|
2009-04-19 01:30:21 -07:00
|
|
|
v->basic.apply_cfdata = _basic_apply;
|
|
|
|
v->basic.check_changed = _basic_check_changed;
|
2006-10-08 01:04:18 -07:00
|
|
|
v->override_auto_apply = 1;
|
2009-04-27 18:49:17 -07:00
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
cfd = e_config_dialog_new(NULL, _("Screen Lock Settings"), "E",
|
2012-07-05 01:01:29 -07:00
|
|
|
"screen/screen_lock", "preferences-system-lock-screen",
|
|
|
|
0, v, NULL);
|
2006-10-08 01:04:18 -07:00
|
|
|
return cfd;
|
2006-02-22 06:35:04 -08:00
|
|
|
}
|
|
|
|
|
2012-07-05 01:01:29 -07:00
|
|
|
void
|
2014-02-20 11:54:29 -08:00
|
|
|
e_int_config_desklock_fsel_done(E_Config_Dialog *cfd, Evas_Object *bg, const char *bg_file, Eina_Bool hide_logo)
|
2010-07-27 18:50:35 -07:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2012-07-05 05:33:33 -07:00
|
|
|
Eina_List *l;
|
2014-02-20 11:54:29 -08:00
|
|
|
E_Config_Desklock_Background *cbg;
|
|
|
|
Eina_Stringshare *bg_name;
|
|
|
|
Evas_Object *o;
|
|
|
|
unsigned int n = 0;
|
2010-07-27 18:50:35 -07:00
|
|
|
|
|
|
|
if (!(cfdata = cfd->cfdata)) return;
|
|
|
|
cfdata->bg_fsel = NULL;
|
2012-07-05 05:33:33 -07:00
|
|
|
if (!bg_file) return;
|
2014-02-20 11:54:29 -08:00
|
|
|
e_widget_preview_file_get(bg, &bg_name, NULL);
|
|
|
|
EINA_LIST_FOREACH(cfdata->gui.bgs, l, o)
|
|
|
|
{
|
|
|
|
if (o == bg) break;
|
|
|
|
n++;
|
|
|
|
}
|
|
|
|
cbg = eina_list_nth(cfdata->bgs, n);
|
|
|
|
if (!cbg) return; //wtf
|
|
|
|
eina_stringshare_replace(&cbg->file, bg_file);
|
|
|
|
cbg->hide_logo = hide_logo;
|
2014-12-11 09:24:16 -08:00
|
|
|
evas_object_data_set(bg, "hide_logo", (void*)(long)cbg->hide_logo);
|
2012-07-05 05:33:33 -07:00
|
|
|
e_widget_preview_edje_set(bg, bg_file, "e/desktop/background");
|
2010-07-27 18:50:35 -07:00
|
|
|
}
|
|
|
|
|
2014-02-20 11:54:29 -08:00
|
|
|
static E_Config_Desklock_Background *
|
|
|
|
desklock_bg_dup(const E_Config_Desklock_Background *cbg, const char *str)
|
|
|
|
{
|
|
|
|
E_Config_Desklock_Background *ret;
|
|
|
|
|
|
|
|
ret = E_NEW(E_Config_Desklock_Background, 1);
|
|
|
|
if (cbg)
|
|
|
|
{
|
|
|
|
ret->file = eina_stringshare_ref(cbg->file);
|
|
|
|
ret->hide_logo = cbg->hide_logo;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
ret->file = eina_stringshare_add(str);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2009-04-27 18:49:17 -07:00
|
|
|
static void
|
|
|
|
_fill_data(E_Config_Dialog_Data *cfdata)
|
2006-02-22 06:35:04 -08:00
|
|
|
{
|
2012-07-05 05:33:33 -07:00
|
|
|
Eina_List *l;
|
|
|
|
E_Config_Desklock_Background *bg;
|
|
|
|
int x;
|
2009-04-27 18:49:17 -07:00
|
|
|
|
2012-07-05 05:33:33 -07:00
|
|
|
cfdata->zone_count = _zone_count_get();
|
|
|
|
EINA_LIST_FOREACH(e_config->desklock_backgrounds, l, bg)
|
2014-02-20 11:54:29 -08:00
|
|
|
cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(bg, NULL));
|
2012-07-05 05:33:33 -07:00
|
|
|
if (!cfdata->bgs)
|
|
|
|
for (x = 0; x < cfdata->zone_count; x++)
|
2014-02-20 11:54:29 -08:00
|
|
|
cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(NULL, "theme_desklock_background"));
|
2012-07-05 05:33:33 -07:00
|
|
|
|
2014-02-20 11:54:29 -08:00
|
|
|
bg = eina_list_data_get(cfdata->bgs);
|
|
|
|
if (!e_util_strcmp(bg->file, "theme_desklock_background"))
|
2012-07-16 06:25:17 -07:00
|
|
|
cfdata->bg_method = E_DESKLOCK_BACKGROUND_METHOD_THEME_DESKLOCK;
|
2014-02-20 11:54:29 -08:00
|
|
|
else if (!e_util_strcmp(bg->file, "theme_background"))
|
2012-07-16 06:25:17 -07:00
|
|
|
cfdata->bg_method = E_DESKLOCK_BACKGROUND_METHOD_THEME;
|
2014-02-20 11:54:29 -08:00
|
|
|
else if (!e_util_strcmp(bg->file, "user_background"))
|
2012-07-16 06:25:17 -07:00
|
|
|
cfdata->bg_method = E_DESKLOCK_BACKGROUND_METHOD_WALLPAPER;
|
2009-04-25 11:32:34 -07:00
|
|
|
else
|
2012-07-16 06:25:17 -07:00
|
|
|
cfdata->bg_method = E_DESKLOCK_BACKGROUND_METHOD_CUSTOM;
|
2007-03-01 13:12:46 -08:00
|
|
|
|
2012-07-09 05:36:08 -07:00
|
|
|
cfdata->bg_method_prev = cfdata->bg_method;
|
2014-03-11 04:24:41 -07:00
|
|
|
#ifndef HAVE_WAYLAND_ONLY
|
2007-03-01 13:12:46 -08:00
|
|
|
cfdata->use_xscreensaver = ecore_x_screensaver_event_available_get();
|
2014-03-11 04:24:41 -07:00
|
|
|
#endif
|
2009-04-27 18:49:17 -07:00
|
|
|
|
2013-10-26 01:59:32 -07:00
|
|
|
cfdata->desklock_auth_method = e_config->desklock_auth_method;
|
2009-04-27 18:49:17 -07:00
|
|
|
if (e_config->desklock_custom_desklock_cmd)
|
2007-03-01 13:12:46 -08:00
|
|
|
cfdata->custom_lock_cmd = strdup(e_config->desklock_custom_desklock_cmd);
|
2007-03-17 03:15:56 -07:00
|
|
|
|
2012-10-03 02:00:12 -07:00
|
|
|
cfdata->desklock_layout = e_config->xkb.desklock_layout;
|
2008-11-13 12:39:13 -08:00
|
|
|
cfdata->start_locked = e_config->desklock_start_locked;
|
2010-05-31 08:17:02 -07:00
|
|
|
cfdata->lock_on_suspend = e_config->desklock_on_suspend;
|
2007-03-01 13:12:46 -08:00
|
|
|
cfdata->auto_lock = e_config->desklock_autolock_idle;
|
|
|
|
cfdata->screensaver_lock = e_config->desklock_autolock_screensaver;
|
|
|
|
cfdata->idle_time = e_config->desklock_autolock_idle_timeout / 60;
|
2009-04-26 19:49:50 -07:00
|
|
|
cfdata->post_screensaver_time = e_config->desklock_post_screensaver_time;
|
2009-04-27 18:49:17 -07:00
|
|
|
if (e_config->desklock_login_box_zone >= 0)
|
2006-03-02 22:00:18 -08:00
|
|
|
{
|
2012-07-05 01:01:29 -07:00
|
|
|
cfdata->login_zone = 0;
|
|
|
|
cfdata->zone = e_config->desklock_login_box_zone;
|
2006-03-02 22:00:18 -08:00
|
|
|
}
|
2009-04-27 18:49:17 -07:00
|
|
|
else
|
2006-08-26 22:55:06 -07:00
|
|
|
{
|
2012-07-05 01:01:29 -07:00
|
|
|
cfdata->login_zone = e_config->desklock_login_box_zone;
|
|
|
|
cfdata->zone = 0;
|
2006-08-26 22:55:06 -07:00
|
|
|
}
|
2009-04-26 19:54:43 -07:00
|
|
|
|
|
|
|
cfdata->ask_presentation = e_config->desklock_ask_presentation;
|
2012-07-05 01:01:29 -07:00
|
|
|
cfdata->ask_presentation_timeout =
|
2010-07-27 18:50:35 -07:00
|
|
|
e_config->desklock_ask_presentation_timeout;
|
2006-02-22 06:35:04 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void *
|
2009-04-27 18:49:17 -07:00
|
|
|
_create_data(E_Config_Dialog *cfd)
|
2006-02-22 06:35:04 -08:00
|
|
|
{
|
2007-01-15 09:14:12 -08:00
|
|
|
E_Config_Dialog_Data *cfdata;
|
2009-04-27 18:49:17 -07:00
|
|
|
|
2007-01-15 09:14:12 -08:00
|
|
|
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
2010-07-27 18:50:35 -07:00
|
|
|
cfdata->cfd = cfd;
|
2007-03-01 13:12:46 -08:00
|
|
|
_fill_data(cfdata);
|
|
|
|
return cfdata;
|
2006-02-22 06:35:04 -08:00
|
|
|
}
|
2007-03-01 13:12:46 -08:00
|
|
|
|
2006-02-22 06:35:04 -08:00
|
|
|
static void
|
2010-08-19 11:21:13 -07:00
|
|
|
_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
2006-02-22 06:35:04 -08:00
|
|
|
{
|
2014-02-20 11:54:29 -08:00
|
|
|
E_Config_Desklock_Background *bg;
|
2012-07-05 01:01:29 -07:00
|
|
|
if (cfdata->bg_fsel)
|
2010-07-27 18:50:35 -07:00
|
|
|
e_object_del(E_OBJECT(cfdata->bg_fsel));
|
2007-03-01 13:12:46 -08:00
|
|
|
E_FREE(cfdata->custom_lock_cmd);
|
2013-10-26 01:59:32 -07:00
|
|
|
E_FREE(cfdata->desklock_personal_passwd);
|
2013-10-26 10:02:20 -07:00
|
|
|
E_FREE(cfdata->pin_str);
|
2012-07-05 05:33:33 -07:00
|
|
|
EINA_LIST_FREE(cfdata->bgs, bg)
|
2014-02-20 11:54:29 -08:00
|
|
|
{
|
|
|
|
eina_stringshare_del(bg->file);
|
|
|
|
free(bg);
|
|
|
|
}
|
|
|
|
free(cfdata);
|
2006-02-22 06:35:04 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
2011-11-07 15:59:12 -08:00
|
|
|
_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
|
2006-02-22 06:35:04 -08:00
|
|
|
{
|
2012-10-02 07:04:04 -07:00
|
|
|
E_Config_XKB_Layout *cl;
|
|
|
|
int grp = 0;
|
2014-09-05 08:16:55 -07:00
|
|
|
Evas_Object *otb, *ol, *ow, *of, *oc;
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
const Eina_List *l, *ll;
|
2012-07-05 05:33:33 -07:00
|
|
|
E_Zone *zone;
|
2010-06-05 07:15:18 -07:00
|
|
|
E_Radio_Group *rg;
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
E_Comp *comp;
|
2012-07-05 05:33:33 -07:00
|
|
|
int screen_count, x = 0;
|
2010-07-27 18:50:35 -07:00
|
|
|
|
2013-10-26 01:59:32 -07:00
|
|
|
screen_count = eina_list_count(e_xinerama_screens_get());
|
2010-07-27 18:50:35 -07:00
|
|
|
|
|
|
|
otb = e_widget_toolbook_add(evas, (24 * e_scale), (24 * e_scale));
|
|
|
|
|
|
|
|
/* Locking */
|
2010-06-05 07:15:18 -07:00
|
|
|
ol = e_widget_list_add(evas, 0, 0);
|
2010-07-27 18:50:35 -07:00
|
|
|
ow = e_widget_check_add(evas, _("Lock on Startup"), &cfdata->start_locked);
|
2008-11-13 12:39:13 -08:00
|
|
|
e_widget_disabled_set(ow, !cfdata->use_xscreensaver);
|
2010-06-05 07:15:18 -07:00
|
|
|
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
2010-07-27 18:50:35 -07:00
|
|
|
ow = e_widget_check_add(evas, _("Lock on Suspend"), &cfdata->lock_on_suspend);
|
2010-05-31 08:17:02 -07:00
|
|
|
e_widget_disabled_set(ow, !cfdata->use_xscreensaver);
|
2010-06-05 07:15:18 -07:00
|
|
|
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
2010-07-27 18:50:35 -07:00
|
|
|
|
2013-10-26 01:59:32 -07:00
|
|
|
rg = e_widget_radio_group_new(&(cfdata->desklock_auth_method));
|
|
|
|
ow = e_widget_radio_add(evas, _("Use System Authentication"), E_DESKLOCK_AUTH_METHOD_SYSTEM, rg);
|
|
|
|
evas_object_smart_callback_add(ow, "changed", _login_method_change, cfdata);
|
|
|
|
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
|
|
|
ow = e_widget_radio_add(evas, _("Use Personal Screenlock Password"), E_DESKLOCK_AUTH_METHOD_PERSONAL, rg);
|
|
|
|
evas_object_smart_callback_add(ow, "changed", _login_method_change, cfdata);
|
|
|
|
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
2013-10-26 10:02:20 -07:00
|
|
|
ow = e_widget_radio_add(evas, _("Use PIN"), E_DESKLOCK_AUTH_METHOD_PIN, rg);
|
|
|
|
evas_object_smart_callback_add(ow, "changed", _login_method_change, cfdata);
|
|
|
|
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
2013-10-26 01:59:32 -07:00
|
|
|
ow = e_widget_radio_add(evas, _("Use External Screenlock Command"), E_DESKLOCK_AUTH_METHOD_EXTERNAL, rg);
|
|
|
|
evas_object_smart_callback_add(ow, "changed", _login_method_change, cfdata);
|
|
|
|
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
|
|
|
|
|
|
|
of = e_widget_framelist_add(evas, _("Personal Screenlock Password"), 0);
|
|
|
|
cfdata->passwd_entry = ow = e_widget_entry_add(evas, &(cfdata->desklock_personal_passwd), NULL, NULL, NULL);
|
|
|
|
e_widget_entry_password_set(ow, 1);
|
2010-06-05 07:15:18 -07:00
|
|
|
e_widget_framelist_object_append(of, ow);
|
2013-10-26 01:59:32 -07:00
|
|
|
e_widget_list_object_append(ol, of, 1, 1, 0.5);
|
2012-04-24 00:41:22 -07:00
|
|
|
|
2013-10-26 10:02:20 -07:00
|
|
|
of = e_widget_framelist_add(evas, _("PIN Entry"), 0);
|
|
|
|
cfdata->pin_entry = ow = e_widget_entry_add(evas, &(cfdata->pin_str), NULL, NULL, NULL);
|
|
|
|
e_widget_entry_password_set(ow, 1);
|
|
|
|
e_widget_framelist_object_append(of, ow);
|
|
|
|
e_widget_list_object_append(ol, of, 1, 1, 0.5);
|
|
|
|
|
2013-10-26 01:59:32 -07:00
|
|
|
of = e_widget_framelist_add(evas, _("External Screenlock Command"), 0);
|
|
|
|
cfdata->lock_cmd_entry = ow = e_widget_entry_add(evas, &(cfdata->custom_lock_cmd), NULL, NULL, NULL);
|
2012-04-24 00:41:22 -07:00
|
|
|
e_widget_framelist_object_append(of, ow);
|
2013-10-26 01:59:32 -07:00
|
|
|
|
|
|
|
e_widget_disabled_set(cfdata->passwd_entry,
|
|
|
|
(cfdata->desklock_auth_method != E_DESKLOCK_AUTH_METHOD_PERSONAL));
|
2013-10-26 10:02:20 -07:00
|
|
|
e_widget_disabled_set(cfdata->pin_entry,
|
|
|
|
(cfdata->desklock_auth_method != E_DESKLOCK_AUTH_METHOD_PIN));
|
2013-10-26 01:59:32 -07:00
|
|
|
e_widget_disabled_set(cfdata->lock_cmd_entry,
|
|
|
|
(cfdata->desklock_auth_method != E_DESKLOCK_AUTH_METHOD_EXTERNAL));
|
|
|
|
|
2010-06-05 07:15:18 -07:00
|
|
|
e_widget_list_object_append(ol, of, 1, 1, 0.5);
|
2010-07-27 18:50:35 -07:00
|
|
|
e_widget_toolbook_page_append(otb, NULL, _("Locking"), ol,
|
|
|
|
1, 0, 1, 0, 0.5, 0.0);
|
|
|
|
|
2012-10-02 07:04:04 -07:00
|
|
|
/* Keyboard Layout */
|
2012-10-03 02:00:12 -07:00
|
|
|
cfdata->gui.kbd_list = ol = e_widget_ilist_add(evas, 32 * e_scale, 32 * e_scale, &cfdata->desklock_layout);
|
2012-10-02 07:04:04 -07:00
|
|
|
EINA_LIST_FOREACH(e_config->xkb.used_layouts, l, cl)
|
|
|
|
{
|
|
|
|
Evas_Object *icon, *end;
|
|
|
|
char buf[4096];
|
|
|
|
const char *name = cl->name;
|
|
|
|
|
|
|
|
end = edje_object_add(evas);
|
|
|
|
if (e_theme_edje_object_set(end, "base/theme/widgets",
|
|
|
|
"e/widgets/ilist/toggle_end"))
|
|
|
|
{
|
2012-10-03 02:00:12 -07:00
|
|
|
if (name == cfdata->desklock_layout)
|
|
|
|
{
|
|
|
|
edje_object_signal_emit(end, "e,state,checked", "e");
|
|
|
|
e_widget_ilist_selected_set(ol, grp);
|
|
|
|
}
|
2012-10-02 07:04:04 -07:00
|
|
|
else
|
|
|
|
edje_object_signal_emit(end, "e,state,unchecked", "e");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
evas_object_del(end);
|
|
|
|
end = NULL;
|
|
|
|
}
|
|
|
|
e_xkb_flag_file_get(buf, sizeof(buf), name);
|
|
|
|
icon = e_icon_add(evas);
|
|
|
|
if (!e_icon_file_set(icon, buf))
|
|
|
|
{
|
|
|
|
evas_object_del(icon);
|
|
|
|
icon = NULL;
|
|
|
|
}
|
|
|
|
if (cl->variant)
|
|
|
|
snprintf(buf, sizeof(buf), "%s (%s, %s)", cl->name, cl->model, cl->variant);
|
|
|
|
else
|
|
|
|
snprintf(buf, sizeof(buf), "%s (%s)", cl->name, cl->model);
|
2012-10-03 02:00:12 -07:00
|
|
|
e_widget_ilist_append_full(ol, icon, end, buf, NULL, cfdata, cl->name);
|
2012-10-02 07:04:04 -07:00
|
|
|
grp++;
|
|
|
|
}
|
|
|
|
e_widget_toolbook_page_append(otb, NULL, _("Keyboard Layout"), ol,
|
|
|
|
1, 1, 1, 1, 0.5, 0.0);
|
|
|
|
|
2010-07-27 18:50:35 -07:00
|
|
|
/* Login */
|
|
|
|
ol = e_widget_list_add(evas, 0, 0);
|
2010-06-05 07:15:18 -07:00
|
|
|
rg = e_widget_radio_group_new(&(cfdata->login_zone));
|
2010-07-27 18:50:35 -07:00
|
|
|
ow = e_widget_radio_add(evas, _("Show on all screens"), -1, rg);
|
2010-06-05 07:15:18 -07:00
|
|
|
e_widget_on_change_hook_set(ow, _cb_login_change, cfdata);
|
|
|
|
e_widget_disabled_set(ow, (screen_count <= 0));
|
2010-07-27 18:50:35 -07:00
|
|
|
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
|
|
|
|
|
|
|
ow = e_widget_radio_add(evas, _("Show on current screen"), -2, rg);
|
2010-06-05 07:15:18 -07:00
|
|
|
e_widget_on_change_hook_set(ow, _cb_login_change, cfdata);
|
|
|
|
e_widget_disabled_set(ow, (screen_count <= 0));
|
2010-07-27 18:50:35 -07:00
|
|
|
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
|
|
|
|
|
|
|
ow = e_widget_radio_add(evas, _("Show on screen #:"), 0, rg);
|
2010-06-05 07:15:18 -07:00
|
|
|
e_widget_on_change_hook_set(ow, _cb_login_change, cfdata);
|
|
|
|
e_widget_disabled_set(ow, (screen_count <= 0));
|
2010-07-27 18:50:35 -07:00
|
|
|
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
|
|
|
|
2012-07-05 01:01:29 -07:00
|
|
|
cfdata->gui.loginbox_slider =
|
2010-06-05 07:15:18 -07:00
|
|
|
e_widget_slider_add(evas, 1, 0, _("%1.0f"), 0.0, (cfdata->zone_count - 1),
|
|
|
|
1.0, 0, NULL, &(cfdata->zone), 100);
|
|
|
|
e_widget_disabled_set(cfdata->gui.loginbox_slider, (screen_count <= 0));
|
2010-07-27 18:50:35 -07:00
|
|
|
e_widget_list_object_append(ol, cfdata->gui.loginbox_slider, 1, 1, 0.5);
|
|
|
|
e_widget_toolbook_page_append(otb, NULL, _("Login Box"), ol,
|
2010-06-05 07:15:18 -07:00
|
|
|
1, 0, 1, 0, 0.5, 0.0);
|
2010-07-27 18:50:35 -07:00
|
|
|
|
|
|
|
/* Timers */
|
2010-06-05 07:15:18 -07:00
|
|
|
ol = e_widget_list_add(evas, 0, 0);
|
2013-02-06 01:58:41 -08:00
|
|
|
oc = e_widget_check_add(evas, _("Lock after X screensaver activates"),
|
2012-07-05 01:01:29 -07:00
|
|
|
&cfdata->screensaver_lock);
|
2013-02-06 01:58:41 -08:00
|
|
|
e_widget_disabled_set(oc, !cfdata->use_xscreensaver);
|
|
|
|
e_widget_list_object_append(ol, oc, 1, 1, 0.5);
|
2010-07-27 18:50:35 -07:00
|
|
|
|
2009-04-26 19:49:50 -07:00
|
|
|
ow = e_widget_slider_add(evas, 1, 0, _("%1.0f seconds"), 0.0, 300.0, 10.0, 0,
|
2012-07-05 01:01:29 -07:00
|
|
|
&(cfdata->post_screensaver_time), NULL, 100);
|
2007-03-01 13:12:46 -08:00
|
|
|
e_widget_disabled_set(ow, !cfdata->use_xscreensaver);
|
2013-02-06 01:58:41 -08:00
|
|
|
if (cfdata->use_xscreensaver)
|
|
|
|
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
|
2010-07-27 18:50:35 -07:00
|
|
|
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
|
|
|
|
2013-02-06 01:58:41 -08:00
|
|
|
oc = e_widget_check_add(evas, _("Lock when idle time exceeded"),
|
2012-07-05 01:01:29 -07:00
|
|
|
&cfdata->auto_lock);
|
2013-02-06 01:58:41 -08:00
|
|
|
e_widget_list_object_append(ol, oc, 1, 1, 0.5);
|
2010-07-27 18:50:35 -07:00
|
|
|
|
2007-03-01 13:12:46 -08:00
|
|
|
ow = e_widget_slider_add(evas, 1, 0, _("%1.0f minutes"), 1.0, 90.0, 1.0, 0,
|
2012-07-05 01:01:29 -07:00
|
|
|
&(cfdata->idle_time), NULL, 100);
|
2013-02-06 01:58:41 -08:00
|
|
|
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
|
2010-07-27 18:50:35 -07:00
|
|
|
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
|
|
|
e_widget_toolbook_page_append(otb, NULL, _("Timers"), ol,
|
|
|
|
1, 0, 1, 0, 0.5, 0.0);
|
2009-04-19 01:30:21 -07:00
|
|
|
|
2010-07-27 18:50:35 -07:00
|
|
|
/* Presentation */
|
|
|
|
ol = e_widget_list_add(evas, 0, 0);
|
2013-02-06 01:58:41 -08:00
|
|
|
oc = e_widget_check_add(evas, _("Suggest if deactivated before"),
|
2010-07-27 18:50:35 -07:00
|
|
|
&(cfdata->ask_presentation));
|
2013-02-06 01:58:41 -08:00
|
|
|
e_widget_list_object_append(ol, oc, 1, 1, 0.5);
|
2010-07-27 18:50:35 -07:00
|
|
|
ow = e_widget_slider_add(evas, 1, 0, _("%1.0f seconds"), 1.0, 300.0, 10.0, 0,
|
2010-06-05 07:15:18 -07:00
|
|
|
&(cfdata->ask_presentation_timeout), NULL, 100);
|
2013-02-06 01:58:41 -08:00
|
|
|
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
|
2010-07-27 18:50:35 -07:00
|
|
|
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
|
|
|
|
e_widget_toolbook_page_append(otb, NULL, _("Presentation Mode"), ol,
|
2010-06-05 07:15:18 -07:00
|
|
|
1, 0, 1, 0, 0.5, 0.0);
|
2010-07-27 18:50:35 -07:00
|
|
|
|
|
|
|
/* Wallpapers */
|
2010-06-05 07:15:18 -07:00
|
|
|
ol = e_widget_list_add(evas, 0, 0);
|
2010-07-27 18:50:35 -07:00
|
|
|
of = e_widget_table_add(evas, 1);
|
2012-07-16 06:25:17 -07:00
|
|
|
rg = e_widget_radio_group_new((int *)&(cfdata->bg_method));
|
|
|
|
ow = e_widget_radio_add(evas, _("Theme Defined"),
|
|
|
|
E_DESKLOCK_BACKGROUND_METHOD_THEME_DESKLOCK, rg);
|
2010-06-05 07:15:18 -07:00
|
|
|
evas_object_smart_callback_add(ow, "changed", _cb_method_change, cfdata);
|
2010-07-27 18:50:35 -07:00
|
|
|
e_widget_table_object_append(of, ow, 0, 0, 1, 1, 1, 0, 1, 0);
|
2012-07-16 06:25:17 -07:00
|
|
|
ow = e_widget_radio_add(evas, _("Theme Wallpaper"),
|
|
|
|
E_DESKLOCK_BACKGROUND_METHOD_THEME, rg);
|
2010-06-05 07:15:18 -07:00
|
|
|
evas_object_smart_callback_add(ow, "changed", _cb_method_change, cfdata);
|
2010-07-27 18:50:35 -07:00
|
|
|
e_widget_table_object_append(of, ow, 0, 1, 1, 1, 1, 0, 1, 0);
|
2012-07-16 06:25:17 -07:00
|
|
|
ow = e_widget_radio_add(evas, _("Current Wallpaper"),
|
|
|
|
E_DESKLOCK_BACKGROUND_METHOD_WALLPAPER, rg);
|
2010-06-05 07:15:18 -07:00
|
|
|
evas_object_smart_callback_add(ow, "changed", _cb_method_change, cfdata);
|
2010-07-27 18:50:35 -07:00
|
|
|
e_widget_table_object_append(of, ow, 1, 0, 1, 1, 1, 0, 1, 0);
|
2012-07-16 06:25:17 -07:00
|
|
|
ow = e_widget_radio_add(evas, _("Custom"),
|
|
|
|
E_DESKLOCK_BACKGROUND_METHOD_CUSTOM, rg);
|
2010-06-05 07:15:18 -07:00
|
|
|
evas_object_smart_callback_add(ow, "changed", _cb_method_change, cfdata);
|
2010-07-27 18:50:35 -07:00
|
|
|
e_widget_table_object_append(of, ow, 1, 1, 1, 1, 1, 0, 1, 0);
|
2010-06-05 07:15:18 -07:00
|
|
|
e_widget_list_object_append(ol, of, 1, 1, 0.5);
|
2010-07-27 18:50:35 -07:00
|
|
|
|
2014-09-05 08:16:55 -07:00
|
|
|
cfdata->gui.o_table = e_widget_table_add(evas, 1);
|
2012-07-05 05:33:33 -07:00
|
|
|
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
EINA_LIST_FOREACH(e_comp_list(), l, comp)
|
|
|
|
EINA_LIST_FOREACH(comp->zones, ll, zone)
|
|
|
|
{
|
|
|
|
ow = e_widget_preview_add(evas, 100, 140);
|
|
|
|
cfdata->gui.bgs = eina_list_append(cfdata->gui.bgs, ow);
|
|
|
|
evas_object_data_set(ow, "zone", zone);
|
|
|
|
e_widget_disabled_set(ow,
|
|
|
|
(cfdata->bg_method < E_DESKLOCK_BACKGROUND_METHOD_CUSTOM));
|
|
|
|
evas_object_event_callback_add(ow, EVAS_CALLBACK_MOUSE_DOWN, _cb_bg_mouse_down, cfdata);
|
|
|
|
e_widget_table_object_append(cfdata->gui.o_table, ow, x++, 0, 1, 1, 1, 1, 1, 1);
|
|
|
|
}
|
2012-07-05 05:33:33 -07:00
|
|
|
_cb_method_change(cfdata, NULL, NULL);
|
|
|
|
e_widget_list_object_append(ol, cfdata->gui.o_table, 1, 1, 0.5);
|
2010-06-05 07:15:18 -07:00
|
|
|
e_widget_toolbook_page_append(otb, NULL, _("Wallpaper"), ol,
|
|
|
|
1, 0, 1, 0, 0.5, 0.0);
|
2010-07-27 18:50:35 -07:00
|
|
|
|
2010-06-05 07:15:18 -07:00
|
|
|
e_widget_toolbook_page_show(otb, 0);
|
2007-03-01 13:12:46 -08:00
|
|
|
|
2010-07-27 18:50:35 -07:00
|
|
|
return otb;
|
2007-03-01 13:12:46 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2010-08-19 11:21:13 -07:00
|
|
|
_basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
2007-03-01 13:12:46 -08:00
|
|
|
{
|
2012-10-03 02:00:12 -07:00
|
|
|
const Eina_List *l;
|
2012-07-05 05:33:33 -07:00
|
|
|
E_Config_Desklock_Background *cbg;
|
|
|
|
|
2013-10-26 01:59:32 -07:00
|
|
|
e_config->desklock_auth_method = cfdata->desklock_auth_method;
|
|
|
|
if (e_config->desklock_auth_method == E_DESKLOCK_AUTH_METHOD_PERSONAL)
|
|
|
|
{
|
|
|
|
e_config->desklock_passwd =
|
2014-09-05 12:04:10 -07:00
|
|
|
e_auth_hash_djb2(cfdata->desklock_personal_passwd,
|
2013-10-26 01:59:32 -07:00
|
|
|
strlen(cfdata->desklock_personal_passwd));
|
|
|
|
}
|
2013-10-26 10:02:20 -07:00
|
|
|
else if (cfdata->desklock_auth_method == E_DESKLOCK_AUTH_METHOD_PIN)
|
|
|
|
{
|
|
|
|
if (cfdata->pin_str && cfdata->pin_str[0])
|
|
|
|
{
|
|
|
|
int test;
|
|
|
|
char *pp;
|
|
|
|
|
|
|
|
errno = 0;
|
|
|
|
test = strtol(cfdata->pin_str, &pp, 10);
|
|
|
|
if (errno) return 0; //NAN
|
|
|
|
if (pp && pp[0]) return 0;
|
|
|
|
if (test < 1) return 0;
|
2014-09-05 12:04:10 -07:00
|
|
|
e_config->desklock_pin = e_auth_hash_djb2(cfdata->pin_str, strlen(cfdata->pin_str));
|
2013-10-26 10:02:20 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
/* dumb, but let them do what they want... */
|
|
|
|
e_config->desklock_pin = 0;
|
|
|
|
}
|
2008-11-13 12:39:13 -08:00
|
|
|
e_config->desklock_start_locked = cfdata->start_locked;
|
2010-05-31 08:17:02 -07:00
|
|
|
e_config->desklock_on_suspend = cfdata->lock_on_suspend;
|
2007-03-01 13:12:46 -08:00
|
|
|
e_config->desklock_autolock_idle = cfdata->auto_lock;
|
2010-06-05 07:15:18 -07:00
|
|
|
e_config->desklock_post_screensaver_time = cfdata->post_screensaver_time;
|
2007-03-01 13:12:46 -08:00
|
|
|
e_config->desklock_autolock_screensaver = cfdata->screensaver_lock;
|
2010-07-27 18:50:35 -07:00
|
|
|
e_config->desklock_autolock_idle_timeout = (cfdata->idle_time * 60);
|
2009-04-26 19:54:43 -07:00
|
|
|
e_config->desklock_ask_presentation = cfdata->ask_presentation;
|
2012-10-02 07:04:04 -07:00
|
|
|
e_config->desklock_ask_presentation_timeout = cfdata->ask_presentation_timeout;
|
2012-10-03 02:00:12 -07:00
|
|
|
if (e_config->xkb.desklock_layout != cfdata->desklock_layout)
|
|
|
|
{
|
|
|
|
e_config->xkb.desklock_layout = eina_stringshare_ref(cfdata->desklock_layout);
|
|
|
|
if (cfdata->desklock_layout)
|
|
|
|
{
|
|
|
|
E_Ilist_Item *ili;
|
|
|
|
|
|
|
|
EINA_LIST_FOREACH(e_widget_ilist_items_get(cfdata->gui.kbd_list), l, ili)
|
|
|
|
{
|
|
|
|
if (ili->selected)
|
|
|
|
edje_object_signal_emit(ili->o_end, "e,state,checked", "e");
|
|
|
|
else
|
|
|
|
edje_object_signal_emit(ili->o_end, "e,state,unchecked", "e");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-03-01 13:12:46 -08:00
|
|
|
|
2012-07-05 05:33:33 -07:00
|
|
|
if (cfdata->bgs)
|
2006-05-31 21:09:33 -07:00
|
|
|
{
|
2012-07-05 05:33:33 -07:00
|
|
|
EINA_LIST_FREE(e_config->desklock_backgrounds, cbg)
|
|
|
|
{
|
|
|
|
e_filereg_deregister(cbg->file);
|
|
|
|
eina_stringshare_del(cbg->file);
|
|
|
|
free(cbg);
|
|
|
|
}
|
2014-02-20 11:54:29 -08:00
|
|
|
EINA_LIST_FOREACH(cfdata->bgs, l, cbg)
|
2012-07-05 05:33:33 -07:00
|
|
|
{
|
2014-02-20 11:54:29 -08:00
|
|
|
e_config->desklock_backgrounds = eina_list_append(e_config->desklock_backgrounds, desklock_bg_dup(cbg, NULL));
|
|
|
|
e_filereg_register(cbg->file);
|
2012-07-05 05:33:33 -07:00
|
|
|
}
|
2006-05-31 21:09:33 -07:00
|
|
|
}
|
2006-08-12 06:25:29 -07:00
|
|
|
|
2008-10-19 23:50:57 -07:00
|
|
|
if (cfdata->login_zone < 0)
|
2010-07-27 18:50:35 -07:00
|
|
|
e_config->desklock_login_box_zone = cfdata->login_zone;
|
2008-10-19 23:50:57 -07:00
|
|
|
else
|
|
|
|
e_config->desklock_login_box_zone = cfdata->zone;
|
2007-03-17 03:15:56 -07:00
|
|
|
|
2009-04-27 18:49:17 -07:00
|
|
|
if (cfdata->custom_lock_cmd)
|
2012-07-05 01:01:29 -07:00
|
|
|
eina_stringshare_replace(&e_config->desklock_custom_desklock_cmd,
|
2010-07-27 18:50:35 -07:00
|
|
|
cfdata->custom_lock_cmd);
|
2009-04-27 18:49:17 -07:00
|
|
|
|
2012-07-09 05:36:08 -07:00
|
|
|
cfdata->bg_method_prev = cfdata->bg_method;
|
2007-03-01 13:12:46 -08:00
|
|
|
e_config_save_queue();
|
|
|
|
return 1;
|
|
|
|
}
|
2007-02-13 08:33:35 -08:00
|
|
|
|
2009-04-19 01:30:21 -07:00
|
|
|
static int
|
2010-08-19 11:21:13 -07:00
|
|
|
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
2009-04-19 01:30:21 -07:00
|
|
|
{
|
2012-07-05 05:33:33 -07:00
|
|
|
Eina_List *l, *ll;
|
|
|
|
E_Config_Desklock_Background *cbg;
|
2012-10-02 07:04:04 -07:00
|
|
|
|
2012-10-03 02:00:12 -07:00
|
|
|
if (e_config->xkb.desklock_layout != cfdata->desklock_layout)
|
2012-10-02 07:04:04 -07:00
|
|
|
return 1;
|
|
|
|
|
2010-06-05 07:15:18 -07:00
|
|
|
if (e_config->desklock_start_locked != cfdata->start_locked)
|
|
|
|
return 1;
|
|
|
|
|
2010-08-30 10:19:03 -07:00
|
|
|
if (e_config->desklock_on_suspend != cfdata->lock_on_suspend)
|
|
|
|
return 1;
|
|
|
|
|
2010-06-05 07:15:18 -07:00
|
|
|
if (e_config->desklock_autolock_idle != cfdata->auto_lock)
|
|
|
|
return 1;
|
|
|
|
|
2013-10-26 01:59:32 -07:00
|
|
|
if (e_config->desklock_auth_method != cfdata->desklock_auth_method)
|
|
|
|
return 1;
|
|
|
|
if (e_config->desklock_auth_method == E_DESKLOCK_AUTH_METHOD_PERSONAL)
|
|
|
|
{
|
|
|
|
if (e_config->desklock_passwd !=
|
2014-09-05 12:04:10 -07:00
|
|
|
e_auth_hash_djb2(cfdata->desklock_personal_passwd,
|
2013-10-26 01:59:32 -07:00
|
|
|
strlen(cfdata->desklock_personal_passwd)))
|
|
|
|
return 1;
|
|
|
|
}
|
2013-10-26 10:02:20 -07:00
|
|
|
if (e_config->desklock_auth_method == E_DESKLOCK_AUTH_METHOD_PIN)
|
|
|
|
{
|
|
|
|
if (e_config->desklock_pin !=
|
2014-09-05 12:04:10 -07:00
|
|
|
e_auth_hash_djb2(cfdata->pin_str,
|
2013-10-26 10:02:20 -07:00
|
|
|
strlen(cfdata->pin_str)))
|
|
|
|
return 1;
|
|
|
|
}
|
2013-10-26 01:59:32 -07:00
|
|
|
|
2010-06-05 07:15:18 -07:00
|
|
|
if (e_config->desklock_autolock_screensaver != cfdata->screensaver_lock)
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (e_config->desklock_post_screensaver_time !=
|
|
|
|
cfdata->post_screensaver_time)
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (e_config->desklock_autolock_idle_timeout != cfdata->idle_time * 60)
|
2009-04-19 01:30:21 -07:00
|
|
|
return 1;
|
|
|
|
|
2012-07-17 01:31:00 -07:00
|
|
|
if (cfdata->bg_method_prev != (int)cfdata->bg_method) return 1;
|
2012-07-05 05:33:33 -07:00
|
|
|
ll = cfdata->bgs;
|
|
|
|
EINA_LIST_FOREACH(e_config->desklock_backgrounds, l, cbg)
|
|
|
|
{
|
2014-02-20 11:54:29 -08:00
|
|
|
E_Config_Desklock_Background *cbg2 = eina_list_data_get(ll);
|
|
|
|
if (!cbg2) return 1;
|
|
|
|
if (cbg->file != cbg2->file) return 1;
|
|
|
|
if (cbg->hide_logo != cbg2->hide_logo) return 1;
|
|
|
|
ll = eina_list_next(ll);
|
2012-07-05 05:33:33 -07:00
|
|
|
}
|
2009-04-19 01:30:21 -07:00
|
|
|
|
|
|
|
if (cfdata->login_zone < 0)
|
|
|
|
{
|
2012-07-05 01:01:29 -07:00
|
|
|
if (e_config->desklock_login_box_zone != cfdata->login_zone)
|
|
|
|
return 1;
|
2009-04-19 01:30:21 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-07-05 01:01:29 -07:00
|
|
|
if (e_config->desklock_login_box_zone != cfdata->zone)
|
|
|
|
return 1;
|
2009-04-19 01:30:21 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
if (e_config->desklock_custom_desklock_cmd && cfdata->custom_lock_cmd)
|
|
|
|
{
|
2012-07-05 01:01:29 -07:00
|
|
|
if (strcmp(e_config->desklock_custom_desklock_cmd, cfdata->custom_lock_cmd) != 0)
|
|
|
|
return 1;
|
2009-04-19 01:30:21 -07:00
|
|
|
}
|
|
|
|
else if (e_config->desklock_custom_desklock_cmd != cfdata->custom_lock_cmd)
|
|
|
|
return 1;
|
|
|
|
|
2013-01-14 09:26:13 -08:00
|
|
|
return (e_config->desklock_ask_presentation != cfdata->ask_presentation) ||
|
2012-07-05 01:01:29 -07:00
|
|
|
(e_config->desklock_ask_presentation_timeout != cfdata->ask_presentation_timeout);
|
2009-04-19 01:30:21 -07:00
|
|
|
}
|
|
|
|
|
2009-04-27 18:49:17 -07:00
|
|
|
static void
|
2012-07-05 01:01:29 -07:00
|
|
|
_cb_method_change(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2007-03-01 13:12:46 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2012-07-05 05:33:33 -07:00
|
|
|
Eina_List *l;
|
|
|
|
Evas_Object *bg;
|
2010-08-19 11:21:13 -07:00
|
|
|
const char *theme = NULL;
|
2012-07-05 05:33:33 -07:00
|
|
|
int x;
|
2014-02-20 11:54:29 -08:00
|
|
|
E_Config_Desklock_Background *cbg;
|
2009-04-27 18:49:17 -07:00
|
|
|
|
2010-07-27 18:50:35 -07:00
|
|
|
if (!(cfdata = data)) return;
|
2012-07-05 05:33:33 -07:00
|
|
|
EINA_LIST_FOREACH(cfdata->gui.bgs, l, bg)
|
2012-07-16 06:25:17 -07:00
|
|
|
e_widget_disabled_set(bg,
|
|
|
|
(cfdata->bg_method < E_DESKLOCK_BACKGROUND_METHOD_CUSTOM));
|
2012-07-09 05:36:08 -07:00
|
|
|
|
2012-07-05 01:01:29 -07:00
|
|
|
switch (cfdata->bg_method)
|
2007-03-01 13:12:46 -08:00
|
|
|
{
|
2012-07-16 06:25:17 -07:00
|
|
|
case E_DESKLOCK_BACKGROUND_METHOD_THEME_DESKLOCK:
|
2014-02-20 11:54:29 -08:00
|
|
|
EINA_LIST_FREE(cfdata->bgs, cbg)
|
|
|
|
{
|
|
|
|
eina_stringshare_del(cbg->file);
|
|
|
|
free(cbg);
|
|
|
|
}
|
2012-07-05 05:33:33 -07:00
|
|
|
for (x = 0; x < cfdata->zone_count; x++)
|
2014-02-20 11:54:29 -08:00
|
|
|
cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(NULL, "theme_desklock_background"));
|
2012-07-05 01:01:29 -07:00
|
|
|
theme = e_theme_edje_file_get("base/theme/desklock",
|
2010-07-27 18:50:35 -07:00
|
|
|
"e/desklock/background");
|
|
|
|
if (theme)
|
2012-07-05 05:33:33 -07:00
|
|
|
EINA_LIST_FOREACH(cfdata->gui.bgs, l, bg)
|
|
|
|
e_widget_preview_edje_set(bg, theme, "e/desklock/background");
|
2012-07-05 01:01:29 -07:00
|
|
|
break;
|
|
|
|
|
2012-07-16 06:25:17 -07:00
|
|
|
case E_DESKLOCK_BACKGROUND_METHOD_THEME:
|
2012-07-05 01:01:29 -07:00
|
|
|
theme = e_theme_edje_file_get("base/theme/backgrounds",
|
2010-07-27 18:50:35 -07:00
|
|
|
"e/desktop/background");
|
|
|
|
if (theme)
|
2012-07-09 05:36:08 -07:00
|
|
|
{
|
|
|
|
EINA_LIST_FOREACH(cfdata->gui.bgs, l, bg)
|
|
|
|
e_widget_preview_edje_set(bg, theme, "e/desktop/background");
|
2014-02-20 11:54:29 -08:00
|
|
|
EINA_LIST_FREE(cfdata->bgs, cbg)
|
|
|
|
{
|
|
|
|
eina_stringshare_del(cbg->file);
|
|
|
|
free(cbg);
|
|
|
|
}
|
2012-07-09 05:36:08 -07:00
|
|
|
for (x = 0; x < cfdata->zone_count; x++)
|
2014-02-20 11:54:29 -08:00
|
|
|
cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(NULL, "theme_background"));
|
2012-07-09 05:36:08 -07:00
|
|
|
}
|
2012-07-05 01:01:29 -07:00
|
|
|
break;
|
|
|
|
|
2012-07-16 06:25:17 -07:00
|
|
|
case E_DESKLOCK_BACKGROUND_METHOD_WALLPAPER:
|
2012-07-09 05:36:08 -07:00
|
|
|
if (e_config->desktop_backgrounds)
|
2012-07-05 05:33:33 -07:00
|
|
|
{
|
2012-07-09 05:36:08 -07:00
|
|
|
E_Config_Desktop_Background *cdb;
|
2012-08-06 00:11:55 -07:00
|
|
|
int y = 0;
|
2012-07-09 05:50:05 -07:00
|
|
|
if (eina_str_has_extension(e_config->desktop_default_background, "edj"))
|
|
|
|
{
|
|
|
|
EINA_LIST_FOREACH(cfdata->gui.bgs, l, bg)
|
|
|
|
e_widget_preview_edje_set(bg, e_config->desktop_default_background, "e/desktop/background");
|
2014-02-20 11:54:29 -08:00
|
|
|
EINA_LIST_FREE(cfdata->bgs, cbg)
|
|
|
|
{
|
|
|
|
eina_stringshare_del(cbg->file);
|
|
|
|
free(cbg);
|
|
|
|
}
|
2012-08-06 00:11:55 -07:00
|
|
|
for (y = 0; y < cfdata->zone_count; y++)
|
2014-02-20 11:54:29 -08:00
|
|
|
cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(NULL, "user_background"));
|
2012-07-09 05:50:05 -07:00
|
|
|
}
|
|
|
|
/* attempt to set wallpaper from desktop 0,0 on each zone as a desklock bg */
|
2012-07-09 05:36:08 -07:00
|
|
|
EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cdb)
|
|
|
|
if ((!cdb->desk_x) && (!cdb->desk_y))
|
|
|
|
{
|
2014-02-20 11:54:29 -08:00
|
|
|
cbg = eina_list_nth(cfdata->bgs, cdb->zone);
|
|
|
|
if (cbg)
|
|
|
|
eina_stringshare_refplace(&cbg->file, cdb->file);
|
2012-07-09 05:36:08 -07:00
|
|
|
else
|
2014-02-20 11:54:29 -08:00
|
|
|
cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(NULL, cdb->file));
|
2012-07-09 05:36:08 -07:00
|
|
|
bg = eina_list_nth(cfdata->gui.bgs, cdb->zone);
|
|
|
|
if (bg)
|
|
|
|
e_widget_preview_edje_set(bg, cdb->file, "e/desktop/background");
|
|
|
|
}
|
2012-07-05 05:33:33 -07:00
|
|
|
}
|
2012-07-09 05:50:05 -07:00
|
|
|
else if (e_config->desktop_default_background && eina_str_has_extension(e_config->desktop_default_background, "edj"))
|
2010-07-27 18:50:35 -07:00
|
|
|
{
|
2012-07-09 05:50:05 -07:00
|
|
|
EINA_LIST_FOREACH(cfdata->gui.bgs, l, bg)
|
|
|
|
e_widget_preview_edje_set(bg, e_config->desktop_default_background, "e/desktop/background");
|
2014-02-20 11:54:29 -08:00
|
|
|
EINA_LIST_FREE(cfdata->bgs, cbg)
|
|
|
|
{
|
|
|
|
eina_stringshare_del(cbg->file);
|
|
|
|
free(cbg);
|
|
|
|
}
|
2012-07-09 05:50:05 -07:00
|
|
|
for (x = 0; x < cfdata->zone_count; x++)
|
2014-02-20 11:54:29 -08:00
|
|
|
cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(NULL, "user_background"));
|
2010-07-27 18:50:35 -07:00
|
|
|
}
|
2012-07-05 01:01:29 -07:00
|
|
|
break;
|
|
|
|
|
2012-07-16 06:25:17 -07:00
|
|
|
case E_DESKLOCK_BACKGROUND_METHOD_CUSTOM:
|
2012-07-05 05:33:33 -07:00
|
|
|
{
|
|
|
|
Eina_List *ll;
|
|
|
|
|
2014-02-20 11:54:29 -08:00
|
|
|
EINA_LIST_FREE(cfdata->bgs, cbg)
|
|
|
|
{
|
|
|
|
eina_stringshare_del(cbg->file);
|
|
|
|
free(cbg);
|
|
|
|
}
|
2012-07-05 05:33:33 -07:00
|
|
|
ll = cfdata->gui.bgs;
|
2012-07-09 05:36:08 -07:00
|
|
|
EINA_LIST_FOREACH(e_config->desklock_backgrounds, l, cbg)
|
2012-07-05 05:33:33 -07:00
|
|
|
{
|
|
|
|
if (!ll) break;
|
2014-12-11 09:24:16 -08:00
|
|
|
evas_object_data_set(ll->data, "hide_logo", (void*)(long)cbg->hide_logo);
|
2012-07-09 05:36:08 -07:00
|
|
|
e_widget_preview_edje_set(ll->data, cbg->file, "e/desktop/background");
|
2014-02-20 11:54:29 -08:00
|
|
|
cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(cbg, NULL));
|
2012-07-05 05:33:33 -07:00
|
|
|
ll = ll->next;
|
|
|
|
}
|
|
|
|
}
|
2010-07-27 18:50:35 -07:00
|
|
|
break;
|
2012-07-16 06:25:17 -07:00
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
2007-03-01 13:12:46 -08:00
|
|
|
}
|
|
|
|
}
|
2007-02-28 09:17:35 -08:00
|
|
|
|
2013-10-26 01:59:32 -07:00
|
|
|
static void
|
|
|
|
_login_method_change(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata = data;
|
|
|
|
|
|
|
|
e_widget_disabled_set(cfdata->passwd_entry,
|
|
|
|
(cfdata->desklock_auth_method != E_DESKLOCK_AUTH_METHOD_PERSONAL));
|
|
|
|
if (!e_widget_disabled_get(cfdata->passwd_entry))
|
|
|
|
{
|
|
|
|
e_widget_entry_select_all(cfdata->passwd_entry);
|
|
|
|
e_widget_focus_set(cfdata->passwd_entry, 1);
|
|
|
|
}
|
2013-10-26 10:02:20 -07:00
|
|
|
e_widget_disabled_set(cfdata->pin_entry,
|
|
|
|
(cfdata->desklock_auth_method != E_DESKLOCK_AUTH_METHOD_PIN));
|
|
|
|
if (!e_widget_disabled_get(cfdata->pin_entry))
|
|
|
|
{
|
|
|
|
e_widget_entry_select_all(cfdata->pin_entry);
|
|
|
|
e_widget_focus_set(cfdata->pin_entry, 1);
|
|
|
|
}
|
2013-10-26 01:59:32 -07:00
|
|
|
e_widget_disabled_set(cfdata->lock_cmd_entry,
|
|
|
|
(cfdata->desklock_auth_method != E_DESKLOCK_AUTH_METHOD_EXTERNAL));
|
|
|
|
if (!e_widget_disabled_get(cfdata->lock_cmd_entry))
|
|
|
|
{
|
|
|
|
e_widget_entry_select_all(cfdata->lock_cmd_entry);
|
|
|
|
e_widget_focus_set(cfdata->lock_cmd_entry, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-04-27 18:49:17 -07:00
|
|
|
static void
|
2010-08-19 11:21:13 -07:00
|
|
|
_cb_login_change(void *data, Evas_Object *obj __UNUSED__)
|
2007-03-01 13:12:46 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2009-04-27 18:49:17 -07:00
|
|
|
|
2010-07-27 18:50:35 -07:00
|
|
|
if (!(cfdata = data)) return;
|
|
|
|
e_widget_disabled_set(cfdata->gui.loginbox_slider, (cfdata->login_zone < 0));
|
2007-03-01 13:12:46 -08:00
|
|
|
}
|
2007-02-28 09:17:35 -08:00
|
|
|
|
2010-07-27 18:50:35 -07:00
|
|
|
static int
|
|
|
|
_zone_count_get(void)
|
2006-03-02 16:02:32 -08:00
|
|
|
{
|
2010-07-27 18:50:35 -07:00
|
|
|
int num = 0;
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
const Eina_List *l;
|
|
|
|
E_Comp *comp;
|
2010-07-27 18:50:35 -07:00
|
|
|
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
EINA_LIST_FOREACH(e_comp_list(), l, comp)
|
|
|
|
num += eina_list_count(comp->zones);
|
2010-07-27 18:50:35 -07:00
|
|
|
return num;
|
2006-03-02 16:02:32 -08:00
|
|
|
}
|
|
|
|
|
2012-07-05 01:01:29 -07:00
|
|
|
static void
|
|
|
|
_cb_bg_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event __UNUSED__)
|
2006-03-02 16:02:32 -08:00
|
|
|
{
|
2006-05-31 21:09:33 -07:00
|
|
|
E_Config_Dialog_Data *cfdata;
|
2009-04-13 07:56:38 -07:00
|
|
|
|
2010-07-27 18:50:35 -07:00
|
|
|
if (e_widget_disabled_get(obj)) return;
|
|
|
|
if (!(cfdata = data)) return;
|
2012-07-05 01:01:29 -07:00
|
|
|
if (cfdata->bg_fsel)
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_raise(cfdata->bg_fsel->dia->win);
|
2009-04-27 18:49:17 -07:00
|
|
|
else
|
2012-07-05 05:33:33 -07:00
|
|
|
cfdata->bg_fsel = e_int_config_desklock_fsel(cfdata->cfd, obj);
|
2006-03-02 16:02:32 -08:00
|
|
|
}
|
2009-04-10 14:17:58 -07:00
|
|
|
|