Compare commits

..

2 Commits

Author SHA1 Message Date
kikadf 6f403f4930 Merge branch 'master' into master 2022-10-24 05:06:38 -07:00
kikadf d712789c9a Use default way to locale listing on OpenBSD
Listing /usr/share/locale doesn't work, and
already OpenBSD has support for locale.
2022-09-29 14:41:43 +02:00
126 changed files with 366577 additions and 381057 deletions

View File

@ -1,6 +1,6 @@
Copyright notice for Enlightenment:
Copyright (C) 2000-2024 Carsten Haitzler and various contributors (see AUTHORS)
Copyright (C) 2000-2020 Carsten Haitzler and various contributors (see AUTHORS)
All rights reserved.

View File

@ -58,8 +58,7 @@ group "E_Config" struct {
value "winlist_mode" int: 1;
value "winlist_large_size" double: 0.6666;
value "winlist_list_size" double: 0.3333;
value "winlist_list_no_miniatures" uchar: 0;
value "no_state_hidden_desktop" uchar: 0;
value "winlist_list_no_miniatures" int: 0;
value "maximize_policy" int: 49;
value "allow_manip" int: 0;
value "border_fix_on_shelf_toggle" int: 0;
@ -140,8 +139,6 @@ group "E_Config" struct {
value "clientlist_max_caption_len" int: 2;
value "mouse_hand" int: 1;
value "mouse_accel" double: 0.0;
value "mouse_flat_accel" uchar: 0;
value "mouse_hires_scroll" uchar: 1;
value "mouse_accel_threshold" int: 4;
value "mouse_natural_scroll" uchar: 0;
value "mouse_emulate_middle_button" uchar: 1;
@ -149,7 +146,6 @@ group "E_Config" struct {
value "touch_natural_scroll" uchar: 0;
value "touch_emulate_middle_button" uchar: 1;
value "touch_tap_to_click" uchar: 0;
value "touch_flat_accel" uchar: 0;
value "touch_clickpad" uchar: 1;
value "touch_scrolling_2finger" uchar: 1;
value "touch_scrolling_edge" uchar: 0;

View File

@ -54,8 +54,7 @@ group "E_Config" struct {
value "winlist_mode" int: 1;
value "winlist_large_size" double: 0.6666;
value "winlist_list_size" double: 0.3333;
value "winlist_list_no_miniatures" uchar: 0;
value "no_state_hidden_desktop" uchar: 0;
value "winlist_list_no_miniatures" int: 0;
value "maximize_policy" int: 50;
value "allow_manip" int: 0;
value "border_fix_on_shelf_toggle" int: 0;
@ -138,8 +137,6 @@ group "E_Config" struct {
value "clientlist_max_caption_len" int: 2;
value "mouse_hand" int: 1;
value "mouse_accel" double: 0.0;
value "mouse_flat_accel" uchar: 0;
value "mouse_hires_scroll" uchar: 1;
value "mouse_accel_threshold" int: 4;
value "mouse_natural_scroll" uchar: 0;
value "mouse_emulate_middle_button" uchar: 1;
@ -147,7 +144,6 @@ group "E_Config" struct {
value "touch_natural_scroll" uchar: 0;
value "touch_emulate_middle_button" uchar: 1;
value "touch_tap_to_click" uchar: 0;
value "touch_flat_accel" uchar: 0;
value "touch_clickpad" uchar: 1;
value "touch_scrolling_2finger" uchar: 1;
value "touch_scrolling_edge" uchar: 0;

View File

@ -54,8 +54,7 @@ group "E_Config" struct {
value "winlist_mode" int: 1;
value "winlist_large_size" double: 0.6666;
value "winlist_list_size" double: 0.3333;
value "winlist_list_no_miniatures" uchar: 0;
value "no_state_hidden_desktop" uchar: 0;
value "winlist_list_no_miniatures" int: 0;
value "maximize_policy" int: 50;
value "allow_manip" int: 0;
value "border_fix_on_shelf_toggle" int: 0;
@ -139,15 +138,12 @@ group "E_Config" struct {
value "mouse_hand" int: 1;
value "mouse_accel" double: 0.0;
value "mouse_accel_threshold" int: 4;
value "mouse_flat_accel" uchar: 0;
value "mouse_hires_scroll" uchar: 1;
value "mouse_natural_scroll" uchar: 0;
value "mouse_emulate_middle_button" uchar: 1;
value "touch_accel" double: 0.0;
value "touch_natural_scroll" uchar: 0;
value "touch_emulate_middle_button" uchar: 1;
value "touch_tap_to_click" uchar: 0;
value "touch_flat_accel" uchar: 0;
value "touch_clickpad" uchar: 1;
value "touch_scrolling_2finger" uchar: 1;
value "touch_scrolling_edge" uchar: 0;

View File

@ -1,6 +1,6 @@
##### project
project('enlightenment', 'c',
version : '0.26.99',
version : '0.25.99',
license : 'BSD 2 clause',
default_options: [ 'buildtype=release', 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.47.0')
@ -30,7 +30,7 @@ else
config_h.set('E_RELEASE_BUILD' , '1')
endif
efl_version = '>= 1.27.0'
efl_version = '>= 1.26.0'
add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c')
dir_prefix = get_option('prefix')
@ -83,11 +83,6 @@ config_h.set('_POSIX_PTHREAD_SEMANTICS', '1')
config_h.set('_TANDEM_SOURCE' , '1')
config_h.set('__EXTENSIONS__' , '1')
str_ver_split = efl_version.replace('>= ', '').split('.')
config_h.set('MIN_EFL_VERSION_MAJ', str_ver_split[0])
config_h.set('MIN_EFL_VERSION_MIN', str_ver_split[1])
config_h.set('MIN_EFL_VERSION_MIC', str_ver_split[2])
subdir('po')
darwin = host_machine.system().startswith('darwin')

View File

@ -132,10 +132,6 @@ option('connman',
type: 'boolean',
value: true,
description: 'enable connman module: (default=true)')
option('convertible',
type: 'boolean',
value: true,
description: 'enable convertible module: (default=true)')
option('cpufreq',
type: 'boolean',
value: true,

View File

@ -18,7 +18,6 @@ hr
hu
it
ja
ka
km
ko
lt

19957
po/ar.po

File diff suppressed because it is too large Load Diff

20609
po/bg.po

File diff suppressed because it is too large Load Diff

19704
po/ca.po

File diff suppressed because it is too large Load Diff

19958
po/cs.po

File diff suppressed because it is too large Load Diff

19565
po/da.po

File diff suppressed because it is too large Load Diff

19677
po/de.po

File diff suppressed because it is too large Load Diff

20018
po/el.po

File diff suppressed because it is too large Load Diff

19598
po/eo.po

File diff suppressed because it is too large Load Diff

20430
po/es.po

File diff suppressed because it is too large Load Diff

21114
po/et.po

File diff suppressed because it is too large Load Diff

19564
po/fi.po

File diff suppressed because it is too large Load Diff

18744
po/fo.po

File diff suppressed because it is too large Load Diff

2189
po/fr.po

File diff suppressed because it is too large Load Diff

20838
po/fr_CH.po

File diff suppressed because it is too large Load Diff

19732
po/gl.po

File diff suppressed because it is too large Load Diff

20840
po/he.po

File diff suppressed because it is too large Load Diff

20580
po/hr.po

File diff suppressed because it is too large Load Diff

19731
po/hu.po

File diff suppressed because it is too large Load Diff

811
po/it.po

File diff suppressed because it is too large Load Diff

20755
po/ja.po

File diff suppressed because it is too large Load Diff

16681
po/ka.po

File diff suppressed because it is too large Load Diff

18547
po/km.po

File diff suppressed because it is too large Load Diff

19871
po/ko.po

File diff suppressed because it is too large Load Diff

19101
po/lt.po

File diff suppressed because it is too large Load Diff

21146
po/ms.po

File diff suppressed because it is too large Load Diff

20578
po/nb.po

File diff suppressed because it is too large Load Diff

2199
po/nl.po

File diff suppressed because it is too large Load Diff

21066
po/pl.po

File diff suppressed because it is too large Load Diff

908
po/pt.po

File diff suppressed because it is too large Load Diff

19937
po/pt_BR.po

File diff suppressed because it is too large Load Diff

20916
po/ro.po

File diff suppressed because it is too large Load Diff

19753
po/ru.po

File diff suppressed because it is too large Load Diff

20717
po/sk.po

File diff suppressed because it is too large Load Diff

19653
po/sl.po

File diff suppressed because it is too large Load Diff

19695
po/sr.po

File diff suppressed because it is too large Load Diff

20713
po/sv.po

File diff suppressed because it is too large Load Diff

19725
po/tr.po

File diff suppressed because it is too large Load Diff

20588
po/uk.po

File diff suppressed because it is too large Load Diff

19697
po/vi.po

File diff suppressed because it is too large Load Diff

19726
po/zh_CN.po

File diff suppressed because it is too large Load Diff

19125
po/zh_TW.po

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@ e_about_new(void)
snprintf
(buf, sizeof(buf), "%s%s",
_(
"<title>Copyright &copy; 2000-2024, by the Enlightenment "
"<title>Copyright &copy; 2000-2022, by the Enlightenment "
"Development Team</><ps/>"
"<ps/>"
"We hope you enjoy using this software as much as we enjoyed "

View File

@ -27,9 +27,6 @@ static Eina_Bool _e_bl_suspend = EINA_FALSE;
static void _backlight_devices_device_set(Backlight_Device *bd, double val);
static void _backlight_devices_device_update(Backlight_Device *bd);
#define MAX_BL_DIFF 0.15
#define SET_RETRIES 5
static Eina_Bool
_backlight_retry_timer_cb(void *data)
{
@ -48,17 +45,17 @@ _backlight_mismatch_retry(Backlight_Device *bd)
((fabs(bd->expected_val - 1.0) < DBL_EPSILON) ||
(fabs(bd->expected_val - e_config->backlight.normal) < DBL_EPSILON) ||
(fabs(bd->expected_val - e_config->backlight.dim) < DBL_EPSILON)) &&
// and the delta between expected and val >= MAX_BL_DIFF
(fabs(bd->expected_val - bd->val) >= MAX_BL_DIFF) &&
// and we retried < SET_RETRIES times
(bd->retries < SET_RETRIES) &&
// and the delta between expected and val >= 0.05
(fabs(bd->expected_val - bd->val) >= 0.05) &&
// and we retried < 20 times
(bd->retries < 10) &&
(_own_vt))
{ // try again
printf("RETRY backlight set as %1.2f != %1.2f (expected) try=%i\n",
bd->val, bd->expected_val, bd->retries);
bd->retries++;
if (bd->retry_timer) ecore_timer_del(bd->retry_timer);
bd->retry_timer = ecore_timer_add(0.3, _backlight_retry_timer_cb, bd);
bd->retry_timer = ecore_timer_add(0.1, _backlight_retry_timer_cb, bd);
} // or give up
else bd->retries = 0;
}
@ -76,10 +73,10 @@ _backlight_system_get_cb(void *data, const char *params)
if (!!strcmp(bd->dev, dev)) return;
e_system_handler_del("bklight-val", _backlight_system_get_cb, bd);
fval = (double)val / 1000.0;
if (fabs(fval - bd->val) >= MAX_BL_DIFF)
if (fabs(fval - bd->val) >= DBL_EPSILON)
{
// bd->val = fval;
// ecore_event_add(E_EVENT_BACKLIGHT_CHANGE, NULL, NULL, NULL);
bd->val = fval;
ecore_event_add(E_EVENT_BACKLIGHT_CHANGE, NULL, NULL, NULL);
_backlight_mismatch_retry(bd);
}
}
@ -100,10 +97,10 @@ _backlight_system_ddc_get_cb(void *data, const char *params)
if (val < 0) fval = -1.0;
else fval = (double)val / 100.0;
bd->ddc_max = max;
if ((fabs(fval - bd->val) >= MAX_BL_DIFF) || (val == -1))
if ((fabs(fval - bd->val) >= DBL_EPSILON) || (val == -1))
{
// bd->val = fval;
// ecore_event_add(E_EVENT_BACKLIGHT_CHANGE, NULL, NULL, NULL);
bd->val = fval;
ecore_event_add(E_EVENT_BACKLIGHT_CHANGE, NULL, NULL, NULL);
_backlight_mismatch_retry(bd);
}
}
@ -794,7 +791,7 @@ e_backlight_level_set(E_Zone *zone, double val, double tim)
if (fabs(tim) < DBL_EPSILON)
{
_backlight_devices_device_set(bd, val);
// _backlight_devices_device_update(bd);
_backlight_devices_device_update(bd);
ecore_event_add(E_EVENT_BACKLIGHT_CHANGE, NULL, NULL, NULL);
return;
}

View File

@ -2298,29 +2298,6 @@ _e_client_eval(E_Client *ec)
}
}
}
if (!ec->desktop && ec->icccm.class)
{
const char *p = strchr(ec->icccm.class, ' ');
if (p)
{
char *sp, *dup = strdup(ec->icccm.class);
if (dup)
{
for (sp = dup; *dup; sp++)
{
if (*sp == ' ')
{
*sp = 0;
break;
}
}
ec->desktop = efreet_util_desktop_exec_find(dup);
free(dup);
}
}
}
if (!ec->desktop && ec->icccm.name)
{
/* this works for most cases as fallback. useful when app is

View File

@ -2881,7 +2881,7 @@ disp_err:
}
static Eina_Bool
_e_comp_wl_desklock_show(Eina_Bool immediate EINA_UNUSED)
_e_comp_wl_desklock_show(void)
{
return e_comp_grab_input(1, 1);
}

View File

@ -77,7 +77,6 @@ static int screen_size_index = -1;
static Ecore_X_Atom backlight_atom = 0;
static Ecore_Timer *mouse_in_fix_check_timer = NULL;
static Ecore_Timer *_e_comp_x_blank_apply_timer = NULL;
static Eina_Hash *dead_wins;
@ -5326,7 +5325,6 @@ _e_comp_cb_pointer_suspend_resume_done(void *data, Evas_Object *obj, const char
e_pointer_grab_set(e_comp->pointer, EINA_FALSE);
}
e_screensaver_update();
e_dpms_force_update();
}
EINTERN Eina_Bool
@ -5381,7 +5379,6 @@ _e_comp_x_screensaver_off()
const char *s;
e_screensaver_update();
e_dpms_force_update();
_e_comp_pointer_ungrab();
e_pointer_grab_set(e_comp->pointer, EINA_FALSE);
if ((!e_comp->pointer) || (!e_comp->pointer->o_ptr)) return ECORE_CALLBACK_RENEW;
@ -5827,7 +5824,7 @@ _e_comp_x_desklock_hide(void)
}
static Eina_Bool
_e_comp_x_desklock_show(Eina_Bool immedate EINA_UNUSED)
_e_comp_x_desklock_show(void)
{
if (!e_comp_grab_input(1, 1))
{
@ -6034,13 +6031,6 @@ _e_comp_x_screens_setup(void)
return EINA_FALSE;
}
static Eina_Bool
_e_comp_x_blank_apply(void *data EINA_UNUSED)
{
e_screensaver_force_update();
return EINA_TRUE;
}
E_API Eina_Bool
e_comp_x_init(void)
{
@ -6208,8 +6198,6 @@ e_comp_x_init(void)
e_config->screensaver_blanking,
e_config->screensaver_expose);
e_comp_x_devices_config_apply(EINA_FALSE);
_e_comp_x_blank_apply_timer = ecore_timer_add
(10.0, _e_comp_x_blank_apply, NULL);
}
else
e_dnd_init();
@ -6220,11 +6208,6 @@ e_comp_x_init(void)
E_API void
e_comp_x_shutdown(void)
{
if (_e_comp_x_blank_apply_timer)
{
ecore_timer_del(_e_comp_x_blank_apply_timer);
_e_comp_x_blank_apply_timer = NULL;
}
_e_comp_x_del(e_comp);
E_FREE_LIST(handlers, ecore_event_handler_del);
E_FREE_FUNC(clients_win_hash, eina_hash_free);

View File

@ -144,44 +144,11 @@ _handle_dev_prop(int dev_slot, const char *dev, const char *prop, Device_Flags d
}
free(val);
}
else if (!strcmp(prop, "libinput Accel Profile Enabled"))
{
// 1 bool, 0 = adaptive, 1 = flat
unsigned char cfval = 0;
unsigned char *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if (dev_flags == DEVICE_FLAG_TOUCHPAD)
cfval = e_config->touch_flat_accel;
else
cfval = e_config->mouse_flat_accel;
if ((val) && (size == 8) && (num == 2) && (((cfval == 1) && (val[0] == 1)) ||
((cfval == 0) && (val[0] == 0))))
{
// Does a little flip-flop for each variable
val[0] = !cfval;
val[1] = cfval;
printf("DEV: change [%s] [%s] -> %i, %i\n", dev, prop, val[0], val[1]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
}
free(val);
}
else if (!strcmp(prop, "libinput High Resolution Wheel Scroll Enabled"))
{
unsigned char cfval = e_config->mouse_hires_scroll;
unsigned char *val = ecore_x_input_device_property_get
(dev_slot, prop, &num, &fmt, &size);
if ((val) && (size == 8) && (num == 1) && (cfval != val[0]))
{
val[0] = cfval;
printf("DEV: change [%s] [%s] -> %i\n", dev, prop, val[0]);
ecore_x_input_device_property_set
(dev_slot, prop, val, num, fmt, size);
}
free(val);
}
// not for now - default
// else if (!strcmp(prop, "libinput Accel Profile Enabled"))
// {
// // 1 bool, 0 = adaptive, 1 = flat
// }
// do via button mapping for now - not sure about this evdev can't do this
// else if (!strcmp(prop, "libinput Left Handed Enabled"))
// {

View File

@ -20,7 +20,6 @@ static Eina_Bool _rotation_exists(int rot, Ecore_X_Randr_Crtc_Info *info);
static Ecore_X_Randr_Mode _mode_screen_find(Ecore_X_Window root, E_Randr2_Screen *s, Ecore_X_Randr_Output out);
static Eina_List *handlers;
static int use_xrandr = -1;
E_Comp_Screen_Iface xiface =
{
@ -502,168 +501,9 @@ e_comp_x_randr_shutdown(void)
E_FREE_LIST(handlers, ecore_event_handler_del);
}
static void
_e_comp_xrandr_cmd(void)
E_API void
e_comp_x_randr_config_apply(void)
{
Eina_List *l;
E_Randr2_Screen *s;
Ecore_X_Window root = ecore_x_window_root_first_get();
int top_priority = 0;
Ecore_X_Randr_Crtc *crtcs = NULL;
Ecore_X_Randr_Output *outputs = NULL, out, *outconf;
E_Randr2_Screen **screenconf;
Ecore_X_Randr_Crtc_Info *info;
int crtcs_num = 0, outputs_num = 0, i, numout;
crtcs = ecore_x_randr_crtcs_get(root, &crtcs_num);
outputs = ecore_x_randr_outputs_get(root, &outputs_num);
printf("RRR: crtcs=%p outputs=%p\n", crtcs, outputs);
if ((crtcs) && (outputs))
{
outconf = alloca(outputs_num * sizeof(Ecore_X_Randr_Output));
screenconf = alloca(outputs_num * sizeof(E_Randr2_Screen *));
memset(outconf, 0, outputs_num * sizeof(Ecore_X_Randr_Output));
memset(screenconf, 0, outputs_num * sizeof(E_Randr2_Screen *));
// decide which outputs get which crtcs
EINA_LIST_FOREACH(e_randr2->screens, l, s)
{
printf("RRR: find output for '%s'\n", s->info.name);
// XXX: find clones and set them as outputs in an array
if ((s->config.configured) &&
(_output_name_find(root, s->info.name, outputs,
outputs_num, &out)))
{
printf("RRR: enabled: %i\n", s->config.enabled);
if (s->config.enabled)
{
if (s->config.priority > top_priority)
top_priority = s->config.priority;
for (i = 0; i < outputs_num; i++)
{
if (!screenconf[i])
{
Ecore_X_Randr_Crtc crtc =
ecore_x_randr_output_crtc_get(root,
outputs[i]);
info = NULL;
printf("RRR: crtc slot empty: %i, crtc=%i, output=%i\n", i, crtc, outputs[i]);
if (crtc)
info = ecore_x_randr_crtc_info_get(root,
crtc);
printf("RRR: crtc info = %p\n", info);
if (info)
{
printf("RRR: output exists=%i rot exists=%i\n",
_output_exists(out, info), _rotation_exists(s->config.rotation, info));
if (_output_exists(out, info) &&
_rotation_exists(s->config.rotation,
info))
{
printf("RRR: assign slot out: %x\n", out);
outconf[i] = out;
screenconf[i] = s;
}
ecore_x_randr_crtc_info_free(info);
}
if (!screenconf[i])
{
printf("RRR: assign slot off\n");
outconf[i] = 0;
screenconf[i] = s;
}
break;
}
}
}
else
{
for (i = 0; i < outputs_num; i++)
{
if (!screenconf[i])
{
printf("RRR: assign slot off 2\n");
outconf[i] = 0;
screenconf[i] = s;
break;
}
}
}
}
}
numout = 0;
for (i = 0; i < outputs_num; i++)
{
if (screenconf[i]) numout++;
}
if (numout)
{
Eina_Strbuf *sb;
E_Randr2_Screen *sc;
sb = eina_strbuf_new();
eina_strbuf_append(sb, "xrandr ");
// set up a crtc to drive each output (or not)
for (i = 0; i < numout; i++)
{
sc = screenconf[i];
if (!sc) continue;
if (!sc->info.name) continue;
eina_strbuf_append_printf(sb, "--output '%s' ",
sc->info.name);
// XXX: find clones and set them as outputs in an array
if (outconf[i])
{
eina_strbuf_append_printf(sb, "--mode %ix%i ",
sc->config.mode.w,
sc->config.mode.h);
eina_strbuf_append_printf(sb, "--refresh %i.%02i ",
(int)sc->config.mode.refresh,
(int)((sc->config.mode.refresh - (int)sc->config.mode.refresh) * 100));
eina_strbuf_append_printf(sb, "--rotate ");
if (screenconf[i]->config.rotation == 0)
eina_strbuf_append_printf(sb, "normal ");
else if (screenconf[i]->config.rotation == 90)
eina_strbuf_append_printf(sb, "left ");
else if (screenconf[i]->config.rotation == 180)
eina_strbuf_append_printf(sb, "inverted ");
else if (screenconf[i]->config.rotation == 270)
eina_strbuf_append_printf(sb, "right ");
eina_strbuf_append_printf(sb, "--pos %ix%i ",
sc->config.geom.x,
sc->config.geom.y);
if (screenconf[i]->config.priority == top_priority)
{
eina_strbuf_append_printf(sb, "--primary ");
top_priority = -1;
}
}
else
{
printf("RRR: crtc off: %i\n", i);
eina_strbuf_append_printf(sb, "--off ");
}
}
printf("RRR: XRANDR: %s\n", eina_strbuf_string_get(sb));
ecore_exe_run(eina_strbuf_string_get(sb), NULL);
eina_strbuf_free(sb);
}
else
{
printf("RRR: EERRRRRROOOORRRRRRR no outputs to configure!\n");
ecore_timer_add(5.0, _cb_no_outputs_timer, NULL);
ecore_x_root_screen_barriers_set(NULL, 0);
}
}
free(outputs);
free(crtcs);
}
static void
_e_comp_xrandr_ecore_x(void)
{
Eina_List *l;
E_Randr2_Screen *s;
Ecore_X_Window root = ecore_x_window_root_first_get();
@ -708,13 +548,12 @@ _e_comp_xrandr_ecore_x(void)
crtcs = ecore_x_randr_crtcs_get(root, &crtcs_num);
outputs = ecore_x_randr_outputs_get(root, &outputs_num);
printf("RRR: crtcs=%p outputs=%p\n", crtcs, outputs);
if ((crtcs) && (outputs))
{
outconf = alloca(outputs_num * sizeof(Ecore_X_Randr_Output));
screenconf = alloca(outputs_num * sizeof(E_Randr2_Screen *));
memset(outconf, 0, outputs_num * sizeof(Ecore_X_Randr_Output));
memset(screenconf, 0, outputs_num * sizeof(E_Randr2_Screen *));
outconf = alloca(crtcs_num * sizeof(Ecore_X_Randr_Output));
screenconf = alloca(crtcs_num * sizeof(E_Randr2_Screen *));
memset(outconf, 0, crtcs_num * sizeof(Ecore_X_Randr_Output));
memset(screenconf, 0, crtcs_num * sizeof(E_Randr2_Screen *));
// decide which outputs get which crtcs
EINA_LIST_FOREACH(e_randr2->screens, l, s)
@ -730,7 +569,7 @@ _e_comp_xrandr_ecore_x(void)
{
if (s->config.priority > top_priority)
top_priority = s->config.priority;
for (i = 0; i < outputs_num; i++)
for (i = 0; i < crtcs_num; i++)
{
if (!outconf[i])
{
@ -757,18 +596,18 @@ _e_comp_xrandr_ecore_x(void)
}
}
numout = 0;
for (i = 0; i < outputs_num; i++)
for (i = 0; i < crtcs_num; i++)
{
if (outconf[i]) numout++;
}
if (numout)
{
Ecore_X_Rectangle *scrs = alloca(numout * sizeof(Ecore_X_Rectangle));
Ecore_X_Rectangle *scrs = alloca(crtcs_num * sizeof(Ecore_X_Rectangle));
int scrs_num;
scrs_num = 0;
// set up a crtc to drive each output (or not)
for (i = 0; i < numout; i++)
for (i = 0; i < crtcs_num; i++)
{
// XXX: find clones and set them as outputs in an array
if (outconf[i])
@ -798,7 +637,7 @@ _e_comp_xrandr_ecore_x(void)
screenconf[i]->config.geom.x,
screenconf[i]->config.geom.y,
mode, orient))
printf("RRR: failed to set crtc!!!!!!\n");
printf("RRR: failed to set crtc!!!!!!\n");
if (E_INSIDE(px, py,
screenconf[i]->config.geom.x,
screenconf[i]->config.geom.y,
@ -850,7 +689,7 @@ _e_comp_xrandr_ecore_x(void)
free(outputs);
free(crtcs);
printf("RRR: set vsize2: %ix%i\n", nw, nh);
printf("RRR: set vsize: %ix%i\n", nw, nh);
ecore_x_randr_screen_current_size_set(root, nw, nh, -1, -1);
{
int dww = 0, dhh = 0, dww2 = 0, dhh2 = 0;
@ -865,6 +704,7 @@ _e_comp_xrandr_ecore_x(void)
ecore_x_randr_screen_size_range_get(root, NULL, NULL, NULL, NULL);
ecore_x_ungrab();
ecore_x_sync();
// ignore the next batch of randr events - we caused them ourselves
// XXX: a problem. thew first time we configure the screen we may not
// get any events back to clear the ignore flag below, so only apply
@ -872,22 +712,6 @@ _e_comp_xrandr_ecore_x(void)
// event_ignore = EINA_TRUE;
}
E_API void
e_comp_x_randr_config_apply(void)
{
if (e_randr2_cfg->use_cmd)
{
if (use_xrandr == -1)
{
if (ecore_file_app_installed("xrandr")) use_xrandr = 1;
else use_xrandr = 0;
}
}
else use_xrandr = 0;
if (use_xrandr == 1) _e_comp_xrandr_cmd();
else _e_comp_xrandr_ecore_x();
}
E_API Eina_Bool
e_comp_x_randr_available(void)
{

View File

@ -750,7 +750,6 @@ _e_config_edd_init(Eina_Bool old)
E_CONFIG_VAL(D, T, winlist_list_size, DOUBLE); /**/
E_CONFIG_VAL(D, T, winlist_large_size, DOUBLE); /**/
E_CONFIG_VAL(D, T, winlist_list_no_miniatures, UCHAR); /**/
E_CONFIG_VAL(D, T, no_state_hidden_desktop, UCHAR); /**/
E_CONFIG_VAL(D, T, maximize_policy, INT); /**/
E_CONFIG_VAL(D, T, allow_manip, INT); /**/
E_CONFIG_VAL(D, T, border_fix_on_shelf_toggle, INT); /**/
@ -856,10 +855,8 @@ _e_config_edd_init(Eina_Bool old)
E_CONFIG_VAL(D, T, mouse_hand, INT);
E_CONFIG_VAL(D, T, mouse_accel, DOUBLE);
E_CONFIG_VAL(D, T, mouse_flat_accel, UCHAR);
E_CONFIG_VAL(D, T, mouse_accel_threshold, INT);
E_CONFIG_VAL(D, T, mouse_natural_scroll, UCHAR);
E_CONFIG_VAL(D, T, mouse_hires_scroll, UCHAR);
E_CONFIG_VAL(D, T, mouse_emulate_middle_button, UCHAR);
E_CONFIG_VAL(D, T, touch_accel, DOUBLE);
@ -867,7 +864,6 @@ _e_config_edd_init(Eina_Bool old)
E_CONFIG_VAL(D, T, touch_emulate_middle_button, UCHAR);
E_CONFIG_VAL(D, T, touch_tap_to_click, UCHAR);
E_CONFIG_VAL(D, T, touch_clickpad, UCHAR);
E_CONFIG_VAL(D, T, touch_flat_accel, UCHAR);
E_CONFIG_VAL(D, T, touch_scrolling_2finger, UCHAR);
E_CONFIG_VAL(D, T, touch_scrolling_edge, UCHAR);
E_CONFIG_VAL(D, T, touch_scrolling_circular, UCHAR);
@ -1805,14 +1801,6 @@ e_config_load(void)
e_config->backlight.ddc = 1;
e_config_save_queue();
}
CONFIG_VERSION_CHECK(36)
{
CONFIG_VERSION_UPDATE_INFO(36);
e_config->mouse_flat_accel = 0;
e_config->mouse_hires_scroll = 1;
e_config->touch_flat_accel = 0;
e_config_save_queue();
}
}
elm_config_profile_set(_e_config_profile);
if (!e_config->remember_internal_fm_windows)

View File

@ -135,7 +135,6 @@ struct _E_Config
double winlist_list_size; // GUI
double winlist_large_size; // GUI
Eina_Bool winlist_list_no_miniatures; // GUI
Eina_Bool no_state_hidden_desktop; // GUI
int maximize_policy; // GUI
int allow_manip; // GUI
int border_fix_on_shelf_toggle; // GUI
@ -246,15 +245,12 @@ struct _E_Config
int mouse_hand; //GUI
double mouse_accel; // GUI
int mouse_accel_threshold; // GUI
unsigned char mouse_flat_accel; // GUI
unsigned char mouse_natural_scroll; // GUI
unsigned char mouse_hires_scroll; // GUI
unsigned char mouse_emulate_middle_button; // GUI
double touch_accel; // GUI
unsigned char touch_natural_scroll; // GUI
unsigned char touch_emulate_middle_button; // GUI
unsigned char touch_flat_accel; // GUI
unsigned char touch_tap_to_click; // GUI
unsigned char touch_clickpad; // GUI
unsigned char touch_scrolling_2finger; // GUI

View File

@ -434,13 +434,16 @@ e_dbusmenu_item_unref(E_DBusMenu_Item *m)
E_API void
e_dbusmenu_unload(E_DBusMenu_Ctx *ctx)
{
Eldbus_Connection *conn;
Eldbus_Object *obj;
EINA_SAFETY_ON_NULL_RETURN(ctx);
if (ctx->root_menu) e_dbusmenu_item_unref(ctx->root_menu);
obj = eldbus_proxy_object_get(ctx->proxy);
conn = eldbus_object_connection_get(obj);
eldbus_proxy_unref(ctx->proxy);
eldbus_object_unref(obj);
eldbus_connection_unref(conn);
free(ctx);
}

View File

@ -124,7 +124,7 @@ e_desklock_interface_append(E_Desklock_Interface *iface)
desklock_ifaces = eina_list_append(desklock_ifaces, (void*)iface);
if (_e_desklock_state && (!current_iface))
{
if (iface->show(EINA_TRUE))
if (iface->show())
{
iface->active = EINA_TRUE;
current_iface = iface;
@ -155,7 +155,7 @@ e_desklock_interface_remove(E_Desklock_Interface *iface)
/* then try to find a replacement locker */
EINA_LIST_REVERSE_FOREACH(desklock_ifaces, l, diface)
{
if (!diface->show(EINA_TRUE)) continue;
if (!diface->show()) continue;
diface->active = EINA_TRUE;
current_iface = diface;
break;
@ -209,7 +209,7 @@ e_desklock_demo(void)
EINA_LIST_REVERSE_FOREACH(desklock_ifaces, l, iface)
{
if (iface->show(EINA_FALSE))
if (iface->show())
{
demo = iface->active = EINA_TRUE;
current_iface = iface;
@ -254,7 +254,7 @@ _desklock_show_internal(Eina_Bool suspend)
e_menu_hide_all();
EINA_LIST_FOREACH(show_hooks, l, show_cb)
{
if (!show_cb(suspend)) goto fail;
if (!show_cb()) goto fail;
}
EINA_LIST_FOREACH(e_comp->zones, l, zone)
@ -278,28 +278,6 @@ _desklock_show_internal(Eina_Bool suspend)
if (e_config->desklock_language)
e_intl_language_set(e_config->desklock_language);
if ((e_config->xkb.lock_layout) && (e_config->xkb.desklock_layout))
{
if ((!e_config->xkb.lock_layout->name) ||
(!!strcmp(e_config->xkb.lock_layout->name, e_config->xkb.desklock_layout)))
{
e_config_xkb_layout_free(e_config->xkb.lock_layout);
e_config->xkb.lock_layout = NULL;
}
}
if ((e_config->xkb.desklock_layout) && (!e_config->xkb.lock_layout))
{
E_Config_XKB_Layout *cl;
EINA_LIST_FOREACH(e_config->xkb.used_layouts, l, cl)
{
if ((cl->name) && (!strcmp(cl->name, e_config->xkb.desklock_layout)))
{
e_config->xkb.lock_layout = e_config_xkb_layout_dup(cl);
break;
}
}
}
if (e_config->xkb.lock_layout)
e_xkb_layout_set(e_config->xkb.lock_layout);
@ -317,7 +295,7 @@ _desklock_show_internal(Eina_Bool suspend)
EINA_LIST_REVERSE_FOREACH(desklock_ifaces, l, iface)
{
success = iface->show(suspend);
success = iface->show();
if (success)
{
iface->active = EINA_TRUE;
@ -529,6 +507,8 @@ _e_desklock_cb_run(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
E_Order *desk_run;
char buf[PATH_MAX];
if (!ev->suspend) return ECORE_CALLBACK_PASS_ON;
if (ev->on)
{
e_user_dir_concat_static(buf, "applications/desk-lock/.order");

View File

@ -1,7 +1,7 @@
#ifdef E_TYPEDEFS
typedef struct _E_Event_Desklock E_Event_Desklock;
typedef Eina_Bool (*E_Desklock_Show_Cb)(Eina_Bool immediate);
typedef Eina_Bool (*E_Desklock_Show_Cb)(void);
typedef void (*E_Desklock_Hide_Cb)(void);
typedef enum _E_Desklock_Background_Method {

View File

@ -13,7 +13,6 @@ static unsigned int _e_dpms_timeout_standby = 0;
static unsigned int _e_dpms_timeout_suspend = 0;
static unsigned int _e_dpms_timeout_off = 0;
static int _e_dpms_enabled = EINA_FALSE;
E_API Eina_Bool e_dpms_actual = EINA_FALSE;
#ifdef HAVE_WAYLAND
static Eina_List *handlers;
@ -22,6 +21,10 @@ static Ecore_Timer *suspend_timer;
static Ecore_Timer *off_timer;
#endif
#define STANDBY 10
#define SUSPEND 11
#define OFF 12
E_API void
e_dpms_update(void)
{
@ -32,7 +35,6 @@ e_dpms_update(void)
enabled = ((e_config->screensaver_enable) &&
(!((e_util_fullscreen_any()) &&
(e_config->no_dpms_on_fullscreen))));
if (e_screensaver_current_timeout_get() == 0) enabled = EINA_FALSE;
if (_e_dpms_enabled != enabled)
{
_e_dpms_enabled = enabled;
@ -40,15 +42,9 @@ e_dpms_update(void)
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
{
if (!e_config->screensaver_dpms_off)
{
ecore_x_dpms_enabled_set(enabled);
e_dpms_actual = enabled;
}
ecore_x_dpms_enabled_set(enabled);
else
{
ecore_x_dpms_enabled_set(0);
e_dpms_actual = EINA_FALSE;
}
ecore_x_dpms_enabled_set(0);
}
#endif
}
@ -57,9 +53,9 @@ e_dpms_update(void)
if (e_config->screensaver_enable)
{
off = suspend = standby = e_screensaver_timeout_get(EINA_FALSE);
standby += E_DPMS_STANDBY;
suspend += E_DPMS_SUSPEND;
off += E_DPMS_OFF;
standby += STANDBY;
suspend += SUSPEND;
off += OFF;
}
if (_e_dpms_timeout_standby != standby)
{
@ -91,20 +87,13 @@ e_dpms_force_update(void)
int enabled;
enabled = (e_config->screensaver_enable);
if (e_screensaver_current_timeout_get() == 0) enabled = EINA_FALSE;
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
{
if (!e_config->screensaver_dpms_off)
{
ecore_x_dpms_enabled_set(enabled);
e_dpms_actual = enabled;
}
ecore_x_dpms_enabled_set(enabled);
else
{
ecore_x_dpms_enabled_set(0);
e_dpms_actual = EINA_FALSE;
}
ecore_x_dpms_enabled_set(0);
}
#endif
if (!enabled) return;
@ -112,9 +101,9 @@ e_dpms_force_update(void)
if (e_config->screensaver_enable)
{
off = suspend = standby = e_screensaver_timeout_get(EINA_FALSE);
standby += E_DPMS_STANDBY;
suspend += E_DPMS_SUSPEND;
off += E_DPMS_OFF;
standby += STANDBY;
suspend += SUSPEND;
off += OFF;
}
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
@ -182,9 +171,9 @@ _e_dpms_off(void *d EINA_UNUSED)
static Eina_Bool
_e_dpms_screensaver_on()
{
standby_timer = ecore_timer_loop_add(E_DPMS_STANDBY, _e_dpms_standby, NULL);
suspend_timer = ecore_timer_loop_add(E_DPMS_SUSPEND, _e_dpms_suspend, NULL);
off_timer = ecore_timer_loop_add(E_DPMS_OFF, _e_dpms_off, NULL);
standby_timer = ecore_timer_loop_add(STANDBY, _e_dpms_standby, NULL);
suspend_timer = ecore_timer_loop_add(SUSPEND, _e_dpms_suspend, NULL);
off_timer = ecore_timer_loop_add(OFF, _e_dpms_off, NULL);
return ECORE_CALLBACK_RENEW;
}

View File

@ -3,17 +3,11 @@
#ifndef E_DPMS_H
#define E_DPMS_H
#define E_DPMS_STANDBY 10
#define E_DPMS_SUSPEND 11
#define E_DPMS_OFF 12
EINTERN int e_dpms_init(void);
EINTERN int e_dpms_shutdown(void);
E_API void e_dpms_update(void);
E_API void e_dpms_force_update(void);
E_API extern Eina_Bool e_dpms_actual;
#endif
#endif

View File

@ -599,7 +599,6 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
if (startup_id < 0) startup_id = 0;
}
if (++startup_id < 1) startup_id = 1;
e_exehist_startup_id_set(startup_id);
snprintf(buf, sizeof(buf), "E_START|%i", startup_id);
e_util_env_set("DESKTOP_STARTUP_ID", buf);

View File

@ -597,11 +597,8 @@ e_hints_window_state_set(E_Client *ec)
if (ec->netwm.state.skip_pager)
state[num++] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
}
if (!e_config->no_state_hidden_desktop)
{
if (ec->netwm.state.hidden)
state[num++] = ECORE_X_WINDOW_STATE_HIDDEN;
}
if (ec->netwm.state.hidden)
state[num++] = ECORE_X_WINDOW_STATE_HIDDEN;
if (ec->netwm.state.fullscreen)
state[num++] = ECORE_X_WINDOW_STATE_FULLSCREEN;

View File

@ -28,7 +28,6 @@
#include "e_place.h"
#include "e_resist.h"
#include "e_startup.h"
#include "e_state.h"
#include "e_signals.h"
#include "e_xinerama.h"
#include "e_layout.h"

View File

@ -629,7 +629,6 @@ main(int argc, char **argv)
efreet_desktop_environment_set(e_config->desktop_environment);
e_util_env_set("E_ICON_THEME", e_config->icon_theme);
if (e_config->icon_theme) elm_config_icon_theme_set(e_config->icon_theme);
ecore_exe_run_priority_set(e_config->priority);
locked |= e_config->desklock_start_locked;
@ -699,11 +698,6 @@ main(int argc, char **argv)
TS("E_Ipc Init Done");
_e_main_shutdown_push(e_ipc_shutdown);
TS("E_State Init");
e_state_init();
TS("E_State Init Done");
_e_main_shutdown_push(e_state_shutdown);
TS("E_Font Init");
if (!e_font_init())
{
@ -904,7 +898,6 @@ main(int argc, char **argv)
{
e_desklock_show_manual(EINA_TRUE);
e_screensaver_update();
e_dpms_force_update();
}
TS("Efreet Paths");

View File

@ -229,7 +229,6 @@ _e_msgbus_screensaver_owner_change_cb(void *data EINA_UNUSED, const char *bus EI
{
// stop inhibiting SS
e_screensaver_update();
e_dpms_force_update();
}
}
}
@ -275,7 +274,6 @@ _e_msgbus_screensaver_inhibit_cb(const Eldbus_Service_Interface *iface EINA_UNUS
// start inhibiting SS
e_screensaver_deactivate();
e_screensaver_update();
e_dpms_force_update();
}
err:
return reply;
@ -329,7 +327,6 @@ e_msgbus_screensaver_inhibit_remove(unsigned int cookie)
{
// stop inhibiting SS
e_screensaver_update();
e_dpms_force_update();
}
}

View File

@ -433,8 +433,7 @@ notify_cb(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Messag
printf("NOT: act=[%s] [%s]\n", txt, txt2);
num++;
actions = realloc(n->actions, (num + 1) *
sizeof(E_Notification_Notify_Action));
actions = realloc(n->actions, (num + 1) * sizeof(E_Notification_Notify));
if (actions)
{
n->actions = actions;

View File

@ -365,10 +365,8 @@ _e_powersave_event_update_free(void *data EINA_UNUSED, void *event)
else mode = powersave_mode;
free(event);
printf("PWSAVE: update free...\n");
if (mode > E_POWERSAVE_MODE_LOW)
{
printf("PWSAVE: low pwr hib=%i sus=%i\n", powersave_deferred_hibernate, powersave_deferred_suspend);
if (powersave_deferred_hibernate)
e_sys_action_do(E_SYS_HIBERNATE, NULL);
else if (powersave_deferred_suspend)

View File

@ -90,7 +90,6 @@ e_randr2_init(void)
E_CONFIG_LIST(D, T, screens, _e_randr2_cfg_screen_edd);
E_CONFIG_VAL(D, T, hotplug_response, DOUBLE);
E_CONFIG_VAL(D, T, restore, UCHAR);
E_CONFIG_VAL(D, T, use_cmd, UCHAR);
E_CONFIG_VAL(D, T, ignore_hotplug_events, UCHAR);
E_CONFIG_VAL(D, T, ignore_acpi_events, UCHAR);
E_CONFIG_VAL(D, T, default_policy, UINT);
@ -394,7 +393,6 @@ _config_load(void)
cfg->version = E_RANDR_CONFIG_VERSION;
cfg->screens = NULL;
cfg->restore = 1;
cfg->use_cmd = 0;
cfg->ignore_hotplug_events = 0;
cfg->ignore_acpi_events = 0;
cfg->default_policy = E_RANDR2_POLICY_EXTEND;
@ -787,7 +785,6 @@ _screens_differ(E_Randr2 *r1, E_Randr2 *r2)
return changed;
}
/*
static Eina_Bool
_cb_deferred_suspend_screen_change(void *data EINA_UNUSED)
{
@ -816,7 +813,6 @@ _cb_deferred_suspend_screen_change(void *data EINA_UNUSED)
}
return EINA_FALSE;
}
*/
static Eina_Bool
_cb_screen_change_delay(void *data EINA_UNUSED)
@ -935,9 +931,8 @@ _cb_screen_change_delay(void *data EINA_UNUSED)
if ((e_config->screensaver_suspend_on_ac) ||
(e_powersave_mode_get() > E_POWERSAVE_MODE_LOW))
{
// disable for now.. moving to state system
// printf("RRR: we should try and suspend now because on ac or suspend on ac is on\n");
// ecore_timer_add(1.0, _cb_deferred_suspend_screen_change, NULL);
printf("RRR: we should try and suspend now because on ac or suspend on ac is on\n");
ecore_timer_add(1.0, _cb_deferred_suspend_screen_change, NULL);
}
}
}
@ -1169,7 +1164,7 @@ again:
if (!common)
{
modes = eina_list_remove_list(modes, l);
// the list is no longer safe to walk - so let's just
// the list is no longer save to walk - so let's just
// walk it again from scratch
goto again;
}
@ -1243,13 +1238,11 @@ _screen_config_do(E_Randr2_Screen *s)
_config_do_recurse++;
// find dependent clones and find a common config res
cloneset = _screen_clones_find(e_randr2->screens, s);
printf("RRR: '%s' cloneset %p %i\n", s->info.name, cloneset, eina_list_count(cloneset));
if (cloneset)
{
_screen_clones_common_sync(cloneset);
eina_list_free(cloneset);
}
printf("RRR: _screen_config_do 2\n");
// if screen has a dependency...
if ((s->config.relative.mode != E_RANDR2_RELATIVE_UNKNOWN) &&
(s->config.relative.mode != E_RANDR2_RELATIVE_NONE) &&
@ -1265,11 +1258,9 @@ _screen_config_do(E_Randr2_Screen *s)
if (!s2->config.enabled) s2 = NULL;
}
}
printf("RRR: _screen_config_do 3\n");
s->config.geom.x = 0;
s->config.geom.y = 0;
printf("RRR: screen config do %ix%i rotation=%i\n", s->config.mode.w, s->config.mode.h, s->config.rotation);
printf("RRR: _screen_config_do 4\n");
if ((s->config.rotation == 0) || (s->config.rotation == 180))
{
s->config.geom.w = s->config.mode.w;
@ -1282,7 +1273,6 @@ _screen_config_do(E_Randr2_Screen *s)
}
if (s2)
{
printf("RRR: _screen_config_do 5\n");
if (s->config.relative.mode == E_RANDR2_RELATIVE_CLONE)
{
printf("RRR: clone relative\n");
@ -1331,7 +1321,6 @@ _screen_config_do(E_Randr2_Screen *s)
}
else
{
printf("RRR: _screen_config_do 6\n");
if ((s->config.relative.mode == E_RANDR2_RELATIVE_CLONE) &&
(s->config.relative.to))
{

View File

@ -102,7 +102,6 @@ struct _E_Config_Randr2
unsigned char restore;
unsigned char ignore_hotplug_events;
unsigned char ignore_acpi_events;
unsigned char use_cmd;
E_Randr2_Policy default_policy;
double hotplug_response;
};

View File

@ -88,71 +88,6 @@ e_screensaver_ignore_get(void)
return _screensaver_ignore;
}
static int
_e_screensaver_timeout_get(void)
{
int timeout = e_screensaver_timeout_get(EINA_TRUE);
if (!((e_config->screensaver_enable) &&
(!((e_util_fullscreen_current_any()) &&
(e_config->no_dpms_on_fullscreen)))))
timeout = 0;
if ((e_msgbus_data) &&
(e_msgbus_data->screensaver_inhibits))
timeout = 0;
return timeout;
}
E_API void
e_screensaver_force_update(void)
{
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type != E_PIXMAP_TYPE_WL)
{
int timeout = _e_screensaver_timeout_get();
int x_timeout = ecore_x_screensaver_timeout_get();
if (!e_config->screensaver_dpms_off)
{
Eina_Bool x_dpms = ecore_x_dpms_enabled_get();
unsigned int x_standby = 0, x_suspend = 0, x_off = 0;
unsigned int standby = 0, suspend = 0, off = 0;
if (e_dpms_actual != x_dpms)
{
printf("SCRSV: someone else messed with screen dpms!\n");
ecore_x_dpms_enabled_set(e_config->screensaver_enable);
}
off = suspend = standby = e_screensaver_timeout_get(EINA_FALSE);
standby += E_DPMS_STANDBY;
suspend += E_DPMS_SUSPEND;
off += E_DPMS_OFF;
ecore_x_dpms_timeouts_get(&x_standby, &x_suspend, &x_off);
if ((x_standby != standby) || (x_suspend != suspend) ||
(x_off != off))
{
printf("SCRSV: someone else messed with screen dpms timeouts!\n");
ecore_x_dpms_timeouts_set(standby, suspend, off);
}
}
if (timeout != x_timeout)
{
printf("SCRSV: someone else messed with screen blanking!\n");
ecore_x_screensaver_set(timeout,
e_config->screensaver_interval,
e_config->screensaver_blanking,
e_config->screensaver_expose);
}
}
#endif
}
E_API int
e_screensaver_current_timeout_get(void)
{
return _e_screensaver_timeout_get();
}
E_API void
e_screensaver_update(void)
{
@ -174,7 +109,15 @@ e_screensaver_update(void)
_e_screensaver_cfg_timeout = e_config->screensaver_timeout;
_e_screensaver_cfg_dim = dim_timeout;
timeout = _e_screensaver_timeout_get();
timeout = e_screensaver_timeout_get(EINA_TRUE);
if (!((e_config->screensaver_enable) &&
(!((e_util_fullscreen_current_any()) &&
(e_config->no_dpms_on_fullscreen)))))
timeout = 0;
if (e_msgbus_data)
{
if (e_msgbus_data->screensaver_inhibits) timeout = 0;
}
if (_e_screensaver_timeout != timeout)
{
@ -210,7 +153,7 @@ e_screensaver_update(void)
// screen doesn't turn off at all because x thinks internally
// that the monitor is still off... so this is odd, but it's
// necessary on some hardware.
if (real_changed && (!e_config->screensaver_dpms_off))
if ((real_changed) && (!e_config->screensaver_dpms_off))
{
ecore_x_dpms_enabled_set(!e_config->screensaver_enable);
ecore_x_dpms_enabled_set(e_config->screensaver_enable);

View File

@ -11,8 +11,6 @@ E_API void e_screensaver_ignore(void);
E_API void e_screensaver_unignore(void);
E_API Eina_Bool e_screensaver_ignore_get(void);
E_API void e_screensaver_force_update(void);
E_API int e_screensaver_current_timeout_get(void);
E_API void e_screensaver_update(void);
E_API int e_screensaver_timeout_get(Eina_Bool use_idle);

View File

@ -524,7 +524,6 @@ main(int argc, char **argv)
struct sigaction action;
pid_t child = -1;
Eina_Bool restart = EINA_TRUE;
unsigned int provided_eina_version, required_eina_version;
unsetenv("NOTIFY_SOCKET");
@ -548,58 +547,6 @@ main(int argc, char **argv)
eina_init();
/* check eina version ... this should be the whole efl version */
/* check for sanity here in case someone has done something very silly */
provided_eina_version =
(eina_version->major * 1000 * 1000) +
(eina_version->minor * 1000 ) +
(eina_version->micro);
required_eina_version =
(MIN_EFL_VERSION_MAJ * 1000 * 1000) +
(MIN_EFL_VERSION_MIN * 1000) +
(MIN_EFL_VERSION_MIC);
printf("Enlightenment: EFL Version Check: %u >= %u\n",
provided_eina_version, required_eina_version);
if (provided_eina_version < required_eina_version)
{
char *logf = NULL, *logf_old = NULL;
FILE *fps[2];
FILE *outf;
home = getenv("HOME");
// rename old olg file
if (!home)
{
myasprintf(&logf, ".e-log.log");
myasprintf(&logf_old, ".e-log.log.old");
}
else
{
myasprintf(&logf, "%s/.e-log.log", home);
myasprintf(&logf_old, "%s/.e-log.log.old", home);
}
rename(logf, logf_old);
outf = fopen(logf, "w");
fps[0] = stderr;
fps[1] = outf;
for (i = 0; i < 2; i++)
{
if (fps[i])
fprintf(fps[i],
"ERROR: EFL version provided is %i.%i.%i\n"
"Enlightenment requires a minimum of %i.%i.%i\n"
"Abort\n",
eina_version->major,
eina_version->minor,
eina_version->micro,
MIN_EFL_VERSION_MAJ,
MIN_EFL_VERSION_MIN,
MIN_EFL_VERSION_MIC);
}
if (outf) fclose(outf);
exit(42); // exit 42 for this as life the universe and everything...
}
/* reexcute myself with dbus-launch if dbus-launch is not running yet */
if ((!getenv("DBUS_SESSION_BUS_ADDRESS")) &&
(!getenv("DBUS_LAUNCHD_SESSION_BUS_SOCKET")))

View File

@ -1,340 +0,0 @@
#include "e.h"
/* public variables */
E_API int E_EVENT_STATE_CHANGE = 0;
/* private stuff */
typedef struct _E_State_Item_Change_Callback
{
const char *glob;
void (*cb) (void *data, E_State_Item item, Eina_Bool del);
void *data;
Eina_Bool delete_me : 1;
} E_State_Item_Change_Callback;
static Eina_Hash *_e_state_items = NULL;
static int _e_state_change_callbacks_walking = 0;
static Eina_Bool _e_state_change_callbacks_need_del= EINA_FALSE;
static Eina_List *_e_state_change_callbacks = NULL;
static void
_state_item_free(void *data)
{
E_State_Item *it = data;
if (it->name) eina_stringshare_del(it->name);
if (it->type == E_STATE_STRING) eina_stringshare_del(it->val.s);
free(data);
}
static void
_state_event_free(void *data EINA_UNUSED, void *ev)
{
E_Event_State *e = ev;
Eina_List *l, *ll;
E_State_Item_Change_Callback *cbit;
_e_state_change_callbacks_walking++;
EINA_LIST_FOREACH(_e_state_change_callbacks, l, cbit)
{
if (eina_fnmatch(cbit->glob, e->item.name, 0))
{
cbit->cb(cbit->data, e->item,
(e->event == E_STATE_DEL) ?
EINA_TRUE : EINA_FALSE);
}
}
_e_state_change_callbacks_walking--;
if ((_e_state_change_callbacks_walking == 0) &&
(_e_state_change_callbacks_need_del))
{
EINA_LIST_FOREACH_SAFE(_e_state_change_callbacks, l, ll, cbit)
{
if (cbit->delete_me)
{
_e_state_change_callbacks =
eina_list_remove_list(_e_state_change_callbacks, l);
eina_stringshare_del(cbit->glob);
free(cbit);
}
}
_e_state_change_callbacks_need_del = EINA_FALSE;
}
if (e->item.name) eina_stringshare_del(e->item.name);
if (e->item.type == E_STATE_STRING) eina_stringshare_del(e->item.val.s);
free(e);
}
/* public functions */
EINTERN int
e_state_init(void)
{
E_EVENT_STATE_CHANGE = ecore_event_type_new();
_e_state_items = eina_hash_string_superfast_new(_state_item_free);
return 1;
}
EINTERN int
e_state_shutdown(void)
{
E_State_Item_Change_Callback *cbit;
E_FREE_FUNC(_e_state_items, eina_hash_free);
EINA_LIST_FREE(_e_state_change_callbacks, cbit)
{
eina_stringshare_del(cbit->glob);
free(cbit);
}
return 1;
}
E_API void
e_state_item_change_callback_add(const char *glob, void (*cb) (void *data, E_State_Item item, Eina_Bool del), const void *data)
{
E_State_Item_Change_Callback *cbit = calloc(1, sizeof(E_State_Item_Change_Callback));
if (!cbit) return;
cbit->glob = eina_stringshare_add(glob);
if (!cbit->glob)
{
free(cbit);
return;
}
cbit->cb = cb;
cbit->data = (void *)data;
_e_state_change_callbacks = eina_list_append(_e_state_change_callbacks, cbit);
}
E_API void
e_state_item_change_callback_del(const char *glob, void (*cb) (void *data, E_State_Item item, Eina_Bool del), const void *data)
{
Eina_List *l;
E_State_Item_Change_Callback *cbit;
EINA_LIST_FOREACH(_e_state_change_callbacks, l, cbit)
{
if ((!strcmp(cbit->glob, glob)) &&
(cbit->cb == cb) && (cbit->data == data))
{
if (_e_state_change_callbacks_walking > 0)
{
cbit->delete_me = EINA_TRUE;
_e_state_change_callbacks_need_del = EINA_TRUE;
break;
}
_e_state_change_callbacks =
eina_list_remove_list(_e_state_change_callbacks, l);
eina_stringshare_del(cbit->glob);
free(cbit);
return;
}
}
}
E_API E_State_Item
e_state_item_get(const char *name)
{
E_State_Item it = { NULL, E_STATE_UNKNOWN, { 0 } };
E_State_Item *it2 = eina_hash_find(_e_state_items, name);
if (it2) it = *it2;
return it;
}
E_API void
e_state_item_set(E_State_Item it)
{
E_State_Item *it2 = eina_hash_find(_e_state_items, it.name);
Eina_Bool changed = EINA_FALSE;
if (!it2)
{
it2 = calloc(1, sizeof(E_State_Item));
if (!it2) return;
it2->name = eina_stringshare_add(it.name);
eina_hash_add(_e_state_items, it2->name, it2);
changed = EINA_TRUE;
}
if (!changed)
{
if (it2->type != it.type) changed = EINA_TRUE;
}
if (!changed)
{
switch (it2->type)
{
case E_STATE_UNKNOWN:
changed = EINA_TRUE;
break;
case E_STATE_BOOL:
if (it2->val.b != it.val.b) changed = EINA_TRUE;
break;
case E_STATE_INT:
if (it2->val.i != it.val.i) changed = EINA_TRUE;
break;
case E_STATE_UINT:
if (it2->val.u != it.val.u) changed = EINA_TRUE;
break;
case E_STATE_DOUBLE:
if (!EINA_FLT_EQ(it2->val.d, it.val.d)) changed = EINA_TRUE;
break;
case E_STATE_STRING:
if (!((it2->val.s) && (it.val.s) &&
(!strcmp(it2->val.s, it.val.s))))
changed = EINA_TRUE;
break;
default:
break;
}
}
if (changed)
{
E_Event_State *e;
if (it2->type == E_STATE_STRING)
{
eina_stringshare_del(it2->val.s);
it2->val.s = NULL;
}
it2->type = it.type;
if (it2->type == E_STATE_STRING)
it2->val.s = eina_stringshare_add(it.val.s);
else
it2->val = it.val;
e = calloc(1, sizeof(E_Event_State));
if (e)
{
e->event = E_STATE_CHANGE;
e->item = *it2;
e->item.name = eina_stringshare_add(e->item.name);
if (e->item.type == E_STATE_STRING)
e->item.val.s = eina_stringshare_add(e->item.val.s);
ecore_event_add(E_EVENT_STATE_CHANGE, e, _state_event_free, NULL);
}
}
}
E_API void
e_state_item_del(const char *name)
{
E_State_Item *it2 = eina_hash_find(_e_state_items, name);
if (it2)
{
E_Event_State *e = calloc(1, sizeof(E_Event_State));
if (e)
{
e->event = E_STATE_DEL;
e->item = *it2;
e->item.name = eina_stringshare_add(e->item.name);
if (e->item.type == E_STATE_STRING)
e->item.val.s = eina_stringshare_add(e->item.val.s);
ecore_event_add(E_EVENT_STATE_CHANGE, e, _state_event_free, NULL);
}
eina_hash_del_by_key(_e_state_items, name);
}
}
E_API Eina_Bool
e_state_item_val_bool_get(const char *name)
{
E_State_Item it = e_state_item_get(name);
if (it.type != E_STATE_BOOL) return EINA_FALSE;
return it.val.b;
}
E_API int
e_state_item_val_int_get(const char *name)
{
E_State_Item it = e_state_item_get(name);
if (it.type != E_STATE_INT) return 0;
return it.val.i;
}
E_API unsigned int
e_state_item_val_uint_get(const char *name)
{
E_State_Item it = e_state_item_get(name);
if (it.type != E_STATE_UINT) return 0;
return it.val.u;
}
E_API double
e_state_item_val_double_get(const char *name)
{
E_State_Item it = e_state_item_get(name);
if (it.type != E_STATE_DOUBLE) return 0.0;
return it.val.d;
}
E_API const char *
e_state_item_val_string_get(const char *name)
{
E_State_Item it = e_state_item_get(name);
if (it.type != E_STATE_STRING) return NULL;
return it.val.s;
}
E_API void
e_state_item_val_bool_set(const char *name, Eina_Bool b)
{
E_State_Item it;
it.name = name;
it.type = E_STATE_BOOL;
it.val.b = b;
e_state_item_set(it);
}
E_API void
e_state_item_val_int_set(const char *name, int i)
{
E_State_Item it;
it.name = name;
it.type = E_STATE_INT;
it.val.i = i;
e_state_item_set(it);
}
E_API void
e_state_item_val_uint_set(const char *name, unsigned int u)
{
E_State_Item it;
it.name = name;
it.type = E_STATE_UINT;
it.val.u = u;
e_state_item_set(it);
}
E_API void
e_state_item_val_double_set(const char *name, double d)
{
E_State_Item it;
it.name = name;
it.type = E_STATE_DOUBLE;
it.val.d = d;
e_state_item_set(it);
}
E_API void
e_state_item_val_string_set(const char *name, const char *s)
{
E_State_Item it;
it.name = name;
it.type = E_STATE_STRING;
it.val.s = s;
e_state_item_set(it);
}

View File

@ -1,76 +0,0 @@
#ifdef E_TYPEDEFS
/* struct used to pass to event handlers */
typedef struct _E_Event_State E_Event_State;
typedef struct _E_State_Item E_State_Item;
typedef union _E_State_Val E_State_Val;
typedef enum
{
E_STATE_UNKNOWN,
E_STATE_BOOL,
E_STATE_INT,
E_STATE_UINT,
E_STATE_DOUBLE,
E_STATE_STRING
} E_State_Type;
typedef enum
{
E_STATE_CHANGE,
E_STATE_DEL
} E_State_Event;
#else
# ifndef E_STATE_H
# define E_STATE_H
union _E_State_Val
{
Eina_Bool b;
int i;
unsigned int u;
double d;
const char *s;
};
struct _E_State_Item
{
const char *name;
E_State_Type type;
E_State_Val val;
};
struct _E_Event_State
{
E_State_Event event;
E_State_Item item;
};
EINTERN int e_state_init(void);
EINTERN int e_state_shutdown(void);
E_API void e_state_item_change_callback_add(const char *glob, void (*cb) (void *data, E_State_Item item, Eina_Bool del), const void *data);
E_API void e_state_item_change_callback_del(const char *glob, void (*cb) (void *data, E_State_Item item, Eina_Bool del), const void *data);
E_API E_State_Item e_state_item_get(const char *name);
E_API void e_state_item_set(E_State_Item it);
E_API void e_state_item_del(const char *name);
E_API Eina_Bool e_state_item_val_bool_get(const char *name);
E_API int e_state_item_val_int_get(const char *name);
E_API unsigned int e_state_item_val_uint_get(const char *name);
E_API double e_state_item_val_double_get(const char *name);
E_API const char *e_state_item_val_string_get(const char *name);
E_API void e_state_item_val_bool_set(const char *name, Eina_Bool b);
E_API void e_state_item_val_int_set(const char *name, int i);
E_API void e_state_item_val_uint_set(const char *name, unsigned int u);
E_API void e_state_item_val_double_set(const char *name, double d);
E_API void e_state_item_val_string_set(const char *name, const char *s);
extern E_API int E_EVENT_STATE_CHANGE;
# endif
#endif

View File

@ -522,20 +522,26 @@ e_sys_shutdown(void)
_e_sys_acpi_handler = NULL;
if (login1_session_proxy)
{
Eldbus_Connection *conn;
Eldbus_Object *obj;
obj = eldbus_proxy_object_get(login1_session_proxy);
conn = eldbus_object_connection_get(obj);
eldbus_proxy_unref(login1_session_proxy);
eldbus_object_unref(obj);
eldbus_connection_unref(conn);
login1_session_proxy = NULL;
}
if (login1_manger_proxy)
{
Eldbus_Connection *conn;
Eldbus_Object *obj;
obj = eldbus_proxy_object_get(login1_manger_proxy);
conn = eldbus_object_connection_get(obj);
eldbus_proxy_unref(login1_manger_proxy);
eldbus_object_unref(obj);
eldbus_connection_unref(conn);
login1_manger_proxy = NULL;
}
if (_e_sys_systemd_inhibit_fd >= 0)

View File

@ -342,7 +342,6 @@ main(int argc,
rm = EINA_FALSE;
eina_stringshare_del(s);
}
eina_iterator_free(it);
if (rm)
{
if (rmdir(path))

View File

@ -85,33 +85,33 @@ _resolutions_calc(int w, int h)
{
int i, j = 0;
int nw, nh, pw = 0, ph = 0;
Mip *mips_ = calloc(1, sizeof(Mip) * MAX_RES_NUM);
Mip *mips = calloc(1, sizeof(Mip) * MAX_RES_NUM);
if (!mips_) return NULL;
if (!mips) return NULL;
for (i = 0; resolutions[i]; i += 2)
{
nh = resolutions[i + 1];
nw = (w * nh) / h;
if ((nh >= h) || (nw >= w))
{
mips_[j].from_w = pw;
mips_[j].from_h = ph;
mips_[j].to_w = 1000000000;
mips_[j].to_h = 1000000000;
mips_[j].last = EINA_TRUE;
mips[j].from_w = pw;
mips[j].from_h = ph;
mips[j].to_w = 1000000000;
mips[j].to_h = 1000000000;
mips[j].last = EINA_TRUE;
break;
}
mips_[j].from_w = pw;
mips_[j].from_h = ph;
mips_[j].to_w = nw;
mips_[j].to_h = nh;
mips[j].from_w = pw;
mips[j].from_h = ph;
mips[j].to_w = nw;
mips[j].to_h = nh;
j++;
pw = nw + 1;
ph = nh + 1;
}
return mips_;
return mips;
}
EAPI int
@ -123,7 +123,7 @@ elm_main(int argc, char **argv)
int bg_b = 64;
char dir_buf[128], img_buf[256], edc_buf[256], cmd_buf[1024], qual_buf[64];
const char *dir, *quality_string = NULL, *img_name = NULL;
Mip *mips_ = NULL;
Mip *mips = NULL;
int i, imw, imh, w, h, quality;
int ret = 0, mips_num = 0;
Eina_Bool alpha;
@ -207,25 +207,25 @@ elm_main(int argc, char **argv)
(!strcmp(mode, "scale_out")) ||
(!strcmp(mode, "pan")))
{ // need to produce multiple scaled versions
mips_ = _resolutions_calc(w, h);
if (!mips_) return 6;
for (i = 0; mips_[i].to_w; i++)
mips = _resolutions_calc(w, h);
if (!mips) return 6;
for (i = 0; mips[i].to_w; i++)
{
mips_num++;
if (mips_[i].last)
if (mips[i].last)
{
imw = w;
imh = h;
}
else
{
imw = mips_[i].to_w;
imh = mips_[i].to_h;
imw = mips[i].to_w;
imh = mips[i].to_h;
}
evas_object_resize(subwin, imw, imh);
evas_object_resize(image, imw, imh);
elm_win_render(subwin);
if (mips_[i].last)
if (mips[i].last)
snprintf(img_buf, sizeof(img_buf), "%s/img.png",
dir);
else
@ -239,7 +239,7 @@ elm_main(int argc, char **argv)
}
}
// no multiple resolutions -0 save out original
if (!mips_)
if (!mips)
{
evas_object_resize(subwin, w, h);
evas_object_resize(image, w, h);
@ -267,7 +267,7 @@ elm_main(int argc, char **argv)
snprintf(edc_buf, sizeof(edc_buf), "%s/bg.edc", dir);
f = fopen(edc_buf, "w");
if (!f) goto cleanup;
if ((mips_) && (mips_num > 1))
if ((mips) && (mips_num > 1))
{
fprintf(f,
"images {\n"
@ -276,7 +276,7 @@ elm_main(int argc, char **argv)
{
fprintf(f,
" image {\n");
if (mips_[i].last)
if (mips[i].last)
{
fprintf(f,
" image: \"img.png\" %s;\n",
@ -284,8 +284,8 @@ elm_main(int argc, char **argv)
}
else
{
imw = mips_[i].to_w;
imh = mips_[i].to_h;
imw = mips[i].to_w;
imh = mips[i].to_h;
fprintf(f,
" image: \"img-%ix%i.png\" %s;\n",
imw, imh, quality_string);
@ -293,8 +293,8 @@ elm_main(int argc, char **argv)
fprintf(f,
" size: %i %i %i %i;\n"
" }\n",
mips_[i].from_w, mips_[i].from_h,
mips_[i].to_w, mips_[i].to_h);
mips[i].from_w, mips[i].from_h,
mips[i].to_w, mips[i].to_h);
}
fprintf(f,
" }\n"
@ -489,7 +489,7 @@ elm_main(int argc, char **argv)
}
ret = system(cmd_buf);
cleanup:
free(mips_);
free(mips);
ecore_file_recursive_rm(dir);
evas_object_del(win);
return ret;

View File

@ -181,7 +181,6 @@ src = [
'e_slidesel.c',
'e_spectrum.c',
'e_startup.c',
'e_state.c',
'e_sys.c',
'e_system.c',
'e_test.c',
@ -362,7 +361,6 @@ hdr = [
'e_slidesel.h',
'e_spectrum.h',
'e_startup.h',
'e_state.h',
'e_sys.h',
'e_system.h',
'e_test.h',

View File

@ -246,7 +246,7 @@ _light_device_include(const char *dev)
#endif
static void
_light_refresh_devices(void)
_light_refresh_devices()
{
Light *lig;

View File

@ -304,14 +304,9 @@ err:
static Eina_Bool
_ddc_init(void)
{
// .so.[345] are ABI compatible with .so.2 for our uses - see
// the changes listed at:
// - https://www.ddcutil.com/c_api_99/
// - https://www.ddcutil.com/c_api_120/
// - https://www.ddcutil.com/c_api_200/
ddc_lib = dlopen("libddcutil.so.5", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)
ddc_lib = dlopen("libddcutil.so.4", RTLD_NOW | RTLD_LOCAL);
// .so.3 is ABI compatible twith .so.2 for out uses - see
// https://www.ddcutil.com/c_api_99/ for changes between them
ddc_lib = dlopen("libddcutil.so.4", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)
ddc_lib = dlopen("libddcutil.so.3", RTLD_NOW | RTLD_LOCAL);
if (!ddc_lib)

View File

@ -90,12 +90,9 @@ _power_suspend_init(void)
static void
_power_hibernate_init(void)
{
#if defined (__FreeBSD__)
#if defined (__FreeBSD__) || defined (__OpenBSD__)
if (ecore_file_app_installed("acpiconf"))
_cmd_hibernate = strdup("acpiconf -s4");
#elif defined (__OpenBSD__)
if (ecore_file_app_installed("ZZZ"))
_cmd_suspend = strdup("ZZZ");
#else
if (ecore_file_app_installed("systemctl"))
_cmd_hibernate = strdup("systemctl hibernate");
@ -109,8 +106,7 @@ _power_hibernate_init(void)
_cmd_hibernate = strdup("/etc/acpi/pm-hibernate");
#endif
// linux systemd: PATH/systemctl hibernate
// FreeBSD: acpiconf -s4
// OpenBSD: ZZZ
// bsd: acpiconf -s4
// if exist:
// PATH/hibernate.sh
// /etc/acpi/hibernate.sh force

View File

@ -3,9 +3,9 @@ Encoding=UTF-8
Type=Application
Name=Fingerprint Password Settings
Name[de]=Fingerprint Passwort Einstellungen
Name[fr]=Reconnaissance des empreintes
Name[fr]=Reconnaissance par empreinte digitale
Name[it]=Impostazioni autenticazione con impronta digitale
Name[pt]=Reconhecimento de impressões digitais
Name[pt]=Definições de palavras-passe de impressão digital
Icon=enlightenment_fprint
Exec=enlightenment_fprint
Comment=Tool to set up or modify fingerprint authentication

View File

@ -7,13 +7,11 @@ Name[eo]=Aplikaĵomenuo
Name[fi]=Sovellusvalikko
Name[fr]=Menu des applications
Name[gl]=Menú de aplicativos
Name[it]=Menù applicazione
Name[ja]=アプリケーションメニュー
Name[ko]=프로그램 메뉴
Name[lt]=Programų meniu
Name[ms]=Menu Aplikasi
Name[pl]=Menu programów
Name[pt]=Menu de aplicações
Name[ru]=Меню управления приложениями
Name[sr]=Изборник програма
Name[tr]=Uygulama Menüsü
@ -24,7 +22,6 @@ Comment[fi]=Vempain joka sisältää valitun ikkunan valikkopalkin.
Comment[fr]=Gadget contenant la barre de menus de l'application au premier plan.
Comment[it]=Gadget che contiene la barra degli strumenti dell'applicazione in primo piano.
Comment[ms]=Gadjet yang memegang palang menu bagi aplikasi hadapan.
Comment[pt]=Gadget que contém a barra de menu das aplicações em primeiro plano.
Comment[ru]=Гаджет отображающий меню активного приложения.
Comment[sr]=Справица која држи траку изборника покренутих програма.
Comment[tr]=Ön plandaki uygulamanın menü çubuğunu tutan araç.

View File

@ -936,7 +936,6 @@ _battery_update(int full, int time_left, int time_full, Eina_Bool have_battery,
(battery_config->suspend_below > 0) &&
(full < battery_config->suspend_below))
{
printf("battery %i suspend below %i\n", full, battery_config->suspend_below);
if (battery_config->suspend_method == SUSPEND)
e_sys_action_do(E_SYS_SUSPEND, NULL);
else if (battery_config->suspend_method == HIBERNATE)

View File

@ -11,7 +11,6 @@ Name[sr]=Блуез5
Name[tr]=Bluetooth
Comment=Bluetooth control Gadget.
Comment[fr]=Gadget de configuration Bluetooth.
Comment[it]=Gadget per il controllo del Bluetooth.
Comment[pt]=Gadget de controlo Bluetooth.
Comment[it]=Gadget di controllo del Bluetooth.
Icon=e-module-bluez5
X-Enlightenment-ModuleType=utils

View File

@ -947,7 +947,6 @@ e_modapi_init(E_Module *m)
E_API int
e_modapi_shutdown(E_Module *m EINA_UNUSED)
{
E_FREE_LIST(handlers, ecore_event_handler_del);
if (act)
{
e_action_predef_name_del("Clock", "Toggle calendar");

View File

@ -10,10 +10,10 @@ struct _E_Config_Dialog_Data
{
E_Config_Dialog *cfd;
int show_cursor;
int idle_cursor;
int use_e_cursor;
int cursor_size;
int show_cursor;
int idle_cursor;
int use_e_cursor;
int cursor_size;
struct
{
@ -24,15 +24,12 @@ struct _E_Config_Dialog_Data
double mouse_accel;
double mouse_accel_threshold;
int mouse_flat_accel;
int mouse_natural_scroll;
int mouse_hires_scroll;
int mouse_emulate_middle_button;
double touch_accel;
int touch_natural_scroll;
int touch_emulate_middle_button;
int touch_flat_accel;
int touch_tap_to_click;
int touch_clickpad;
int touch_scrolling_2finger;
@ -76,15 +73,12 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->mouse_hand = e_config->mouse_hand;
cfdata->mouse_accel = e_config->mouse_accel;
cfdata->mouse_flat_accel = e_config->mouse_flat_accel;
cfdata->mouse_accel_threshold = e_config->mouse_accel_threshold;
cfdata->mouse_natural_scroll = e_config->mouse_natural_scroll;
cfdata->mouse_hires_scroll = e_config->mouse_hires_scroll;
cfdata->mouse_emulate_middle_button = e_config->mouse_emulate_middle_button;
cfdata->touch_accel = e_config->touch_accel;
cfdata->touch_natural_scroll = e_config->touch_natural_scroll;
cfdata->touch_flat_accel = e_config->touch_flat_accel;
cfdata->touch_emulate_middle_button = e_config->touch_emulate_middle_button;
cfdata->touch_tap_to_click = e_config->touch_tap_to_click;
cfdata->touch_clickpad = e_config->touch_clickpad;
@ -118,12 +112,9 @@ _basic_check_changed(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfd
EINA_DBL_EQ(cfdata->mouse_accel_threshold, e_config->mouse_accel_threshold) &&
(cfdata->mouse_natural_scroll == e_config->mouse_natural_scroll) &&
(cfdata->mouse_emulate_middle_button == e_config->mouse_emulate_middle_button) &&
(cfdata->mouse_hires_scroll == e_config->mouse_hires_scroll) &&
(cfdata->mouse_flat_accel == e_config->mouse_flat_accel) &&
EINA_DBL_EQ(cfdata->touch_accel, e_config->touch_accel) &&
(cfdata->touch_natural_scroll == e_config->touch_natural_scroll) &&
(cfdata->touch_emulate_middle_button == e_config->touch_emulate_middle_button) &&
(cfdata->touch_flat_accel == e_config->touch_flat_accel) &&
(cfdata->touch_tap_to_click == e_config->touch_tap_to_click) &&
(cfdata->touch_clickpad == e_config->touch_clickpad) &&
(cfdata->touch_scrolling_2finger == e_config->touch_scrolling_2finger) &&
@ -153,14 +144,11 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
e_config->mouse_accel = cfdata->mouse_accel;
e_config->mouse_accel_threshold = cfdata->mouse_accel_threshold;
e_config->mouse_flat_accel = cfdata->mouse_flat_accel;
e_config->mouse_hires_scroll = cfdata->mouse_hires_scroll;
e_config->mouse_natural_scroll = cfdata->mouse_natural_scroll;
e_config->mouse_emulate_middle_button = cfdata->mouse_emulate_middle_button;
e_config->touch_accel = cfdata->touch_accel;
e_config->touch_natural_scroll = cfdata->touch_natural_scroll;
e_config->touch_flat_accel = cfdata->touch_flat_accel;
e_config->touch_emulate_middle_button = cfdata->touch_emulate_middle_button;
e_config->touch_tap_to_click = cfdata->touch_tap_to_click;
e_config->touch_clickpad = cfdata->touch_clickpad;
@ -267,8 +255,6 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
e_widget_list_object_append(ol, of, 1, 0, 0.5);
of = e_widget_framelist_add(evas, _("Acceleration"), 0);
ob = e_widget_check_add(evas, _("Flat acceleration"), &(cfdata->mouse_flat_accel));
e_widget_framelist_object_append(of, ob);
ob = e_widget_slider_add(evas, 1, 0, _("%1.1f"), -1.0, 1.0, 0.1, 0,
&(cfdata->mouse_accel), NULL, 100);
e_widget_framelist_object_append(of, ob);
@ -292,8 +278,6 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
oc = e_widget_check_add(evas, _("Natural scrolling"), &(cfdata->mouse_natural_scroll));
e_widget_framelist_object_append(of, oc);
oc = e_widget_check_add(evas, _("Hi-Res scrolling"), &(cfdata->mouse_hires_scroll));
e_widget_framelist_object_append(of, oc);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Mouse"), ol,
@ -305,8 +289,6 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
of = e_widget_framelist_add(evas, _("Acceleration"), 0);
ob = e_widget_check_add(evas, _("Flat acceleration"), &(cfdata->touch_flat_accel));
e_widget_framelist_object_append(of, ob);
ob = e_widget_slider_add(evas, 1, 0, _("%1.1f"), -1.0, 1.0, 0.1, 0,
&(cfdata->touch_accel), NULL, 100);
e_widget_framelist_object_append(of, ob);

View File

@ -439,7 +439,7 @@ _change_hash_apply_cb(const Eina_Hash *hash EINA_UNUSED, const void *key, void *
imc = data;
if (ecore_file_exists(key) && ecore_file_can_write(key))
if (ecore_file_exists(key))
{
ef = eet_open(key, EET_FILE_MODE_WRITE);
if (ef)

View File

@ -140,7 +140,7 @@ const E_Intl_Pair basic_language_predefined_pairs[] = {
{"sl_SI.UTF-8", "si_flag.png", "Slovenščina"},
{"sv_SE.UTF-8", "se_flag.png", "Svenska"},
{"tr_TR.UTF-8", "tr_flag.png", "Türkçe"},
{"uk_UA.UTF-8", "ua_flag.png", "Українська мова"},
{"uk_UK.UTF-8", "ua_flag.png", "Українська мова"},
{"vi_VN UTF-8", "vn_flag.png", "Tiếng Việt"},
{"zh_CN.UTF-8", "cn_flag.png", "中文 (简体)"},
{"zh_TW.UTF-8", "tw_flag.png", "中文 (繁體)"},

View File

@ -30,7 +30,6 @@ struct _E_Config_Dialog_Data
Evas_Object *scale_value_obj;
Evas_Object *policy_obj;
int restore;
int use_cmd;
int hotplug;
int acpi;
int screen;
@ -104,7 +103,6 @@ _create_data(E_Config_Dialog *cfd EINA_UNUSED)
if (!(cfdata = E_NEW(E_Config_Dialog_Data, 1))) return NULL;
if (cfd->data) cfdata->params = strdup(cfd->data);
cfdata->restore = e_randr2_cfg->restore;
cfdata->use_cmd = e_randr2_cfg->use_cmd;
cfdata->hotplug = !e_randr2_cfg->ignore_hotplug_events;
cfdata->acpi = !e_randr2_cfg->ignore_acpi_events;
cfdata->policy = e_randr2_cfg->default_policy;
@ -149,14 +147,6 @@ _cb_restore_changed(void *data EINA_UNUSED, Evas_Object *obj, void *event EINA_U
e_config_dialog_changed_set(cfdata->cfd, EINA_TRUE);
}
static void
_cb_use_cmd_changed(void *data EINA_UNUSED, Evas_Object *obj, void *event EINA_UNUSED)
{
E_Config_Dialog_Data *cfdata = data;
cfdata->use_cmd = elm_check_state_get(obj);
e_config_dialog_changed_set(cfdata->cfd, EINA_TRUE);
}
static void
_cb_hotplug_changed(void *data EINA_UNUSED, Evas_Object *obj, void *event EINA_UNUSED)
{
@ -1189,7 +1179,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas EINA_UNUSED, E_Config_Dialog_Data
o = elm_check_add(win);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(o, _("Restore on start"));
elm_object_text_set(o, _("Restore setup on start"));
elm_check_state_set(o, cfdata->restore);
elm_box_pack_end(bx2, o);
evas_object_show(o);
@ -1198,16 +1188,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas EINA_UNUSED, E_Config_Dialog_Data
o = elm_check_add(win);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(o, _("Use command"));
elm_check_state_set(o, cfdata->use_cmd);
elm_box_pack_end(bx2, o);
evas_object_show(o);
evas_object_smart_callback_add(o, "changed", _cb_use_cmd_changed, cfdata);
o = elm_check_add(win);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(o, _("Hotplug"));
elm_object_text_set(o, _("Monitor hotplug"));
elm_check_state_set(o, cfdata->hotplug);
elm_box_pack_end(bx2, o);
evas_object_show(o);
@ -1248,7 +1229,6 @@ _basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
E_Config_Randr2_Screen *cs, *cs2;
e_randr2_cfg->restore = cfdata->restore;
e_randr2_cfg->use_cmd = cfdata->use_cmd;
e_randr2_cfg->ignore_hotplug_events = !cfdata->hotplug;
e_randr2_cfg->ignore_acpi_events = !cfdata->acpi;
e_randr2_cfg->default_policy = cfdata->policy;

View File

@ -175,7 +175,6 @@ _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
elm_config_save();
}
e_util_env_set("E_ICON_THEME", e_config->icon_theme);
if (e_config->icon_theme) elm_config_icon_theme_set(e_config->icon_theme);
ev = E_NEW(E_Event_Config_Icon_Theme, 1);
if (ev)

View File

@ -41,8 +41,7 @@ struct _E_Config_Dialog_Data
int maximize_direction;
int maximized_allow_manip;
int border_fix_on_shelf_toggle;
int allow_above_fullscreen;
int state_hidden_desktop;
int allow_above_fullscreen;
};
E_Config_Dialog *
@ -91,7 +90,6 @@ _create_data(E_Config_Dialog *cfd EINA_UNUSED)
cfdata->transient.iconify = e_config->transient.iconify;
cfdata->maximize_policy = (e_config->maximize_policy & E_MAXIMIZE_TYPE);
cfdata->allow_above_fullscreen = e_config->allow_above_fullscreen;
cfdata->state_hidden_desktop = ! e_config->no_state_hidden_desktop;
if (cfdata->maximize_policy == E_MAXIMIZE_NONE)
cfdata->maximize_policy = E_MAXIMIZE_FULLSCREEN;
cfdata->maximize_direction =
@ -135,7 +133,6 @@ _basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
e_config->allow_manip = cfdata->maximized_allow_manip;
e_config->border_fix_on_shelf_toggle = cfdata->border_fix_on_shelf_toggle;
e_config->allow_above_fullscreen = cfdata->allow_above_fullscreen;
e_config->no_state_hidden_desktop = !cfdata->state_hidden_desktop;
e_config_save_queue();
return 1; /* Apply was OK */
}
@ -144,16 +141,16 @@ static int
_basic_check_changed(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{
return ((e_config->use_resist != cfdata->use_resist) ||
(e_config->desk_resist != cfdata->desk_resist) ||
(e_config->window_resist != cfdata->window_resist) ||
(e_config->gadget_resist != cfdata->gadget_resist) ||
(e_config->geometry_auto_resize_limit != cfdata->geometry_auto_resize_limit) ||
(e_config->desk_resist != cfdata->desk_resist) ||
(e_config->window_resist != cfdata->window_resist) ||
(e_config->gadget_resist != cfdata->gadget_resist) ||
(e_config->geometry_auto_resize_limit != cfdata->geometry_auto_resize_limit) ||
(e_config->geometry_auto_move != cfdata->geometry_auto_move) ||
(!EINA_DBL_EQ(e_config->border_keyboard.timeout, cfdata->border_keyboard.timeout)) ||
(e_config->border_keyboard.move.dx != cfdata->border_keyboard.move.dx) ||
(e_config->border_keyboard.move.dy != cfdata->border_keyboard.move.dx) ||
(e_config->border_keyboard.resize.dx != cfdata->border_keyboard.resize.dx) ||
(e_config->border_keyboard.resize.dy != cfdata->border_keyboard.resize.dx) ||
(!EINA_DBL_EQ(e_config->border_keyboard.timeout, cfdata->border_keyboard.timeout)) ||
(e_config->border_keyboard.move.dx != cfdata->border_keyboard.move.dx) ||
(e_config->border_keyboard.move.dy != cfdata->border_keyboard.move.dx) ||
(e_config->border_keyboard.resize.dx != cfdata->border_keyboard.resize.dx) ||
(e_config->border_keyboard.resize.dy != cfdata->border_keyboard.resize.dx) ||
(e_config->transient.move != cfdata->transient.move) ||
(e_config->transient.resize != cfdata->transient.resize) ||
(e_config->transient.raise != cfdata->transient.raise) ||
@ -164,9 +161,7 @@ _basic_check_changed(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfd
(e_config->maximize_policy != (cfdata->maximize_policy | cfdata->maximize_direction)) ||
(e_config->allow_manip != cfdata->maximized_allow_manip) ||
(e_config->border_fix_on_shelf_toggle != cfdata->border_fix_on_shelf_toggle) ||
(e_config->allow_above_fullscreen != cfdata->allow_above_fullscreen) ||
(e_config->no_state_hidden_desktop == cfdata->state_hidden_desktop)
);
(e_config->allow_above_fullscreen != cfdata->allow_above_fullscreen));
}
static Evas_Object *
@ -272,9 +267,6 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
ow = e_widget_check_add(evas, _("Adjust windows on shelf hide"),
&(cfdata->border_fix_on_shelf_toggle));
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
ow = e_widget_check_add(evas, _("Set hidden state when not on current desktop"),
&(cfdata->state_hidden_desktop));
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Automatic"), ol,
1, 1, 1, 0, 0.0, 0.0);

View File

@ -47,7 +47,7 @@ Comment[de]=Drahtlose und kabelgebundene Nezwerke als Nutzer verwalten
Comment[eo]=Por kontroli sendratajn kaj dratajn retojn kiel uzanto.
Comment[es]=Controle las redes inalámbricas o cableadas como usuario.
Comment[fi]=Ohjaa Wifi- ja ethernetverkkoja tavallisena käyttäjänä.
Comment[fr]=Permet de contrôler les réseaux Wi-Fi et câblés via Connman.
Comment[fr]=Permet de contrôler les réseaux Wifi et câblés en tant qu'utilisateur.
Comment[gl]=Controle as redes sen fíos ou cableadas como usuario.
Comment[hu]=Wifi és vezetékes hálózatok kezelését teszi lehetővé.
Comment[it]=Controlla le reti wireless e cablate come utente.

View File

@ -1,16 +0,0 @@
//
// Created by raffaele on 01/05/19.
//
#ifndef E_GADGET_CONVERTIBLE_IIO_SENSOR_ACCELEROMETER_H
#define E_GADGET_CONVERTIBLE_IIO_SENSOR_ACCELEROMETER_H
// Those costants are the possible states for the orientation of the accelerometer.
#define ACCELEROMETER_ORIENTATION_UNDEFINED "undefined"
#define ACCELEROMETER_ORIENTATION_NORMAL "normal"
#define ACCELEROMETER_ORIENTATION_LEFT "left-up"
#define ACCELEROMETER_ORIENTATION_RIGHT "right-up"
#define ACCELEROMETER_ORIENTATION_BOTTOM "bottom-up"
#endif //E_GADGET_CONVERTIBLE_IIO_SENSOR_ACCELEROMETER_H

View File

@ -1,22 +0,0 @@
//
// Created by raffaele on 29/05/19.
//
#ifndef E_GADGET_CONVERTIBLE_CONVERTIBLE_LOGGING_H
#define E_GADGET_CONVERTIBLE_CONVERTIBLE_LOGGING_H
#undef CRIT
#undef ERR
#undef WARN
#undef INF
#undef DBG
extern int _convertible_log_dom;
#define CRIT(...) EINA_LOG_DOM_CRIT(_convertible_log_dom, __VA_ARGS__)
#define ERR(...) EINA_LOG_DOM_ERR(_convertible_log_dom, __VA_ARGS__)
#define WARN(...) EINA_LOG_DOM_WARN(_convertible_log_dom, __VA_ARGS__)
#define INF(...) EINA_LOG_DOM_INFO(_convertible_log_dom, __VA_ARGS__)
#define DBG(...) EINA_LOG_DOM_DBG(_convertible_log_dom, __VA_ARGS__)
#endif //E_GADGET_CONVERTIBLE_CONVERTIBLE_LOGGING_H

View File

@ -1,495 +0,0 @@
//
// Created by raffaele on 01/05/19.
//
//#include <Ecore_X.h>
#include "convertible_logging.h"
#include "accelerometer-orientation.h"
#include "dbus_acceleration.h"
#include "e_mod_main.h"
#include "input_rotation.h"
static DbusAccelerometer* accelerometer_dbus;
static int
_convertible_rotation_get(const screen_rotation orientation)
{
switch (orientation)
{
case NORMAL: return 0;
case LEFT_UP: return 90;
case FLIPPED: return 180;
case RIGHT_UP: return 270;
default: return 0;
}
}
static const float *
_get_matrix_rotation_transformation(int rotation)
{
const float *transformation;
switch (rotation) {
case 90:
transformation = MATRIX_ROTATION_90;
break;
case 180:
transformation = MATRIX_ROTATION_180;
break;
case 270:
transformation = MATRIX_ROTATION_270;
break;
default:
transformation = MATRIX_ROTATION_IDENTITY;
}
return transformation;
}
static int
_is_device_a_touch_pointer(int dev_counter, int num_properties, char **iterator)
{
// Looking for a device with either a libinput property for calibration or the old evdev Axlis labels property.
int is_correct_device = EINA_FALSE;
for (int i = 0; i < num_properties; i++)
{
if (strstr(*iterator, "libinput Calibration Matrix"))
is_correct_device = EINA_TRUE;
if (strstr(*iterator, "Axis Labels"))
{
int num_ret, unit_size_ret;
Ecore_X_Atom format_ret;
char *result = ecore_x_input_device_property_get(dev_counter, *iterator, &num_ret, &format_ret, &unit_size_ret);
if (result) {
// TODO Shall check for the value "Abs MT Position"
}
DBG("Looks like I found a device with calibration capabilities");
is_correct_device = EINA_TRUE;
free(result);
}
iterator++;
}
return is_correct_device;
}
static int
_fetch_X_device_input_number(void)
{
// I should get the touchscreen associated with the screen probably by looking at the classes of the input devices
// I need to submit my patch to add getters for other XIDeviceInfo fields, like raster mentioned in his commit.
const char *dev_name;
char **property_name;
int dev_num = ecore_x_input_device_num_get();
int dev_number = -1;
for (int dev_counter = 0; dev_counter < dev_num; dev_counter++)
{
dev_name = ecore_x_input_device_name_get(dev_counter);
// Less horrible hack that relies on the presence of a property containing the work Calibration
DBG("Found device with name %s", dev_name);
int num_properties;
property_name = ecore_x_input_device_properties_list(dev_counter, &num_properties);
DBG("Found %d properties", num_properties);
char **iterator = property_name;
int is_correct_device = _is_device_a_touch_pointer(dev_counter, num_properties, iterator);
if (is_correct_device == EINA_FALSE)
continue;
iterator = property_name;
for (int i = 0; i < num_properties; i++)
{
if (!strcmp(*iterator, CTM_name))
{
dev_number = dev_counter;
DBG("Setting device: %d", dev_number);
break;
}
iterator++;
}
}
return dev_number;
}
/**
* Fetch a screen from its ID and rotate it according to the rotation parameter
* @param randr_id The randr2 id
* @param rotation The expected rotation
*/
static void
_fetch_and_rotate_screen(const char* randr_id, screen_rotation orientation)
{
DBG("Working on screen %s", randr_id);
E_Randr2_Screen *rotatable_screen = e_randr2_screen_id_find(randr_id);
if (rotatable_screen == NULL)
{
DBG("Failed to load screen for id %s", randr_id);
return;
}
E_Config_Randr2_Screen *screen_randr_cfg = e_randr2_config_screen_find(rotatable_screen, e_randr2_cfg);
if (screen_randr_cfg == NULL)
{
DBG("Failed to load screen configuration for id %s", randr_id);
return;
}
int rotation = _convertible_rotation_get(orientation);
DBG("Screen %s is going to be rotated to %d", randr_id, rotation);
if (rotation == screen_randr_cfg->rotation)
{
WARN("Screen %s is already rotated to %d degrees", randr_id, rotation);
} else {
screen_randr_cfg->rotation = rotation;
e_randr2_config_apply();
DBG("Screen %s rotated to %d", randr_id, rotation);
int x_dev_num = _fetch_X_device_input_number();
if (x_dev_num == -1) {
ERR("Unable to find a pointer device with coordinate transformation capabilities");
return;
}
DBG("Rotating input number %d", x_dev_num);
int num_ret, unit_size_ret;
Ecore_X_Atom format_ret;
char *result = NULL;
TransformationMatrix *matrix = calloc(1, sizeof(TransformationMatrix));
if (matrix == NULL)
{
ERR("Unable to allocate memory for the transformation matrix");
return;
}
result = ecore_x_input_device_property_get(x_dev_num, CTM_name, &num_ret, &format_ret, &unit_size_ret);
if (result)
{
DBG("Device with coordinates transformation matrix");
// format_ret of 116 -> ECORE_X_ATOM_FLOAT
// num_ret of 9 -> 9 (float) to read
// unit_size_ret of 32 -> each float is 32 bits
memcpy(matrix->values, result, sizeof(matrix->values));
const float * rotation_matrix_2d = _get_matrix_rotation_transformation(rotation);
memcpy(matrix->values, rotation_matrix_2d, 6 * sizeof(*rotation_matrix_2d));
ecore_x_input_device_property_set(x_dev_num, CTM_name, matrix->values, num_ret, format_ret, unit_size_ret);
DBG("Input device %d rotated to %d", x_dev_num, rotation);
} else {
ERR("Unable to fetch coordinates transformation matrix for device %d", x_dev_num);
}
free(result);
free(matrix);
}
}
/**
* Helper to get the interface
* */
static Eldbus_Proxy *
_get_dbus_interface(const char *IFACE)
{
DBG("Working on interface: %s", IFACE);
Eldbus_Connection *conn;
Eldbus_Object *obj;
Eldbus_Proxy *sensor_proxy;
conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SYSTEM);
if (!conn)
{
ERR("Error: could not get system bus");
return NULL;
}
obj = eldbus_object_get(conn, EFL_DBUS_ACC_BUS, EFL_DBUS_ACC_PATH);
if (!obj)
{
ERR("Error: could not get object");
return NULL;
}
sensor_proxy = eldbus_proxy_get(obj, IFACE);
if (!sensor_proxy)
{
ERR("Error: could not get proxy for interface %s", IFACE);
return NULL;
}
return sensor_proxy;
}
/**
* Helper function to extract ta boolean property from the message
* @param msg The message coming from the get property invocation
* @param variant
* @param boolean_property_value The boolean property pointer where the value should be stored, if read
* @return
*/
static Eina_Bool
_access_bool_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant, Eina_Bool *boolean_property_value)
{
char *type;
Eina_Bool res = EINA_TRUE;
if (!eldbus_message_arguments_get(msg, "v", variant))
{
WARN("Error getting arguments.");
res = EINA_FALSE;
}
type = eldbus_message_iter_signature_get((*variant));
if (type == NULL)
{
WARN("Unable to get the type.");
res = EINA_FALSE;
return res;
}
if (type[0] != 'b')
{
WARN("Expected type is int.");
res = EINA_FALSE;
free(type);
return res;
}
if (type[1])
{
WARN("It is a complex type, not handle yet.");
res = EINA_FALSE;
}
if (!eldbus_message_iter_arguments_get((*variant), "b", boolean_property_value))
{
WARN("error in eldbus_message_iter_arguments_get()");
res = EINA_FALSE;
}
free(type);
return res;
}
/**
* Callback definition to handle the execution of the ReleaseAccelerometer() method of DBUS
* interface net.hadess.SensorProxy
* @param data not used
* @param msg The message
* @param pending
*/
static void
_on_accelerometer_released(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
{
const char *errname, *errmsg;
INF("Going to release the accelerometer_dbus");
if (eldbus_message_error_get(msg, &errname, &errmsg))
{
ERR("Error: %s %s", errname, errmsg);
return;
}
INF("Accelerometer released");
}
/**
* Callback definition to handle the execution of the ClaimAccelerometer() method of DBUS
* interface net.hadess.SensorProxy
* @param data not used
* @param msg The message
* @param pending
*/
static void
_on_accelerometer_claimed(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
{
const char *errname, *errmsg;
INF("Going to claim the accelerometer_dbus");
if (eldbus_message_error_get(msg, &errname, &errmsg))
{
ERR("Error: %s %s", errname, errmsg);
return;
}
INF("Accelerometer claimed");
}
/**
* Callback definition to handle the request of the hasAccelerometer property of DBUS interface net.hadess.SensorProxy
* @param data DbusAccelerometer
* @param msg The message
* @param pending
*/
static void
_on_has_accelerometer(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
{
const char *errname, *errmsg;
Eina_Bool has_accelerometer = EINA_FALSE;
Eldbus_Message_Iter *variant = NULL;
if (eldbus_message_error_get(msg, &errname, &errmsg))
{
ERR("Error: %s %s", errname, errmsg);
}
_access_bool_property(msg, &variant, &has_accelerometer);
DbusAccelerometer *accelerometer = data;
accelerometer->has_accelerometer = has_accelerometer;
DBG("Has Accelerometer: %d", accelerometer->has_accelerometer);
}
DbusAccelerometer*
sensor_proxy_init(void)
{
// Initialise DBUS component
if (accelerometer_dbus)
{
INF("We already have a struct filled");
return accelerometer_dbus;
}
accelerometer_dbus = calloc(1, sizeof(DbusAccelerometer));
EINA_SAFETY_ON_NULL_RETURN_VAL(accelerometer_dbus, NULL);
// The next line is probably redundant
accelerometer_dbus->orientation = UNDEFINED;
INF("Getting dbus interfaces");
accelerometer_dbus->sensor_proxy = _get_dbus_interface(EFL_DBUS_ACC_IFACE);
accelerometer_dbus->sensor_proxy_properties = _get_dbus_interface(ELDBUS_FDO_INTERFACE_PROPERTIES);
if (accelerometer_dbus->sensor_proxy == NULL)
{
ERR("Unable to get the proxy for interface %s", EFL_DBUS_ACC_IFACE);
return accelerometer_dbus;
}
accelerometer_dbus->pending_has_orientation = eldbus_proxy_property_get(accelerometer_dbus->sensor_proxy,
"HasAccelerometer", _on_has_accelerometer,
accelerometer_dbus);
if (!accelerometer_dbus->pending_has_orientation)
{
ERR("Error: could not get property HasAccelerometer");
}
// Claim the accelerometer_dbus
accelerometer_dbus->pending_acc_claim = eldbus_proxy_call(accelerometer_dbus->sensor_proxy, "ClaimAccelerometer",
_on_accelerometer_claimed, accelerometer_dbus, -1, "");
if (!accelerometer_dbus->pending_acc_claim)
{
ERR("Error: could not call ClaimAccelerometer");
}
return accelerometer_dbus;
}
void
sensor_proxy_shutdown(void)
{
INF("Removing signal handler dbus_property_changed_sh");
eldbus_signal_handler_del(accelerometer_dbus->dbus_property_changed_sh);
// TODO Should to this and wait for the release before continuing
INF("Freeing convertible resources");
accelerometer_dbus->pending_acc_crelease = eldbus_proxy_call(accelerometer_dbus->sensor_proxy, "ReleaseAccelerometer", _on_accelerometer_released, accelerometer_dbus, -1, "");
if (accelerometer_dbus)
{
e_object_del(E_OBJECT(accelerometer_dbus));
free(accelerometer_dbus);
accelerometer_dbus = NULL;
}
DBG("Shutting down ELDBUS");
eldbus_shutdown();
}
/**
* Helper function to extract ta string property from the message
* @param msg The message coming from the get property invocation
* @param variant
* @return Enum specifying the orientation. UNDEFINED by default
*/
static screen_rotation
_access_string_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant)
{
screen_rotation rotation = UNDEFINED;
char *type = NULL;
if (!eldbus_message_arguments_get(msg, "v", variant))
{
WARN("Error getting arguments.");
}
type = eldbus_message_iter_signature_get((*variant));
if (type == NULL)
{
WARN("Unable to get the type.");
return rotation;
}
if (type[0] != 's')
{
WARN("Expected type is string(s).");
free(type);
return rotation;
}
if (type[1])
{
WARN("It is a complex type, not handle yet.");
}
const char *string_property_value;
if (!eldbus_message_iter_arguments_get(*variant, "s", &string_property_value))
{
WARN("error in eldbus_message_iter_arguments_get()");
}
if (strcmp(ACCELEROMETER_ORIENTATION_RIGHT, string_property_value) == 0)
rotation = RIGHT_UP;
if (strcmp(ACCELEROMETER_ORIENTATION_LEFT, string_property_value) == 0)
rotation = LEFT_UP;
if (strcmp(ACCELEROMETER_ORIENTATION_BOTTOM, string_property_value) == 0)
rotation = FLIPPED;
if (strcmp(ACCELEROMETER_ORIENTATION_NORMAL, string_property_value) == 0)
rotation = NORMAL;
free(type);
return rotation;
}
void
on_accelerometer_orientation(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
{
INF("New orientation received");
Instance *inst = data;
if (inst->locked_position == EINA_TRUE)
{
WARN("Locked position. Ignoring rotation");
return;
}
const char *errname, *errmsg;
screen_rotation orientation;
Eldbus_Message_Iter *variant = NULL;
if (eldbus_message_error_get(msg, &errname, &errmsg))
{
ERR("Error: %s %s", errname, errmsg);
return;
}
orientation = _access_string_property(msg, &variant);
if (orientation == UNDEFINED)
{
INF("Failed to retrieve the orientation from dbus message");
return;
}
inst->accelerometer->orientation = orientation;
DBG("Current Orientation: %d", inst->accelerometer->orientation);
if (inst->randr2_ids == NULL)
ERR("Screen not set.");
else
{
Eina_List *l;
char *randr_id = NULL;
EINA_LIST_FOREACH(inst->randr2_ids, l, randr_id)
{
_fetch_and_rotate_screen(randr_id, orientation);
}
}
}

View File

@ -1,45 +0,0 @@
#include <Ecore.h>
#include <Elementary.h>
#include <e.h>
#ifndef EFL_DBUS_ACCELERATION
#define EFL_DBUS_ACCELERATION
#define EFL_DBUS_ACC_BUS "net.hadess.SensorProxy"
#define EFL_DBUS_ACC_PATH "/net/hadess/SensorProxy"
#define EFL_DBUS_ACC_IFACE "net.hadess.SensorProxy"
// This enum represents the 4 states of screen rotation plus UNDEFINED
typedef enum {UNDEFINED, NORMAL, RIGHT_UP, FLIPPED, LEFT_UP} screen_rotation;
typedef struct _DbusAccelerometer DbusAccelerometer;
struct _DbusAccelerometer
{
Eina_Bool has_accelerometer;
screen_rotation orientation;
Eldbus_Proxy *sensor_proxy, *sensor_proxy_properties;
Eldbus_Pending *pending_has_orientation, *pending_orientation, *pending_acc_claim, *pending_acc_crelease;
Eldbus_Signal_Handler *dbus_property_changed_sh;
};
/**
* Fetch the DBUS interfaces and fill the DbusAccelerometer struct
* */
DbusAccelerometer* sensor_proxy_init(void);
void sensor_proxy_shutdown(void);
void
on_has_accelerometer(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED);
/**
* Callback definition to handle the request of the accelerometer property of DBUS interface net.hadess.SensorProxy
* @param data DbusAccelerometer
* @param msg The message
* @param pending
*/
void
on_accelerometer_orientation(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED);
#endif

View File

@ -1,56 +0,0 @@
//
// Created by raffaele on 04/05/19.
//
#include "convertible_logging.h"
#include "e-gadget-convertible.h"
#include "e_mod_main.h"
static void
_update_instances(const Instance *current_instance)
{
Eina_List *l;
Instance *instance;
EINA_LIST_FOREACH(instances, l, instance)
{
if (current_instance != instance)
{
instance->locked_position = current_instance->locked_position;
if (instance->locked_position == EINA_TRUE)
edje_object_signal_emit(instance->o_button, "e,lock,rotation,icon", "convertible/tablet");
else
edje_object_signal_emit(instance->o_button, "e,unlock,rotation,icon", "convertible/tablet");
instance->disabled_keyboard = current_instance->disabled_keyboard;
if (instance->disabled_keyboard == EINA_TRUE)
edje_object_signal_emit(instance->o_button, "e,disable,keyboard,icon", "convertible/input");
else
edje_object_signal_emit(instance->o_button, "e,enable,keyboard,icon", "convertible/input");
}
}
}
void
_rotation_signal_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED,
const char *src EINA_UNUSED)
{
Instance *inst = data;
if (eina_str_has_prefix(sig, "e,unlock"))
inst->locked_position = EINA_FALSE;
if (eina_str_has_prefix(sig, "e,lock"))
inst->locked_position = EINA_TRUE;
_update_instances(inst);
}
void
_keyboard_signal_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED,
const char *src EINA_UNUSED)
{
Instance *inst = data;
if (eina_str_has_prefix(sig, "e,enable,keyboard"))
inst->disabled_keyboard = EINA_FALSE;
if (eina_str_has_prefix(sig, "e,disable,keyboard"))
inst->disabled_keyboard = EINA_TRUE;
_update_instances(inst);
}

Some files were not shown because too many files have changed in this diff Show More