From: Leif Middelschulte <leif.middelschulte@gmail.com>
patch for ecore-x xrandr 1.3 support - breaks previous api. final api change (i know about) before we go alpha. in to svn we go. SVN revision: 51109
This commit is contained in:
parent
0b9d6c7bb1
commit
935774e161
|
@ -62,6 +62,7 @@ e_startup.h \
|
|||
e_hints.h \
|
||||
e_signals.h \
|
||||
e_xinerama.h \
|
||||
e_randr.h \
|
||||
e_table.h \
|
||||
e_layout.h \
|
||||
e_test.h \
|
||||
|
@ -203,6 +204,7 @@ e_startup.c \
|
|||
e_hints.c \
|
||||
e_signals.c \
|
||||
e_xinerama.c \
|
||||
e_randr.c \
|
||||
e_table.c \
|
||||
e_layout.c \
|
||||
e_test.c \
|
||||
|
@ -358,7 +360,8 @@ enlightenment_sys_LDADD = @E_SYS_LIBS@
|
|||
|
||||
enlightenment_init_SOURCES = \
|
||||
e_init_main.c \
|
||||
e_xinerama.c
|
||||
e_xinerama.c \
|
||||
e_randr.c
|
||||
|
||||
enlightenment_init_LDADD = @E_INIT_LIBS@
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,6 +6,24 @@
|
|||
#define DEF_MENUCLICK 0.25
|
||||
#endif
|
||||
|
||||
typedef enum _Eet_Union
|
||||
{
|
||||
EET_SCREEN_INFO_11 = (int)((1 << 16) | 1),
|
||||
EET_SCREEN_INFO_12 = (int)((1 << 16) | 2),
|
||||
EET_SCREEN_INFO_13 = (int)((1 << 16) | 3),
|
||||
EET_UNKNOWN
|
||||
} Eet_Union;
|
||||
|
||||
struct {
|
||||
Eet_Union u;
|
||||
const char *name;
|
||||
} eet_mapping[] = {
|
||||
{ EET_SCREEN_INFO_11, "E_Config_Screen_11" },
|
||||
{ EET_SCREEN_INFO_12, "E_Config_Screen_12" },
|
||||
{ EET_SCREEN_INFO_12, "E_Config_Screen_13" },
|
||||
{ EET_UNKNOWN, NULL }
|
||||
};
|
||||
|
||||
EAPI E_Config *e_config = NULL;
|
||||
|
||||
static int _e_config_revisions = 0;
|
||||
|
@ -16,6 +34,8 @@ static void _e_config_free(E_Config *cfg);
|
|||
static Eina_Bool _e_config_cb_timer(void *data);
|
||||
static int _e_config_eet_close_handle(Eet_File *ef, char *file);
|
||||
static void _e_config_acpi_bindings_add(void);
|
||||
static const char * _eet_union_type_get(const void *data, Eina_Bool *unknow);
|
||||
static Eina_Bool _eet_union_type_set(const char *type, void *data, Eina_Bool unknow);
|
||||
|
||||
/* local subsystem globals */
|
||||
static int _e_config_save_block = 0;
|
||||
|
@ -44,6 +64,15 @@ static E_Config_DD *_e_config_shelf_edd = NULL;
|
|||
static E_Config_DD *_e_config_shelf_desk_edd = NULL;
|
||||
static E_Config_DD *_e_config_mime_icon_edd = NULL;
|
||||
static E_Config_DD *_e_config_syscon_action_edd = NULL;
|
||||
static E_Config_DD *_e_config_screen_size_edd = NULL;
|
||||
static E_Config_DD *_e_config_screen_size_mm_edd = NULL;
|
||||
static E_Config_DD *_e_config_eina_rectangle_edd = NULL;
|
||||
static E_Config_DD *_e_config_screen_info_edd = NULL;
|
||||
static E_Config_DD *_e_config_screen_restore_info_11_edd = NULL;
|
||||
static E_Config_DD *_e_config_screen_restore_info_12_edd = NULL;
|
||||
static E_Config_DD *_e_config_screen_output_restore_info_edd = NULL;
|
||||
static E_Config_DD *_e_config_screen_crtc_restore_info_edd = NULL;
|
||||
|
||||
|
||||
EAPI int E_EVENT_CONFIG_ICON_THEME = 0;
|
||||
EAPI int E_EVENT_CONFIG_MODE_CHANGED = 0;
|
||||
|
@ -54,12 +83,12 @@ _e_config_profile_name_get(Eet_File *ef)
|
|||
/* profile config exists */
|
||||
char *data, *s = NULL;
|
||||
int data_len = 0;
|
||||
|
||||
|
||||
data = eet_read(ef, "config", &data_len);
|
||||
if ((data) && (data_len > 0))
|
||||
{
|
||||
int ok = 1;
|
||||
|
||||
|
||||
for (s = data; s < (data + data_len); s++)
|
||||
{
|
||||
// if profile is not all ascii (valid printable ascii - no
|
||||
|
@ -97,7 +126,7 @@ e_config_init(void)
|
|||
if (_e_config_profile)
|
||||
/* if environment var set - use this profile name */
|
||||
_e_config_profile = strdup(_e_config_profile);
|
||||
else
|
||||
else
|
||||
{
|
||||
Eet_File *ef;
|
||||
char buf[4096];
|
||||
|
@ -114,7 +143,7 @@ e_config_init(void)
|
|||
if (!_e_config_profile)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
for (i =1; i <= _e_config_revisions; i++)
|
||||
{
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "config/profile.%i.cfg", i);
|
||||
|
@ -144,7 +173,7 @@ e_config_init(void)
|
|||
{
|
||||
/* no profile config - try other means */
|
||||
char *link = NULL;
|
||||
|
||||
|
||||
/* check symlink - if default is a symlink to another dir */
|
||||
e_prefix_data_concat_static(buf, "data/config/default");
|
||||
link = ecore_file_readlink(buf);
|
||||
|
@ -181,7 +210,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, orient, INT);
|
||||
E_CONFIG_VAL(D, T, autoscroll, UCHAR);
|
||||
E_CONFIG_VAL(D, T, resizable, UCHAR);
|
||||
|
||||
|
||||
_e_config_gadcon_edd = E_CONFIG_DD_NEW("E_Config_Gadcon", E_Config_Gadcon);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -199,7 +228,7 @@ e_config_init(void)
|
|||
#define D _e_config_shelf_desk_edd
|
||||
E_CONFIG_VAL(D, T, x, INT);
|
||||
E_CONFIG_VAL(D, T, y, INT);
|
||||
|
||||
|
||||
_e_config_shelf_edd = E_CONFIG_DD_NEW("E_Config_Shelf", E_Config_Shelf);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -234,7 +263,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, desk_x, INT);
|
||||
E_CONFIG_VAL(D, T, desk_y, INT);
|
||||
E_CONFIG_VAL(D, T, file, STR);
|
||||
|
||||
|
||||
_e_config_desktop_name_edd = E_CONFIG_DD_NEW("E_Config_Desktop_Name", E_Config_Desktop_Name);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -260,7 +289,7 @@ e_config_init(void)
|
|||
#define D _e_config_theme_edd
|
||||
E_CONFIG_VAL(D, T, category, STR);
|
||||
E_CONFIG_VAL(D, T, file, STR);
|
||||
|
||||
|
||||
_e_config_module_edd = E_CONFIG_DD_NEW("E_Config_Module", E_Config_Module);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -271,7 +300,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, delayed, UCHAR);
|
||||
E_CONFIG_VAL(D, T, priority, INT);
|
||||
|
||||
_e_config_font_default_edd = E_CONFIG_DD_NEW("E_Font_Default",
|
||||
_e_config_font_default_edd = E_CONFIG_DD_NEW("E_Font_Default",
|
||||
E_Font_Default);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -281,7 +310,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, font, STR);
|
||||
E_CONFIG_VAL(D, T, size, INT);
|
||||
|
||||
_e_config_font_fallback_edd = E_CONFIG_DD_NEW("E_Font_Fallback",
|
||||
_e_config_font_fallback_edd = E_CONFIG_DD_NEW("E_Font_Fallback",
|
||||
E_Font_Fallback);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -289,7 +318,7 @@ e_config_init(void)
|
|||
#define D _e_config_font_fallback_edd
|
||||
E_CONFIG_VAL(D, T, name, STR);
|
||||
|
||||
_e_config_bindings_mouse_edd = E_CONFIG_DD_NEW("E_Config_Binding_Mouse",
|
||||
_e_config_bindings_mouse_edd = E_CONFIG_DD_NEW("E_Config_Binding_Mouse",
|
||||
E_Config_Binding_Mouse);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -302,7 +331,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, button, UCHAR);
|
||||
E_CONFIG_VAL(D, T, any_mod, UCHAR);
|
||||
|
||||
_e_config_bindings_key_edd = E_CONFIG_DD_NEW("E_Config_Binding_Key",
|
||||
_e_config_bindings_key_edd = E_CONFIG_DD_NEW("E_Config_Binding_Key",
|
||||
E_Config_Binding_Key);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -315,7 +344,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, params, STR);
|
||||
E_CONFIG_VAL(D, T, any_mod, UCHAR);
|
||||
|
||||
_e_config_bindings_edge_edd = E_CONFIG_DD_NEW("E_Config_Binding_Edge",
|
||||
_e_config_bindings_edge_edd = E_CONFIG_DD_NEW("E_Config_Binding_Edge",
|
||||
E_Config_Binding_Edge);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -329,7 +358,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, any_mod, UCHAR);
|
||||
E_CONFIG_VAL(D, T, delay, FLOAT);
|
||||
|
||||
_e_config_bindings_signal_edd = E_CONFIG_DD_NEW("E_Config_Binding_Signal",
|
||||
_e_config_bindings_signal_edd = E_CONFIG_DD_NEW("E_Config_Binding_Signal",
|
||||
E_Config_Binding_Signal);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -343,7 +372,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, action, STR);
|
||||
E_CONFIG_VAL(D, T, params, STR);
|
||||
|
||||
_e_config_bindings_wheel_edd = E_CONFIG_DD_NEW("E_Config_Binding_Wheel",
|
||||
_e_config_bindings_wheel_edd = E_CONFIG_DD_NEW("E_Config_Binding_Wheel",
|
||||
E_Config_Binding_Wheel);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -357,7 +386,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, action, STR);
|
||||
E_CONFIG_VAL(D, T, params, STR);
|
||||
|
||||
_e_config_bindings_acpi_edd = E_CONFIG_DD_NEW("E_Config_Binding_Acpi",
|
||||
_e_config_bindings_acpi_edd = E_CONFIG_DD_NEW("E_Config_Binding_Acpi",
|
||||
E_Config_Binding_Acpi);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -451,7 +480,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, b3, INT);
|
||||
E_CONFIG_VAL(D, T, a3, INT);
|
||||
|
||||
_e_config_mime_icon_edd = E_CONFIG_DD_NEW("E_Config_Mime_Icon",
|
||||
_e_config_mime_icon_edd = E_CONFIG_DD_NEW("E_Config_Mime_Icon",
|
||||
E_Config_Mime_Icon);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -472,6 +501,95 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, icon, STR);
|
||||
E_CONFIG_VAL(D, T, is_main, INT);
|
||||
|
||||
_e_config_screen_size_edd = E_CONFIG_DD_NEW("Ecore_X_Randr_Screen_Size", Ecore_X_Randr_Screen_Size);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T Ecore_X_Randr_Screen_Size
|
||||
#define D _e_config_screen_size_edd
|
||||
E_CONFIG_VAL(D, T, width, INT);
|
||||
E_CONFIG_VAL(D, T, height, INT);
|
||||
E_CONFIG_VAL(D, T, width, INT);
|
||||
E_CONFIG_VAL(D, T, height, INT);
|
||||
|
||||
_e_config_screen_size_mm_edd = E_CONFIG_DD_NEW("Ecore_X_Randr_Screen_Size_MM", Ecore_X_Randr_Screen_Size_MM);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T Ecore_X_Randr_Screen_Size_MM
|
||||
#define D _e_config_screen_size_mm_edd
|
||||
E_CONFIG_VAL(D, T, width, INT);
|
||||
E_CONFIG_VAL(D, T, height, INT);
|
||||
E_CONFIG_VAL(D, T, width_mm, INT);
|
||||
E_CONFIG_VAL(D, T, height_mm, INT);
|
||||
|
||||
_e_config_screen_restore_info_11_edd = E_CONFIG_DD_NEW("E_Randr_Screen_Restore_Info_11", E_Randr_Screen_Restore_Info_11);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T E_Randr_Screen_Restore_Info_11
|
||||
#define D _e_config_screen_restore_info_11_edd
|
||||
E_CONFIG_SUB(D, T, size, _e_config_screen_size_edd);
|
||||
E_CONFIG_VAL(D, T, orientation, INT);
|
||||
E_CONFIG_VAL(D, T, refresh_rate, SHORT);
|
||||
|
||||
_e_config_eina_rectangle_edd = E_CONFIG_DD_NEW("Eina_Rectangle", Eina_Rectangle);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T Eina_Rectangle
|
||||
#define D _e_config_eina_rectangle_edd
|
||||
E_CONFIG_VAL(D, T, x, INT);
|
||||
E_CONFIG_VAL(D, T, y, INT);
|
||||
E_CONFIG_VAL(D, T, w, INT);
|
||||
E_CONFIG_VAL(D, T, h, INT);
|
||||
|
||||
_e_config_screen_output_restore_info_edd = E_CONFIG_DD_NEW("E_Randr_Output_Restore_Info", Eina_Rectangle);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T E_Randr_Output_Restore_Info
|
||||
#define D _e_config_screen_output_restore_info_edd
|
||||
E_CONFIG_VAL(D, T, edid, STR);
|
||||
E_CONFIG_VAL(D, T, backlight_level, DOUBLE);
|
||||
|
||||
_e_config_screen_crtc_restore_info_edd = E_CONFIG_DD_NEW("E_Randr_Crtc_Restore_Info", E_Randr_Crtc_Restore_Info);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T E_Randr_Crtc_Restore_Info
|
||||
#define D _e_config_screen_crtc_restore_info_edd
|
||||
E_CONFIG_SUB(D, T, geometry, _e_config_eina_rectangle_edd);
|
||||
E_CONFIG_LIST(D, T, outputs, _e_config_screen_output_restore_info_edd);
|
||||
E_CONFIG_VAL(D, T, orientation, INT);
|
||||
|
||||
_e_config_screen_restore_info_12_edd = E_CONFIG_DD_NEW("E_Randr_Screen_Restore_Info_12", E_Randr_Screen_Restore_Info_12);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T E_Randr_Screen_Restore_Info_12
|
||||
#define D _e_config_screen_restore_info_12_edd
|
||||
E_CONFIG_LIST(D, T, crtcs, _e_config_screen_crtc_restore_info_edd);
|
||||
E_CONFIG_VAL(D, T, output_policy, INT);
|
||||
E_CONFIG_VAL(D, T, alignment, INT);
|
||||
|
||||
#undef T
|
||||
#undef D
|
||||
#define T E_Randr_Screen_Restore_Info
|
||||
#define D _e_config_screen_info_edd
|
||||
Eet_Data_Descriptor_Class eddc;
|
||||
Eet_Data_Descriptor *unified, *edd_11_info, *edd_12_info;
|
||||
EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, T);
|
||||
D = eet_data_descriptor_stream_new(&eddc);
|
||||
eddc.version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
|
||||
eddc.func.type_get = _eet_union_type_get;
|
||||
eddc.func.type_set = _eet_union_type_set;
|
||||
//virtual types to work around EET's inability to differentiate when it
|
||||
//comes to pointers (a->b) vs. values (a.b) in union mappings
|
||||
edd_11_info = E_CONFIG_DD_NEW("E_Randr_Screen_Restore_Info_11_Struct", E_Randr_Screen_Restore_Info_11);
|
||||
E_CONFIG_SUB(edd_11_info, E_Randr_Screen_Restore_Info_Union, restore_info_11, _e_config_screen_restore_info_11_edd);
|
||||
edd_12_info = E_CONFIG_DD_NEW("E_Randr_Screen_Restore_Info_12_Struct", E_Randr_Screen_Restore_Info_12);
|
||||
E_CONFIG_LIST(edd_12_info, E_Randr_Screen_Restore_Info_Union, restore_info_12, _e_config_screen_restore_info_12_edd);
|
||||
unified = eet_data_descriptor_stream_new(&eddc);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING(unified, "E_Config_Screen_11", edd_11_info);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING(unified, "E_Config_Screen_12", edd_12_info);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING(unified, "E_Config_Screen_13", edd_12_info);
|
||||
EET_DATA_DESCRIPTOR_ADD_UNION(D, T, "E_Randr_Screen_Restore_Info_Union", rrvd_restore_info, randr_version, unified);
|
||||
E_CONFIG_VAL(D, T, randr_version, INT);
|
||||
|
||||
_e_config_edd = E_CONFIG_DD_NEW("E_Config", E_Config);
|
||||
#undef T
|
||||
#undef D
|
||||
|
@ -631,12 +749,8 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, desklock_ask_presentation, UCHAR);
|
||||
E_CONFIG_VAL(D, T, desklock_ask_presentation_timeout, DOUBLE);
|
||||
|
||||
E_CONFIG_VAL(D, T, display_res_restore, INT);
|
||||
E_CONFIG_VAL(D, T, display_res_width, INT);
|
||||
E_CONFIG_VAL(D, T, display_res_height, INT);
|
||||
E_CONFIG_VAL(D, T, display_res_hz, INT);
|
||||
E_CONFIG_VAL(D, T, display_res_rotation, INT);
|
||||
|
||||
E_CONFIG_LIST(D, T, screen_info, _e_config_screen_info_edd);
|
||||
|
||||
E_CONFIG_VAL(D, T, screensaver_enable, INT);
|
||||
E_CONFIG_VAL(D, T, screensaver_timeout, INT);
|
||||
E_CONFIG_VAL(D, T, screensaver_interval, INT);
|
||||
|
@ -652,7 +766,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, dpms_standby_timeout, INT);
|
||||
E_CONFIG_VAL(D, T, dpms_suspend_timeout, INT);
|
||||
E_CONFIG_VAL(D, T, dpms_off_timeout, INT);
|
||||
|
||||
|
||||
E_CONFIG_VAL(D, T, clientlist_group_by, INT);
|
||||
E_CONFIG_VAL(D, T, clientlist_include_all_zones, INT);
|
||||
E_CONFIG_VAL(D, T, clientlist_separate_with, INT);
|
||||
|
@ -661,7 +775,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, clientlist_warp_to_iconified_desktop, INT);
|
||||
E_CONFIG_VAL(D, T, clientlist_limit_caption_len, INT);
|
||||
E_CONFIG_VAL(D, T, clientlist_max_caption_len, INT);
|
||||
|
||||
|
||||
E_CONFIG_VAL(D, T, mouse_hand, INT);
|
||||
E_CONFIG_VAL(D, T, mouse_accel_numerator, INT);
|
||||
E_CONFIG_VAL(D, T, mouse_accel_denominator, INT);
|
||||
|
@ -674,14 +788,14 @@ e_config_init(void)
|
|||
|
||||
E_CONFIG_VAL(D, T, icon_theme, STR);
|
||||
E_CONFIG_VAL(D, T, icon_theme_overrides, UCHAR);
|
||||
|
||||
|
||||
E_CONFIG_VAL(D, T, desk_flip_animate_mode, INT);
|
||||
E_CONFIG_VAL(D, T, desk_flip_animate_interpolation, INT);
|
||||
E_CONFIG_VAL(D, T, desk_flip_animate_time, DOUBLE);
|
||||
E_CONFIG_VAL(D, T, desk_flip_pan_bg, UCHAR);
|
||||
E_CONFIG_VAL(D, T, desk_flip_pan_x_axis_factor, DOUBLE);
|
||||
E_CONFIG_VAL(D, T, desk_flip_pan_y_axis_factor, DOUBLE);
|
||||
|
||||
|
||||
E_CONFIG_VAL(D, T, wallpaper_import_last_dev, STR);
|
||||
E_CONFIG_VAL(D, T, wallpaper_import_last_path, STR);
|
||||
|
||||
|
@ -693,7 +807,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, wallpaper_grad_c2_b, INT);
|
||||
|
||||
E_CONFIG_VAL(D, T, theme_default_border_style, STR);
|
||||
|
||||
|
||||
E_CONFIG_LIST(D, T, mime_icons, _e_config_mime_icon_edd); /**/
|
||||
|
||||
E_CONFIG_VAL(D, T, desk_auto_switch, INT);
|
||||
|
@ -702,7 +816,7 @@ e_config_init(void)
|
|||
|
||||
E_CONFIG_VAL(D, T, menu_favorites_show, INT);
|
||||
E_CONFIG_VAL(D, T, menu_apps_show, INT);
|
||||
|
||||
|
||||
E_CONFIG_VAL(D, T, ping_clients_interval, INT);
|
||||
E_CONFIG_VAL(D, T, cache_flush_poll_interval, INT);
|
||||
|
||||
|
@ -710,7 +824,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, thumbscroll_threshhold, INT);
|
||||
E_CONFIG_VAL(D, T, thumbscroll_momentum_threshhold, DOUBLE);
|
||||
E_CONFIG_VAL(D, T, thumbscroll_friction, DOUBLE);
|
||||
|
||||
|
||||
E_CONFIG_VAL(D, T, dbus_desktop, INT);
|
||||
E_CONFIG_VAL(D, T, dbus_auto_mount, INT);
|
||||
E_CONFIG_VAL(D, T, dbus_auto_open, INT);
|
||||
|
@ -748,9 +862,9 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, exec.expire_timeout, DOUBLE);
|
||||
E_CONFIG_VAL(D, T, exec.show_run_dialog, UCHAR);
|
||||
E_CONFIG_VAL(D, T, exec.show_exit_dialog, UCHAR);
|
||||
|
||||
|
||||
e_config_load();
|
||||
|
||||
|
||||
e_config_save_queue();
|
||||
return 1;
|
||||
}
|
||||
|
@ -780,6 +894,7 @@ e_config_shutdown(void)
|
|||
E_CONFIG_DD_FREE(_e_config_shelf_desk_edd);
|
||||
E_CONFIG_DD_FREE(_e_config_mime_icon_edd);
|
||||
E_CONFIG_DD_FREE(_e_config_syscon_action_edd);
|
||||
E_CONFIG_DD_FREE(_e_config_screen_info_edd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -787,12 +902,12 @@ EAPI void
|
|||
e_config_load(void)
|
||||
{
|
||||
E_Config *tcfg = NULL;
|
||||
|
||||
|
||||
e_config = e_config_domain_load("e", _e_config_edd);
|
||||
if (e_config)
|
||||
{
|
||||
int reload = 0;
|
||||
|
||||
|
||||
/* major version change - that means wipe and restart */
|
||||
if ((e_config->config_version >> 16) < E_CONFIG_FILE_EPOCH)
|
||||
{
|
||||
|
@ -871,7 +986,7 @@ e_config_load(void)
|
|||
if (!tcfg)
|
||||
{
|
||||
const char *pprofile;
|
||||
|
||||
|
||||
pprofile = e_config_profile_get();
|
||||
if (pprofile) pprofile = eina_stringshare_add(pprofile);
|
||||
e_config_profile_set("standard");
|
||||
|
@ -884,7 +999,7 @@ e_config_load(void)
|
|||
if (!tcfg)
|
||||
{
|
||||
E_Action *a;
|
||||
|
||||
|
||||
e_config_profile_set("default");
|
||||
e_config_profile_del(e_config_profile_get());
|
||||
e_config_save_block_set(1);
|
||||
|
@ -907,11 +1022,11 @@ e_config_load(void)
|
|||
COPYVAL(thumbscroll_momentum_threshhold);
|
||||
COPYVAL(thumbscroll_friction);
|
||||
IFCFGEND;
|
||||
|
||||
|
||||
IFCFG(0x0125);
|
||||
COPYVAL(mouse_hand);
|
||||
IFCFGEND;
|
||||
|
||||
|
||||
IFCFG(0x0126);
|
||||
COPYVAL(border_keyboard.timeout);
|
||||
COPYVAL(border_keyboard.move.dx);
|
||||
|
@ -919,7 +1034,7 @@ e_config_load(void)
|
|||
COPYVAL(border_keyboard.resize.dx);
|
||||
COPYVAL(border_keyboard.resize.dy);
|
||||
IFCFGEND;
|
||||
|
||||
|
||||
IFCFG(0x0127);
|
||||
COPYVAL(scale.min);
|
||||
COPYVAL(scale.max);
|
||||
|
@ -928,24 +1043,24 @@ e_config_load(void)
|
|||
COPYVAL(scale.use_dpi);
|
||||
COPYVAL(scale.use_custom);
|
||||
IFCFGEND;
|
||||
|
||||
|
||||
IFCFG(0x0128);
|
||||
COPYVAL(show_cursor);
|
||||
COPYVAL(idle_cursor);
|
||||
IFCFGEND;
|
||||
|
||||
|
||||
IFCFG(0x0129);
|
||||
COPYSTR(default_system_menu);
|
||||
IFCFGEND;
|
||||
|
||||
|
||||
IFCFG(0x012a);
|
||||
COPYVAL(desklock_start_locked);
|
||||
IFCFGEND;
|
||||
|
||||
|
||||
IFCFG(0x012b);
|
||||
COPYVAL(cfgdlg_normal_wins);
|
||||
IFCFGEND;
|
||||
|
||||
|
||||
IFCFG(0x012c);
|
||||
COPYVAL(syscon.main.icon_size);
|
||||
COPYVAL(syscon.secondary.icon_size);
|
||||
|
@ -954,15 +1069,15 @@ e_config_load(void)
|
|||
COPYVAL(syscon.do_input);
|
||||
COPYPTR(syscon.actions);
|
||||
IFCFGEND;
|
||||
|
||||
|
||||
IFCFG(0x012d);
|
||||
COPYVAL(priority);
|
||||
IFCFGEND;
|
||||
|
||||
|
||||
IFCFG(0x012e);
|
||||
COPYVAL(fullscreen_flip);
|
||||
IFCFGEND;
|
||||
|
||||
|
||||
IFCFG(0x012f);
|
||||
COPYVAL(icon_theme_overrides);
|
||||
IFCFGEND;
|
||||
|
@ -1008,7 +1123,7 @@ e_config_load(void)
|
|||
COPYVAL(geometry_auto_move);
|
||||
IFCFGEND;
|
||||
|
||||
e_config->config_version = E_CONFIG_FILE_VERSION;
|
||||
e_config->config_version = E_CONFIG_FILE_VERSION;
|
||||
_e_config_free(tcfg);
|
||||
}
|
||||
|
||||
|
@ -1044,8 +1159,8 @@ e_config_load(void)
|
|||
E_CONFIG_LIMIT(e_config->desk_resist, 0, 100);
|
||||
E_CONFIG_LIMIT(e_config->window_resist, 0, 100);
|
||||
E_CONFIG_LIMIT(e_config->gadget_resist, 0, 100);
|
||||
E_CONFIG_LIMIT(e_config->geometry_auto_move, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->geometry_auto_resize_limit, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->geometry_auto_move, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->geometry_auto_resize_limit, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->winlist_warp_while_selecting, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->winlist_warp_at_end, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->winlist_warp_speed, 0.0, 1.0);
|
||||
|
@ -1102,11 +1217,6 @@ e_config_load(void)
|
|||
E_CONFIG_LIMIT(e_config->desklock_use_custom_desklock, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->desklock_ask_presentation, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->desklock_ask_presentation_timeout, 1.0, 300.0);
|
||||
E_CONFIG_LIMIT(e_config->display_res_restore, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->display_res_width, 1, 8192);
|
||||
E_CONFIG_LIMIT(e_config->display_res_height, 1, 8192);
|
||||
E_CONFIG_LIMIT(e_config->display_res_hz, 0, 250);
|
||||
E_CONFIG_LIMIT(e_config->display_res_rotation, 0, 0xff);
|
||||
E_CONFIG_LIMIT(e_config->border_raise_on_mouse_action, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->border_raise_on_focus, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->desk_flip_wrap, 0, 1);
|
||||
|
@ -1142,7 +1252,7 @@ e_config_load(void)
|
|||
E_CONFIG_LIMIT(e_config->mouse_hand, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->clientlist_limit_caption_len, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->clientlist_max_caption_len, 2, E_CLIENTLIST_MAX_CAPTION_LEN);
|
||||
|
||||
|
||||
E_CONFIG_LIMIT(e_config->mouse_accel_numerator, 1, 10);
|
||||
E_CONFIG_LIMIT(e_config->mouse_accel_denominator, 1, 10);
|
||||
E_CONFIG_LIMIT(e_config->mouse_accel_threshold, 1, 10);
|
||||
|
@ -1158,7 +1268,7 @@ e_config_load(void)
|
|||
E_CONFIG_LIMIT(e_config->exec.expire_timeout, 0.1, 1000);
|
||||
E_CONFIG_LIMIT(e_config->exec.show_run_dialog, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->exec.show_exit_dialog, 0, 1);
|
||||
|
||||
|
||||
/* FIXME: disabled auto apply because it causes problems */
|
||||
e_config->cfgdlg_auto_apply = 0;
|
||||
/* FIXME: desklock personalized password id disabled for security reasons */
|
||||
|
@ -1375,7 +1485,7 @@ e_config_domain_load(const char *domain, E_Config_DD *edd)
|
|||
eet_close(ef);
|
||||
if (data) return data;
|
||||
}
|
||||
|
||||
|
||||
for (i =1; i <= _e_config_revisions; i++)
|
||||
{
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "config/%s/%s.%i.cfg",
|
||||
|
@ -1425,17 +1535,17 @@ e_config_profile_save(void)
|
|||
ef = eet_open(buf2, EET_FILE_MODE_WRITE);
|
||||
if (ef)
|
||||
{
|
||||
ok = eet_write(ef, "config", _e_config_profile,
|
||||
ok = eet_write(ef, "config", _e_config_profile,
|
||||
strlen(_e_config_profile), 0);
|
||||
if (_e_config_eet_close_handle(ef, buf2))
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
||||
if (_e_config_revisions > 0)
|
||||
{
|
||||
int i;
|
||||
char bsrc[4096], bdst[4096];
|
||||
|
||||
|
||||
for (i = _e_config_revisions; i > 1; i--)
|
||||
{
|
||||
e_user_dir_snprintf(bsrc, sizeof(bsrc), "config/profile.%i.cfg", i - 1);
|
||||
|
@ -1497,7 +1607,7 @@ e_config_domain_save(const char *domain, E_Config_DD *edd, const void *data)
|
|||
{
|
||||
int i;
|
||||
char bsrc[4096], bdst[4096];
|
||||
|
||||
|
||||
for (i = _e_config_revisions; i > 1; i--)
|
||||
{
|
||||
e_user_dir_snprintf(bsrc, sizeof(bsrc), "config/%s/%s.%i.cfg", _e_config_profile, domain, i - 1);
|
||||
|
@ -1525,7 +1635,7 @@ e_config_binding_mouse_match(E_Config_Binding_Mouse *eb_in)
|
|||
Eina_List *l;
|
||||
E_Config_Binding_Mouse *eb;
|
||||
|
||||
EINA_LIST_FOREACH(e_config->mouse_bindings, l, eb)
|
||||
EINA_LIST_FOREACH(e_config->mouse_bindings, l, eb)
|
||||
{
|
||||
if ((eb->context == eb_in->context) &&
|
||||
(eb->button == eb_in->button) &&
|
||||
|
@ -1545,8 +1655,8 @@ e_config_binding_key_match(E_Config_Binding_Key *eb_in)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Config_Binding_Key *eb;
|
||||
|
||||
EINA_LIST_FOREACH(e_config->mouse_bindings, l, eb)
|
||||
|
||||
EINA_LIST_FOREACH(e_config->mouse_bindings, l, eb)
|
||||
{
|
||||
if ((eb->context == eb_in->context) &&
|
||||
(eb->modifiers == eb_in->modifiers) &&
|
||||
|
@ -1567,7 +1677,7 @@ e_config_binding_edge_match(E_Config_Binding_Edge *eb_in)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Config_Binding_Edge *eb;
|
||||
|
||||
|
||||
EINA_LIST_FOREACH(e_config->edge_bindings, l, eb)
|
||||
{
|
||||
if ((eb->context == eb_in->context) &&
|
||||
|
@ -1589,7 +1699,7 @@ e_config_binding_signal_match(E_Config_Binding_Signal *eb_in)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Config_Binding_Signal *eb;
|
||||
|
||||
|
||||
EINA_LIST_FOREACH(e_config->signal_bindings, l, eb)
|
||||
{
|
||||
if ((eb->context == eb_in->context) &&
|
||||
|
@ -1631,7 +1741,7 @@ e_config_binding_wheel_match(E_Config_Binding_Wheel *eb_in)
|
|||
}
|
||||
|
||||
EAPI E_Config_Binding_Acpi *
|
||||
e_config_binding_acpi_match(E_Config_Binding_Acpi *eb_in)
|
||||
e_config_binding_acpi_match(E_Config_Binding_Acpi *eb_in)
|
||||
{
|
||||
Eina_List *l;
|
||||
E_Config_Binding_Acpi *eb;
|
||||
|
@ -1639,12 +1749,12 @@ e_config_binding_acpi_match(E_Config_Binding_Acpi *eb_in)
|
|||
EINA_LIST_FOREACH(e_config->acpi_bindings, l, eb)
|
||||
{
|
||||
if ((eb->context == eb_in->context) &&
|
||||
(eb->type == eb_in->type) &&
|
||||
(eb->status == eb_in->status) &&
|
||||
(((eb->action) && (eb_in->action) &&
|
||||
(eb->type == eb_in->type) &&
|
||||
(eb->status == eb_in->status) &&
|
||||
(((eb->action) && (eb_in->action) &&
|
||||
(!strcmp(eb->action, eb_in->action))) ||
|
||||
((!eb->action) && (!eb_in->action))) &&
|
||||
(((eb->params) && (eb_in->params) &&
|
||||
(((eb->params) && (eb_in->params) &&
|
||||
(!strcmp(eb->params, eb_in->params))) ||
|
||||
((!eb->params) && (!eb_in->params))))
|
||||
return eb;
|
||||
|
@ -1685,7 +1795,12 @@ _e_config_free(E_Config *ecf)
|
|||
E_Color_Class *cc;
|
||||
E_Path_Dir *epd;
|
||||
E_Remember *rem;
|
||||
|
||||
E_Randr_Screen_Restore_Info *screen_info;
|
||||
E_Randr_Crtc_Restore_Info *crtc_info;
|
||||
E_Randr_Output_Info *output_info;
|
||||
E_Randr_Screen_Restore_Info_12 *restore_info_12;
|
||||
|
||||
|
||||
if (!ecf) return;
|
||||
|
||||
EINA_LIST_FREE(ecf->modules, em)
|
||||
|
@ -1798,7 +1913,7 @@ _e_config_free(E_Config *ecf)
|
|||
{
|
||||
if (rem->name) eina_stringshare_del(rem->name);
|
||||
if (rem->class) eina_stringshare_del(rem->class);
|
||||
if (rem->title) eina_stringshare_del(rem->title);
|
||||
if (rem->title) eina_stringshare_del(rem->title);
|
||||
if (rem->role) eina_stringshare_del(rem->role);
|
||||
if (rem->prop.border) eina_stringshare_del(rem->prop.border);
|
||||
if (rem->prop.command) eina_stringshare_del(rem->prop.command);
|
||||
|
@ -1833,6 +1948,37 @@ _e_config_free(E_Config *ecf)
|
|||
if (sca->icon) eina_stringshare_del(sca->icon);
|
||||
E_FREE(sca);
|
||||
}
|
||||
if (ecf->screen_info)
|
||||
{
|
||||
EINA_LIST_FREE(ecf->screen_info, screen_info)
|
||||
{
|
||||
switch (screen_info->randr_version)
|
||||
{
|
||||
case EET_SCREEN_INFO_11:
|
||||
free(screen_info->rrvd_restore_info.restore_info_11);
|
||||
break;
|
||||
case EET_SCREEN_INFO_12:
|
||||
case EET_SCREEN_INFO_13:
|
||||
EINA_LIST_FREE(screen_info->rrvd_restore_info.restore_info_12, restore_info_12)
|
||||
{
|
||||
EINA_LIST_FREE(restore_info_12->crtcs, crtc_info)
|
||||
{
|
||||
EINA_LIST_FREE(crtc_info->outputs, output_info)
|
||||
{
|
||||
free(output_info->name);
|
||||
free(output_info->edid);
|
||||
free (output_info);
|
||||
}
|
||||
free (crtc_info);
|
||||
}
|
||||
free(restore_info_12);
|
||||
}
|
||||
eina_list_free(screen_info->rrvd_restore_info.restore_info_12);
|
||||
break;
|
||||
}
|
||||
free(screen_info);
|
||||
}
|
||||
}
|
||||
E_FREE(ecf);
|
||||
}
|
||||
|
||||
|
@ -1857,7 +2003,7 @@ _e_config_eet_close_handle(Eet_File *ef, char *file)
|
|||
{
|
||||
Eet_Error err;
|
||||
char *erstr = NULL;
|
||||
|
||||
|
||||
err = eet_close(ef);
|
||||
switch (err)
|
||||
{
|
||||
|
@ -1951,8 +2097,8 @@ _e_config_eet_close_handle(Eet_File *ef, char *file)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
_e_config_acpi_bindings_add(void)
|
||||
static void
|
||||
_e_config_acpi_bindings_add(void)
|
||||
{
|
||||
E_Config_Binding_Acpi *bind;
|
||||
|
||||
|
@ -1996,3 +2142,36 @@ _e_config_acpi_bindings_add(void)
|
|||
bind->params = eina_stringshare_add("now");
|
||||
e_config->acpi_bindings = eina_list_append(e_config->acpi_bindings, bind);
|
||||
}
|
||||
|
||||
static const char *
|
||||
_eet_union_type_get(const void *data, Eina_Bool *unknow)
|
||||
{
|
||||
const Eet_Union *u = data;
|
||||
int i;
|
||||
|
||||
if (unknow) *unknow = EINA_FALSE;
|
||||
for (i = 0; eet_mapping[i].name != NULL; ++i)
|
||||
if (*u == eet_mapping[i].u)
|
||||
return eet_mapping[i].name;
|
||||
|
||||
if (unknow) *unknow = EINA_TRUE;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_eet_union_type_set(const char *type, void *data, Eina_Bool unknow)
|
||||
{
|
||||
Eet_Union *u = data;
|
||||
int i;
|
||||
|
||||
if (unknow) return EINA_FALSE;
|
||||
|
||||
for (i = 0; eet_mapping[i].name != NULL; ++i)
|
||||
if (strcmp(eet_mapping[i].name, type) == 0)
|
||||
{
|
||||
*u = eet_mapping[i].u;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
|
@ -25,14 +25,14 @@ typedef struct _E_Event_Config_Icon_Theme E_Event_Config_Icon_Theme;
|
|||
#ifndef E_CONFIG_H
|
||||
#define E_CONFIG_H
|
||||
|
||||
/* increment this whenever we change config enough that you need new
|
||||
/* increment this whenever we change config enough that you need new
|
||||
* defaults for e to work.
|
||||
*/
|
||||
#define E_CONFIG_FILE_EPOCH 0x0001
|
||||
/* increment this whenever a new set of config values are added but the users
|
||||
* config doesn't need to be wiped - simply new values need to be put in
|
||||
*/
|
||||
#define E_CONFIG_FILE_GENERATION 0x0138
|
||||
#define E_CONFIG_FILE_GENERATION 0x0140
|
||||
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
|
||||
|
||||
#define E_EVAS_ENGINE_DEFAULT 0
|
||||
|
@ -194,7 +194,7 @@ struct _E_Config
|
|||
int use_app_icon; // GUI
|
||||
int cnfmdlg_disabled; // GUI
|
||||
int cfgdlg_auto_apply; // GUI
|
||||
int cfgdlg_default_mode; // GUI
|
||||
int cfgdlg_default_mode; // GUI
|
||||
Eina_List *gadcons; // GUI
|
||||
Eina_List *shelves; // GUI
|
||||
int font_hinting; // GUI
|
||||
|
@ -221,7 +221,7 @@ struct _E_Config
|
|||
int screensaver_expose; // GUI
|
||||
Eina_Bool screensaver_ask_presentation; // GUI
|
||||
double screensaver_ask_presentation_timeout; // GUI
|
||||
|
||||
|
||||
int dpms_enable; // GUI
|
||||
int dpms_standby_enable; // GUI
|
||||
int dpms_standby_timeout; // GUI
|
||||
|
@ -243,12 +243,9 @@ struct _E_Config
|
|||
int mouse_accel_numerator; // GUI
|
||||
int mouse_accel_denominator; // GUI
|
||||
int mouse_accel_threshold; // GUI
|
||||
|
||||
int display_res_restore; // GUI
|
||||
int display_res_width; // GUI
|
||||
int display_res_height; // GUI
|
||||
int display_res_hz; // GUI
|
||||
int display_res_rotation; // GUI
|
||||
|
||||
Eina_List *screen_info; // GUI
|
||||
|
||||
int border_raise_on_mouse_action; // GUI
|
||||
int border_raise_on_focus; // GUI
|
||||
int desk_flip_wrap; // GUI
|
||||
|
@ -256,14 +253,14 @@ struct _E_Config
|
|||
|
||||
const char *icon_theme; // GUI
|
||||
Eina_Bool icon_theme_overrides; // GUI
|
||||
|
||||
|
||||
int desk_flip_animate_mode; // GUI
|
||||
int desk_flip_animate_interpolation; // GUI
|
||||
double desk_flip_animate_time; // GUI
|
||||
Eina_Bool desk_flip_pan_bg;
|
||||
double desk_flip_pan_x_axis_factor;
|
||||
double desk_flip_pan_y_axis_factor;
|
||||
|
||||
|
||||
const char *wallpaper_import_last_dev; // INTERNAL
|
||||
const char *wallpaper_import_last_path; // INTERNAL
|
||||
|
||||
|
@ -275,15 +272,15 @@ struct _E_Config
|
|||
int wallpaper_grad_c2_b; // INTERNAL
|
||||
|
||||
const char *theme_default_border_style; // GUI
|
||||
|
||||
|
||||
Eina_List *mime_icons; // GUI
|
||||
int desk_auto_switch; // GUI;
|
||||
|
||||
int thumb_nice;
|
||||
|
||||
|
||||
int ping_clients_interval;
|
||||
int cache_flush_poll_interval; // GUI
|
||||
|
||||
|
||||
int thumbscroll_enable; // GUI
|
||||
int thumbscroll_threshhold; // GUI
|
||||
double thumbscroll_momentum_threshhold; // GUI
|
||||
|
@ -304,7 +301,7 @@ struct _E_Config
|
|||
unsigned char dy;
|
||||
} resize;
|
||||
} border_keyboard;
|
||||
|
||||
|
||||
struct {
|
||||
double min; // GUI
|
||||
double max; // GUI
|
||||
|
@ -316,11 +313,11 @@ struct _E_Config
|
|||
|
||||
unsigned char show_cursor; // GUI
|
||||
unsigned char idle_cursor; // GUI
|
||||
|
||||
|
||||
const char *default_system_menu;
|
||||
|
||||
unsigned char cfgdlg_normal_wins; // GUI
|
||||
|
||||
|
||||
struct {
|
||||
struct {
|
||||
int icon_size;
|
||||
|
@ -334,7 +331,7 @@ struct _E_Config
|
|||
Eina_Bool presentation;
|
||||
Eina_Bool offline;
|
||||
} mode;
|
||||
|
||||
|
||||
struct {
|
||||
double expire_timeout;
|
||||
Eina_Bool show_run_dialog;
|
||||
|
@ -418,7 +415,7 @@ struct _E_Config_Binding_Wheel
|
|||
const char *params;
|
||||
};
|
||||
|
||||
struct _E_Config_Binding_Acpi
|
||||
struct _E_Config_Binding_Acpi
|
||||
{
|
||||
int context, type, status;
|
||||
const char *action, *params;
|
||||
|
@ -508,7 +505,7 @@ EAPI int e_config_init(void);
|
|||
EAPI int e_config_shutdown(void);
|
||||
|
||||
EAPI void e_config_load(void);
|
||||
|
||||
|
||||
EAPI int e_config_save(void);
|
||||
EAPI void e_config_save_flush(void);
|
||||
EAPI void e_config_save_queue(void);
|
||||
|
@ -524,7 +521,7 @@ EAPI Eina_List *e_config_engine_list(void);
|
|||
|
||||
EAPI void e_config_save_block_set(int block);
|
||||
EAPI int e_config_save_block_get(void);
|
||||
|
||||
|
||||
EAPI void *e_config_domain_load(const char *domain, E_Config_DD *edd);
|
||||
EAPI void *e_config_domain_system_load(const char *domain, E_Config_DD *edd);
|
||||
EAPI int e_config_profile_save(void);
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "e_hints.h"
|
||||
#include "e_signals.h"
|
||||
#include "e_xinerama.h"
|
||||
#include "e_randr.h"
|
||||
#include "e_table.h"
|
||||
#include "e_layout.h"
|
||||
#include "e_font.h"
|
||||
|
|
|
@ -500,6 +500,16 @@ main(int argc, char **argv)
|
|||
}
|
||||
_e_main_shutdown_push(e_xinerama_shutdown);
|
||||
|
||||
TS("randr");
|
||||
if (!e_randr_init())
|
||||
{
|
||||
e_error_message_show(_("Enlightenment cannot setup randr wrapping.\n"
|
||||
"This should not happen."));
|
||||
_e_main_shutdown(-1);
|
||||
}
|
||||
_e_main_shutdown_push(e_randr_shutdown);
|
||||
|
||||
|
||||
/* ecore_x_grab(); */
|
||||
|
||||
ecore_x_io_error_handler_set(_e_main_cb_x_fatal, NULL);
|
||||
|
|
|
@ -105,26 +105,6 @@ e_manager_new(Ecore_X_Window root, int num)
|
|||
man->win = man->root;
|
||||
}
|
||||
|
||||
/* FIXME: this handles 1 screen only - not multihead. multihead randr
|
||||
* and xinerama are complex oin terms of interaction, so for now only
|
||||
* really have this work in single head. the randr module kept this
|
||||
* as a list, and i might move it to be the same too, but for now, keep
|
||||
* it as is
|
||||
*/
|
||||
if (e_config->display_res_restore)
|
||||
{
|
||||
Ecore_X_Screen_Size size;
|
||||
Ecore_X_Screen_Refresh_Rate rate;
|
||||
|
||||
size.width = e_config->display_res_width;
|
||||
size.height = e_config->display_res_height;
|
||||
rate.rate = e_config->display_res_hz;
|
||||
ecore_x_randr_screen_refresh_rate_set(man->root, size, rate);
|
||||
if (e_config->display_res_rotation)
|
||||
ecore_x_randr_screen_rotation_set(man->root,
|
||||
e_config->display_res_rotation);
|
||||
}
|
||||
|
||||
h = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW_REQUEST, _e_manager_cb_window_show_request, man);
|
||||
if (h) man->handlers = eina_list_append(man->handlers, h);
|
||||
h = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE, _e_manager_cb_window_configure, man);
|
||||
|
@ -153,7 +133,7 @@ e_manager_manage_windows(E_Manager *man)
|
|||
Ecore_X_Window *windows;
|
||||
int wnum;
|
||||
|
||||
/* a manager is designated for each root. lets get all the windows in
|
||||
/* a manager is designated for each root. lets get all the windows in
|
||||
the managers root */
|
||||
windows = ecore_x_window_children_get(man->root, &wnum);
|
||||
if (windows)
|
||||
|
@ -169,7 +149,7 @@ e_manager_manage_windows(E_Manager *man)
|
|||
Ecore_X_Atom atom_xmbed, atom_kde_netwm_systray, atom_kwm_dockwindow;
|
||||
unsigned char *data = NULL;
|
||||
int count;
|
||||
|
||||
|
||||
ecore_x_atoms_get(atom_names, 3, atoms);
|
||||
atom_xmbed = atoms[0];
|
||||
atom_kde_netwm_systray = atoms[1];
|
||||
|
@ -188,8 +168,8 @@ e_manager_manage_windows(E_Manager *man)
|
|||
if (att.override)
|
||||
{
|
||||
char *wname = NULL, *wclass = NULL;
|
||||
|
||||
ecore_x_icccm_name_class_get(windows[i],
|
||||
|
||||
ecore_x_icccm_name_class_get(windows[i],
|
||||
&wname, &wclass);
|
||||
if ((wname) && (wclass) &&
|
||||
(!strcmp(wname, "E")) &&
|
||||
|
@ -251,7 +231,7 @@ e_manager_manage_windows(E_Manager *man)
|
|||
char *path;
|
||||
Efreet_Desktop *desktop = NULL;
|
||||
|
||||
/* get all information from window before it is
|
||||
/* get all information from window before it is
|
||||
* reset by e_border_new */
|
||||
ret = ecore_x_window_prop_card32_get(windows[i],
|
||||
E_ATOM_CONTAINER,
|
||||
|
@ -260,7 +240,7 @@ e_manager_manage_windows(E_Manager *man)
|
|||
con = e_container_number_get(man, id);
|
||||
if (!con)
|
||||
con = e_container_current_get(man);
|
||||
|
||||
|
||||
ret = ecore_x_window_prop_card32_get(windows[i],
|
||||
E_ATOM_ZONE,
|
||||
&id, 1);
|
||||
|
@ -305,7 +285,7 @@ e_manager_manage_windows(E_Manager *man)
|
|||
* should be seen */
|
||||
E_Container *con;
|
||||
E_Border *bd;
|
||||
|
||||
|
||||
con = e_container_current_get(man);
|
||||
bd = e_border_new(con, windows[i], 1, 0);
|
||||
if (bd)
|
||||
|
@ -324,7 +304,7 @@ e_manager_show(E_Manager *man)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Container *con;
|
||||
|
||||
|
||||
E_OBJECT_CHECK(man);
|
||||
E_OBJECT_TYPE_CHECK(man, E_MANAGER_TYPE);
|
||||
if (man->visible) return;
|
||||
|
@ -335,7 +315,7 @@ e_manager_show(E_Manager *man)
|
|||
if (man->root != man->win)
|
||||
{
|
||||
Ecore_X_Window mwin;
|
||||
|
||||
|
||||
mwin = e_menu_grab_window_get();
|
||||
if (!mwin) mwin = man->initwin;
|
||||
if (!mwin)
|
||||
|
@ -356,7 +336,7 @@ e_manager_hide(E_Manager *man)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Container *con;
|
||||
|
||||
|
||||
E_OBJECT_CHECK(man);
|
||||
E_OBJECT_TYPE_CHECK(man, E_MANAGER_TYPE);
|
||||
if (!man->visible) return;
|
||||
|
@ -366,7 +346,7 @@ e_manager_hide(E_Manager *man)
|
|||
}
|
||||
if (man->root != man->win)
|
||||
ecore_x_window_hide(man->win);
|
||||
man->visible = 0;
|
||||
man->visible = 0;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -388,7 +368,7 @@ e_manager_resize(E_Manager *man, int w, int h)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Container *con;
|
||||
|
||||
|
||||
E_OBJECT_CHECK(man);
|
||||
E_OBJECT_TYPE_CHECK(man, E_MANAGER_TYPE);
|
||||
if ((w == man->w) && (h == man->h)) return;
|
||||
|
@ -396,7 +376,7 @@ e_manager_resize(E_Manager *man, int w, int h)
|
|||
man->h = h;
|
||||
if (man->root != man->win)
|
||||
ecore_x_window_resize(man->win, man->w, man->h);
|
||||
|
||||
|
||||
EINA_LIST_FOREACH(man->containers, l, con)
|
||||
{
|
||||
e_container_resize(con, man->w, man->h);
|
||||
|
@ -410,7 +390,7 @@ e_manager_move_resize(E_Manager *man, int x, int y, int w, int h)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Container *con;
|
||||
|
||||
|
||||
E_OBJECT_CHECK(man);
|
||||
E_OBJECT_TYPE_CHECK(man, E_MANAGER_TYPE);
|
||||
if ((x == man->x) && (y == man->y) && (w == man->w) && (h == man->h)) return;
|
||||
|
@ -437,7 +417,7 @@ e_manager_raise(E_Manager *man)
|
|||
if (man->root != man->win)
|
||||
{
|
||||
Ecore_X_Window mwin;
|
||||
|
||||
|
||||
mwin = e_menu_grab_window_get();
|
||||
if (!mwin) mwin = man->initwin;
|
||||
if (!mwin)
|
||||
|
@ -466,7 +446,7 @@ e_manager_current_get(void)
|
|||
Eina_List *l;
|
||||
E_Manager *man;
|
||||
int x, y;
|
||||
|
||||
|
||||
if (!managers) return NULL;
|
||||
EINA_LIST_FOREACH(managers, l, man)
|
||||
{
|
||||
|
@ -484,7 +464,7 @@ e_manager_number_get(int num)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Manager *man;
|
||||
|
||||
|
||||
if (!managers) return NULL;
|
||||
EINA_LIST_FOREACH(managers, l, man)
|
||||
{
|
||||
|
@ -511,7 +491,7 @@ e_managers_keys_ungrab(void)
|
|||
{
|
||||
Eina_List *l;
|
||||
E_Manager *man;
|
||||
|
||||
|
||||
EINA_LIST_FOREACH(managers, l, man)
|
||||
{
|
||||
e_bindings_key_ungrab(E_BINDING_CONTEXT_ANY, man->root);
|
||||
|
@ -674,7 +654,7 @@ _e_manager_free(E_Manager *man)
|
|||
ecore_x_window_free(man->win);
|
||||
}
|
||||
if (man->pointer) e_object_del(E_OBJECT(man->pointer));
|
||||
managers = eina_list_remove(managers, man);
|
||||
managers = eina_list_remove(managers, man);
|
||||
free(man);
|
||||
}
|
||||
|
||||
|
@ -710,7 +690,7 @@ _e_manager_cb_window_configure(void *data, int ev_type __UNUSED__, void *ev)
|
|||
{
|
||||
E_Manager *man;
|
||||
Ecore_X_Event_Window_Configure *e;
|
||||
|
||||
|
||||
man = data;
|
||||
e = ev;
|
||||
if (e->win != man->root) return ECORE_CALLBACK_PASS_ON;
|
||||
|
@ -723,7 +703,7 @@ _e_manager_cb_key_down(void *data, int ev_type __UNUSED__, void *ev)
|
|||
{
|
||||
E_Manager *man;
|
||||
Ecore_Event_Key *e;
|
||||
|
||||
|
||||
man = data;
|
||||
e = ev;
|
||||
|
||||
|
@ -739,7 +719,7 @@ _e_manager_cb_key_up(void *data, int ev_type __UNUSED__, void *ev)
|
|||
{
|
||||
E_Manager *man;
|
||||
Ecore_Event_Key *e;
|
||||
|
||||
|
||||
man = data;
|
||||
e = ev;
|
||||
|
||||
|
@ -763,7 +743,7 @@ _e_manager_cb_frame_extents_request(void *data, int ev_type __UNUSED__, void *ev
|
|||
const char *border, *signal, *key;
|
||||
int ok;
|
||||
unsigned int i, num;
|
||||
|
||||
|
||||
man = data;
|
||||
con = e_container_current_get(man);
|
||||
e = ev;
|
||||
|
@ -787,7 +767,7 @@ _e_manager_cb_frame_extents_request(void *data, int ev_type __UNUSED__, void *ev
|
|||
|
||||
ok = ecore_x_netwm_window_type_get(e->win, &type);
|
||||
if ((ok) &&
|
||||
((type == ECORE_X_WINDOW_TYPE_DESKTOP) ||
|
||||
((type == ECORE_X_WINDOW_TYPE_DESKTOP) ||
|
||||
(type == ECORE_X_WINDOW_TYPE_DOCK)))
|
||||
{
|
||||
border = "borderless";
|
||||
|
@ -861,7 +841,7 @@ _e_manager_cb_frame_extents_request(void *data, int ev_type __UNUSED__, void *ev
|
|||
|
||||
evas_object_resize(o, 1000, 1000);
|
||||
edje_object_calc_force(o);
|
||||
edje_object_part_geometry_get(o, "e.swallow.client",
|
||||
edje_object_part_geometry_get(o, "e.swallow.client",
|
||||
&x, &y, &w, &h);
|
||||
extents->l = x;
|
||||
extents->r = 1000 - (x + w);
|
||||
|
@ -892,7 +872,7 @@ _e_manager_cb_ping(void *data, int ev_type __UNUSED__, void *ev)
|
|||
E_Manager *man;
|
||||
E_Border *bd;
|
||||
Ecore_X_Event_Ping *e;
|
||||
|
||||
|
||||
man = data;
|
||||
e = ev;
|
||||
|
||||
|
@ -948,15 +928,15 @@ _e_manager_cb_client_message(__UNUSED__ void *data, __UNUSED__ int ev_type, void
|
|||
{
|
||||
Ecore_X_Event_Client_Message *e;
|
||||
E_Border *bd;
|
||||
|
||||
|
||||
e = ev;
|
||||
|
||||
|
||||
if (e->message_type == ECORE_X_ATOM_NET_ACTIVE_WINDOW)
|
||||
{
|
||||
bd = e_border_find_by_client_window(e->win);
|
||||
if ((bd) && (!bd->focused))
|
||||
{
|
||||
#if 0 /* notes */
|
||||
#if 0 /* notes */
|
||||
if (e->data.l[0] == 0 /* 0 == old, 1 == client, 2 == pager */)
|
||||
{
|
||||
// FIXME: need config for the below - what to do given each
|
||||
|
@ -971,23 +951,23 @@ _e_manager_cb_client_message(__UNUSED__ void *data, __UNUSED__ int ev_type, void
|
|||
requestor_id e->data.l[2];
|
||||
#endif
|
||||
if ((e_config->focus_setting == E_FOCUS_NEW_WINDOW) ||
|
||||
((bd->parent) &&
|
||||
((bd->parent) &&
|
||||
((e_config->focus_setting == E_FOCUS_NEW_DIALOG) ||
|
||||
((bd->parent->focused) &&
|
||||
((bd->parent->focused) &&
|
||||
(e_config->focus_setting == E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED)))))
|
||||
{
|
||||
if (bd->iconic)
|
||||
{
|
||||
if (e_config->clientlist_warp_to_iconified_desktop == 1)
|
||||
e_desk_show(bd->desk);
|
||||
|
||||
|
||||
if (!bd->lock_user_iconify)
|
||||
e_border_uniconify(bd);
|
||||
}
|
||||
if (!bd->iconic) e_desk_show(bd->desk);
|
||||
if (!bd->lock_user_stacking) e_border_raise(bd);
|
||||
if (!bd->lock_focus_out)
|
||||
{
|
||||
{
|
||||
if (e_config->focus_policy != E_FOCUS_CLICK)
|
||||
ecore_x_pointer_warp(bd->zone->container->win,
|
||||
bd->x + (bd->w / 2), bd->y + (bd->h / 2));
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,124 @@
|
|||
#ifndef E_RANDR_H
|
||||
#define E_RANDR_H
|
||||
|
||||
#include <Eina.h>
|
||||
#include <Ecore_X.h>
|
||||
|
||||
typedef struct _E_Randr_Crtc_Info {
|
||||
Ecore_X_ID xid;
|
||||
Eina_Rectangle geometry;
|
||||
Eina_Rectangle panning;
|
||||
Eina_Rectangle tracking;
|
||||
Eina_Rectangle border;
|
||||
Ecore_X_Randr_Orientation current_orientation;
|
||||
Ecore_X_Randr_Orientation orientations;
|
||||
Ecore_X_Randr_Crtc_Gamma **gamma_ramps;
|
||||
int gamma_ramp_size;
|
||||
Eina_List *outputs;
|
||||
Eina_List *possible_outputs;
|
||||
Ecore_X_Randr_Mode_Info *current_mode;
|
||||
} E_Randr_Crtc_Info;
|
||||
|
||||
typedef struct _E_Randr_Output_Info {
|
||||
Ecore_X_ID xid;
|
||||
char *name;
|
||||
int name_length;
|
||||
E_Randr_Crtc_Info *crtc;
|
||||
Eina_List *wired_clones;
|
||||
Ecore_X_Randr_Signal_Format signalformats;
|
||||
Ecore_X_Randr_Signal_Format signalformat;
|
||||
int connector_number;
|
||||
Ecore_X_Randr_Connector_Type connector_type;
|
||||
Ecore_X_Randr_Connection_Status connection_status;
|
||||
/*
|
||||
* Attached Monitor specific:
|
||||
*/
|
||||
Eina_List *modes;
|
||||
Eina_List *preferred_modes;
|
||||
Eina_List *clones;
|
||||
Eina_List *possible_crtcs;
|
||||
Ecore_X_Randr_Screen_Size size_mm;
|
||||
unsigned char *edid;
|
||||
unsigned long edid_length;
|
||||
int max_backlight;
|
||||
double current_backlight;
|
||||
Ecore_X_Render_Subpixel_Order subpixel_order;
|
||||
Eina_List *compatible_outputs;
|
||||
} E_Randr_Output_Info;
|
||||
|
||||
typedef struct _E_Randr_Screen_Info_11 {
|
||||
//List of Ecore_X_Randr_Screen_Size_MM*
|
||||
Eina_List *sizes;
|
||||
int csize_index;
|
||||
Ecore_X_Randr_Orientation corientation;
|
||||
Ecore_X_Randr_Orientation orientations;
|
||||
//List of Ecore_X_Randr_Refresh_Rate*
|
||||
Eina_List *rates;
|
||||
Ecore_X_Randr_Refresh_Rate current_rate;
|
||||
} E_Randr_Screen_Info_11;
|
||||
|
||||
typedef struct _E_Randr_Screen_Info_12 {
|
||||
Ecore_X_Randr_Screen_Size min_size;
|
||||
Ecore_X_Randr_Screen_Size max_size;
|
||||
Ecore_X_Randr_Screen_Size current_size;
|
||||
Eina_List *modes;
|
||||
Eina_List *crtcs;
|
||||
Eina_List *outputs;
|
||||
E_Randr_Output_Info *primary_output;
|
||||
Ecore_X_Randr_Output_Policy output_policy;
|
||||
Ecore_X_Randr_Relative_Alignment alignment;
|
||||
} E_Randr_Screen_Info_12;
|
||||
|
||||
//RRVD == RandR(R) Version Depended
|
||||
typedef union _E_Randr_Screen_RRVD_Info {
|
||||
E_Randr_Screen_Info_11 *randr_info_11;
|
||||
E_Randr_Screen_Info_12 *randr_info_12;
|
||||
} E_Randr_Screen_RRVD_Info;
|
||||
|
||||
typedef struct _E_Randr_Screen_Info {
|
||||
Ecore_X_Window root;
|
||||
int randr_version;
|
||||
E_Randr_Screen_RRVD_Info rrvd_info;
|
||||
} E_Randr_Screen_Info;
|
||||
|
||||
//Following stuff is just for configuration purposes
|
||||
typedef struct _E_Randr_Output_Restore_Info {
|
||||
const char *edid;
|
||||
double backlight_level;
|
||||
} E_Randr_Output_Restore_Info;
|
||||
|
||||
typedef struct _E_Randr_Crtc_Restore_Info {
|
||||
Eina_Rectangle geometry;
|
||||
Ecore_X_Randr_Orientation orientation;
|
||||
//list of the outputs;
|
||||
Eina_List *outputs;
|
||||
} E_Randr_Crtc_Restore_Info;
|
||||
|
||||
typedef struct _E_Randr_Screen_Restore_Info_11 {
|
||||
Ecore_X_Randr_Screen_Size size;
|
||||
Ecore_X_Randr_Refresh_Rate refresh_rate;
|
||||
Ecore_X_Randr_Orientation orientation;
|
||||
} E_Randr_Screen_Restore_Info_11;
|
||||
|
||||
typedef struct _E_Randr_Screen_Restore_Info_12 {
|
||||
Eina_List *crtcs;
|
||||
Ecore_X_Randr_Output_Policy output_policy;
|
||||
Ecore_X_Randr_Relative_Alignment alignment;
|
||||
} E_Randr_Screen_Restore_Info_12;
|
||||
|
||||
typedef union _E_Randr_Screen_Restore_Info_Union {
|
||||
E_Randr_Screen_Restore_Info_11 *restore_info_11;
|
||||
Eina_List *restore_info_12;
|
||||
} E_Randr_Screen_Restore_Info_Union;
|
||||
|
||||
typedef struct _E_Randr_Screen_Restore_Info {
|
||||
int randr_version;
|
||||
E_Randr_Screen_Restore_Info_Union rrvd_restore_info;
|
||||
} E_Randr_Screen_Restore_Info;
|
||||
|
||||
EAPI Eina_Bool e_randr_init(void);
|
||||
EAPI int e_randr_shutdown(void);
|
||||
|
||||
extern E_Randr_Screen_Info *e_randr_screen_info;
|
||||
|
||||
#endif
|
|
@ -1,10 +1,12 @@
|
|||
#include "e.h"
|
||||
|
||||
/* TODO:
|
||||
*
|
||||
*
|
||||
* Give list some icons.
|
||||
*/
|
||||
|
||||
#define RANDR_11 ((1 << 16) | 1)
|
||||
|
||||
static void _fill_data (E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_data (E_Config_Dialog *cfd);
|
||||
static void _free_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
|
@ -21,10 +23,13 @@ static int _sort_resolutions (const void *d1, const void *d2);
|
|||
typedef struct _Resolution Resolution;
|
||||
typedef struct _SureBox SureBox;
|
||||
|
||||
struct _Resolution
|
||||
static E_Randr_Screen_Restore_Info_11 *e_screen_config_11 = NULL;
|
||||
|
||||
struct _Resolution
|
||||
{
|
||||
int id;
|
||||
Ecore_X_Screen_Size size;
|
||||
Ecore_X_Randr_Screen_Size size;
|
||||
int size_index;
|
||||
Eina_List *rates;
|
||||
};
|
||||
|
||||
|
@ -37,18 +42,19 @@ struct _SureBox
|
|||
E_Config_Dialog_Data *cfdata;
|
||||
};
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
Eina_List *resolutions;
|
||||
Ecore_X_Screen_Size orig_size;
|
||||
Ecore_X_Screen_Refresh_Rate orig_rate;
|
||||
int orig_rotation;
|
||||
Ecore_X_Randr_Screen_Size orig_size;
|
||||
int orig_size_index;
|
||||
Ecore_X_Randr_Refresh_Rate orig_rate;
|
||||
int orig_orientation;
|
||||
int orig_flip;
|
||||
int restore;
|
||||
int can_rotate;
|
||||
int can_flip;
|
||||
int rotation;
|
||||
int orientation;
|
||||
int flip;
|
||||
int flip_x;
|
||||
int flip_y;
|
||||
|
@ -81,18 +87,22 @@ static void
|
|||
_surebox_dialog_cb_yes(void *data, E_Dialog *dia)
|
||||
{
|
||||
SureBox *sb;
|
||||
Ecore_X_Screen_Size c_size;
|
||||
Ecore_X_Screen_Refresh_Rate c_rate;
|
||||
Ecore_X_Randr_Screen_Size c_size;
|
||||
Ecore_X_Randr_Refresh_Rate c_rate;
|
||||
E_Manager *man;
|
||||
|
||||
sb = data;
|
||||
man = e_manager_current_get();
|
||||
c_size = ecore_x_randr_current_screen_size_get(man->root);
|
||||
c_rate = ecore_x_randr_current_screen_refresh_rate_get(man->root);
|
||||
e_config->display_res_width = c_size.width;
|
||||
e_config->display_res_height = c_size.height;
|
||||
e_config->display_res_hz = c_rate.rate;
|
||||
e_config_save_queue();
|
||||
ecore_x_randr_screen_primary_output_current_size_get(man->root, &c_size.width, &c_size.height, NULL, NULL, NULL);
|
||||
c_rate = ecore_x_randr_screen_primary_output_current_refresh_rate_get(man->root);
|
||||
|
||||
if (e_screen_config_11)
|
||||
{
|
||||
e_screen_config_11->size.width = c_size.width;
|
||||
e_screen_config_11->size.height = c_size.height;
|
||||
e_screen_config_11->refresh_rate = c_rate;
|
||||
e_config_save_queue();
|
||||
}
|
||||
_fill_data(sb->cfdata);
|
||||
_load_resolutions(sb->cfdata);
|
||||
/* No need to load rates as the currently selected resolution has not been
|
||||
|
@ -106,8 +116,8 @@ _surebox_dialog_cb_no(void *data, E_Dialog *dia)
|
|||
SureBox *sb;
|
||||
|
||||
sb = data;
|
||||
ecore_x_randr_screen_refresh_rate_set(sb->dia->win->container->manager->root,
|
||||
sb->cfdata->orig_size, sb->cfdata->orig_rate);
|
||||
ecore_x_randr_screen_primary_output_refresh_rate_set(sb->dia->win->container->manager->root,
|
||||
sb->cfdata->orig_size_index, sb->cfdata->orig_rate);
|
||||
_load_resolutions(sb->cfdata);
|
||||
_load_rates(sb->cfdata);
|
||||
_surebox_dialog_cb_delete(dia->win);
|
||||
|
@ -127,7 +137,7 @@ _surebox_text_fill(SureBox *sb)
|
|||
"If you do not press a button, the old resolution of<br>"
|
||||
"%dx%d at %d Hz will be restored in %d seconds."),
|
||||
sb->cfdata->orig_size.width, sb->cfdata->orig_size.height,
|
||||
sb->cfdata->orig_rate.rate, sb->iterations);
|
||||
sb->cfdata->orig_rate, sb->iterations);
|
||||
else
|
||||
snprintf(buf, sizeof(buf),
|
||||
_("Does this look OK? <hilight>Save</hilight> if it does, or Restore if not.<br>"
|
||||
|
@ -144,7 +154,7 @@ _surebox_text_fill(SureBox *sb)
|
|||
"If you do not press a button, the old resolution of<br>"
|
||||
"%dx%d at %d Hz will be restored <hilight>IMMEDIATELY</hilight>."),
|
||||
sb->cfdata->orig_size.width, sb->cfdata->orig_size.height,
|
||||
sb->cfdata->orig_rate.rate);
|
||||
sb->cfdata->orig_rate);
|
||||
else
|
||||
snprintf(buf, sizeof(buf),
|
||||
_("Does this look OK? <hilight>Save</hilight> if it does, or Restore if not.<br>"
|
||||
|
@ -201,7 +211,7 @@ _surebox_new(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
}
|
||||
|
||||
E_Config_Dialog *
|
||||
e_int_config_display(E_Container *con, const char *params __UNUSED__)
|
||||
e_int_config_display(E_Container *con, const char *params __UNUSED__)
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
@ -229,43 +239,53 @@ e_int_config_display(E_Container *con, const char *params __UNUSED__)
|
|||
}
|
||||
|
||||
static void
|
||||
_fill_data(E_Config_Dialog_Data *cfdata)
|
||||
_fill_data(E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
E_Manager *man;
|
||||
E_Randr_Screen_Restore_Info *restore_info;
|
||||
Eina_List *iter;
|
||||
int rots;
|
||||
|
||||
man = e_manager_current_get();
|
||||
cfdata->orig_size = ecore_x_randr_current_screen_size_get(man->root);
|
||||
cfdata->orig_rate = ecore_x_randr_current_screen_refresh_rate_get(man->root);
|
||||
cfdata->restore = e_config->display_res_restore;
|
||||
ecore_x_randr_screen_primary_output_current_size_get(man->root, &cfdata->orig_size.width, &cfdata->orig_size.height, NULL, NULL, &cfdata->orig_size_index);
|
||||
cfdata->orig_rate = ecore_x_randr_screen_primary_output_current_refresh_rate_get(man->root);
|
||||
|
||||
rots = ecore_x_randr_screen_rotations_get(man->root);
|
||||
if ((rots) && (rots != ECORE_X_RANDR_ROT_0))
|
||||
EINA_LIST_FOREACH(e_config->screen_info, iter, restore_info)
|
||||
{
|
||||
cfdata->rotation = ecore_x_randr_screen_rotation_get(man->root);
|
||||
cfdata->can_flip = rots & (ECORE_X_RANDR_FLIP_X | ECORE_X_RANDR_FLIP_Y);
|
||||
cfdata->flip = cfdata->rotation &
|
||||
(ECORE_X_RANDR_FLIP_X | ECORE_X_RANDR_FLIP_Y);
|
||||
if (restore_info->randr_version == RANDR_11)
|
||||
{
|
||||
e_screen_config_11 = restore_info->rrvd_restore_info.restore_info_11;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rots = ecore_x_randr_screen_primary_output_orientations_get(man->root);
|
||||
if ((rots) && (rots != ECORE_X_RANDR_ORIENTATION_ROT_0))
|
||||
{
|
||||
cfdata->orientation = ecore_x_randr_screen_primary_output_orientation_get(man->root);
|
||||
cfdata->can_flip = rots & (ECORE_X_RANDR_ORIENTATION_FLIP_X | ECORE_X_RANDR_ORIENTATION_FLIP_Y);
|
||||
cfdata->flip = cfdata->orientation &
|
||||
(ECORE_X_RANDR_ORIENTATION_FLIP_X | ECORE_X_RANDR_ORIENTATION_FLIP_Y);
|
||||
cfdata->orig_flip = cfdata->flip;
|
||||
|
||||
if (cfdata->rotation & (ECORE_X_RANDR_FLIP_X))
|
||||
if (cfdata->orientation & (ECORE_X_RANDR_ORIENTATION_FLIP_X))
|
||||
cfdata->flip_x = 1;
|
||||
if (cfdata->rotation & (ECORE_X_RANDR_FLIP_Y))
|
||||
if (cfdata->orientation & (ECORE_X_RANDR_ORIENTATION_FLIP_Y))
|
||||
cfdata->flip_y = 1;
|
||||
|
||||
cfdata->can_rotate =
|
||||
rots & (ECORE_X_RANDR_ROT_0 | ECORE_X_RANDR_ROT_90 |
|
||||
ECORE_X_RANDR_ROT_180 | ECORE_X_RANDR_ROT_270);
|
||||
cfdata->rotation =
|
||||
cfdata->rotation &
|
||||
(ECORE_X_RANDR_ROT_0 | ECORE_X_RANDR_ROT_90 |
|
||||
ECORE_X_RANDR_ROT_180 | ECORE_X_RANDR_ROT_270);
|
||||
cfdata->orig_rotation = cfdata->rotation;
|
||||
cfdata->can_rotate =
|
||||
rots & (ECORE_X_RANDR_ORIENTATION_ROT_0 | ECORE_X_RANDR_ORIENTATION_ROT_90 |
|
||||
ECORE_X_RANDR_ORIENTATION_ROT_180 | ECORE_X_RANDR_ORIENTATION_ROT_270);
|
||||
cfdata->orientation =
|
||||
cfdata->orientation &
|
||||
(ECORE_X_RANDR_ORIENTATION_ROT_0 | ECORE_X_RANDR_ORIENTATION_ROT_90 |
|
||||
ECORE_X_RANDR_ORIENTATION_ROT_180 | ECORE_X_RANDR_ORIENTATION_ROT_270);
|
||||
cfdata->orig_orientation = cfdata->orientation;
|
||||
}
|
||||
}
|
||||
|
||||
static void *
|
||||
_create_data(E_Config_Dialog *cfd)
|
||||
_create_data(E_Config_Dialog *cfd)
|
||||
{
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
|
||||
|
@ -276,7 +296,7 @@ _create_data(E_Config_Dialog *cfd)
|
|||
}
|
||||
|
||||
static void
|
||||
_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||
_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
Resolution *r;
|
||||
|
||||
|
@ -285,7 +305,7 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
|
||||
EINA_LIST_FREE(cfdata->resolutions, r)
|
||||
{
|
||||
Ecore_X_Screen_Refresh_Rate *rt;
|
||||
Ecore_X_Randr_Refresh_Rate *rt;
|
||||
|
||||
EINA_LIST_FREE(r->rates, rt)
|
||||
E_FREE(rt);
|
||||
|
@ -296,11 +316,11 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
}
|
||||
|
||||
static int
|
||||
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
int r;
|
||||
Resolution *res;
|
||||
Ecore_X_Screen_Refresh_Rate *rt;
|
||||
Ecore_X_Randr_Refresh_Rate *rt;
|
||||
|
||||
r = e_widget_ilist_selected_get(cfdata->res_list);
|
||||
if (r < 0) return 0;
|
||||
|
@ -311,25 +331,25 @@ _basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfda
|
|||
rt = eina_list_nth(res->rates, r);
|
||||
if (!rt) return 0;
|
||||
|
||||
return (e_config->display_res_restore != cfdata->restore) ||
|
||||
(res->size.width != cfdata->orig_size.width) ||
|
||||
if (!e_screen_config_11) return EINA_FALSE;
|
||||
return ((res->size.width != cfdata->orig_size.width) ||
|
||||
(res->size.height != cfdata->orig_size.height) ||
|
||||
(cfdata->has_rates && (rt->rate != cfdata->orig_rate.rate)) ||
|
||||
(cfdata->has_rates && (*rt != cfdata->orig_rate)) ||
|
||||
(cfdata->can_rotate &&
|
||||
(cfdata->orig_rotation != cfdata->rotation)) ||
|
||||
(cfdata->orig_orientation != cfdata->orientation)) ||
|
||||
(cfdata->can_flip &&
|
||||
(((!(cfdata->orig_flip & ECORE_X_RANDR_FLIP_X)) !=
|
||||
(((!(cfdata->orig_flip & ECORE_X_RANDR_ORIENTATION_FLIP_X)) !=
|
||||
(!cfdata->flip_x)) ||
|
||||
((!(cfdata->orig_flip & ECORE_X_RANDR_FLIP_Y)) !=
|
||||
(!cfdata->flip_y))));
|
||||
((!(cfdata->orig_flip & ECORE_X_RANDR_ORIENTATION_FLIP_Y)) !=
|
||||
(!cfdata->flip_y)))));
|
||||
}
|
||||
|
||||
static int
|
||||
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
int r;
|
||||
Resolution *res;
|
||||
Ecore_X_Screen_Refresh_Rate *rate;
|
||||
Ecore_X_Randr_Refresh_Rate *rate;
|
||||
E_Manager *man;
|
||||
|
||||
r = e_widget_ilist_selected_get(cfdata->res_list);
|
||||
|
@ -341,12 +361,12 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
|
||||
if (!((cfdata->orig_size.width == res->size.width) &&
|
||||
(cfdata->orig_size.height == res->size.height) &&
|
||||
(cfdata->orig_rate.rate == rate->rate || !cfdata->has_rates)))
|
||||
(cfdata->orig_rate == *rate || !cfdata->has_rates)))
|
||||
{
|
||||
if (cfdata->has_rates)
|
||||
ecore_x_randr_screen_refresh_rate_set(man->root, res->size, *rate);
|
||||
ecore_x_randr_screen_primary_output_refresh_rate_set(man->root, res->size_index, *rate);
|
||||
else
|
||||
ecore_x_randr_screen_size_set(man->root, res->size);
|
||||
ecore_x_randr_screen_primary_output_size_set(man->root, res->size_index);
|
||||
|
||||
if (e_config->cnfmdlg_disabled)
|
||||
{
|
||||
|
@ -363,39 +383,40 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
|
||||
if ((cfdata->can_rotate) || (cfdata->can_flip))
|
||||
{
|
||||
cfdata->flip = cfdata->rotation;
|
||||
cfdata->flip = cfdata->orientation;
|
||||
if (cfdata->flip_x)
|
||||
cfdata->flip = (cfdata->flip | ECORE_X_RANDR_FLIP_X);
|
||||
cfdata->flip = (cfdata->flip | ECORE_X_RANDR_ORIENTATION_FLIP_X);
|
||||
if (cfdata->flip_y)
|
||||
cfdata->flip = (cfdata->flip | ECORE_X_RANDR_FLIP_Y);
|
||||
cfdata->flip = (cfdata->flip | ECORE_X_RANDR_ORIENTATION_FLIP_Y);
|
||||
|
||||
ecore_x_randr_screen_rotation_set(man->root,
|
||||
(cfdata->rotation | cfdata->flip));
|
||||
cfdata->orig_rotation = cfdata->rotation;
|
||||
ecore_x_randr_screen_primary_output_orientation_set(man->root,
|
||||
(cfdata->orientation | cfdata->flip));
|
||||
cfdata->orig_orientation = cfdata->orientation;
|
||||
cfdata->orig_flip = cfdata->flip;
|
||||
e_config->display_res_rotation = (cfdata->rotation | cfdata->flip);
|
||||
if (e_screen_config_11)
|
||||
e_screen_config_11->orientation = (cfdata->orientation | cfdata->flip);
|
||||
}
|
||||
else
|
||||
e_config->display_res_rotation = 0;
|
||||
if (e_screen_config_11)
|
||||
e_screen_config_11->orientation = 0;
|
||||
|
||||
e_config->display_res_restore = cfdata->restore;
|
||||
e_config_save_queue();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
Evas_Object *o, *of, *ob, *ot;
|
||||
E_Radio_Group *rg;
|
||||
E_Manager *man;
|
||||
Ecore_X_Screen_Size *sizes;
|
||||
Ecore_X_Randr_Screen_Size_MM *sizes;
|
||||
int i, s;
|
||||
|
||||
o = e_widget_table_add(evas, 0);
|
||||
|
||||
of = e_widget_framelist_add(evas, _("Resolution"), 0);
|
||||
of = e_widget_framelist_add(evas, _("Resolution"), 0);
|
||||
ob = e_widget_ilist_add(evas, 16, 16, NULL);
|
||||
cfdata->res_list = ob;
|
||||
e_widget_size_min_set(ob, 170, 215);
|
||||
|
@ -406,7 +427,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
e_widget_table_object_append(o, ob, 0, 1, 2, 1, 1, 1, 0, 0);
|
||||
|
||||
ot = e_widget_table_add(evas, 0);
|
||||
of = e_widget_framelist_add(evas, _("Refresh"), 0);
|
||||
of = e_widget_framelist_add(evas, _("Refresh"), 0);
|
||||
ob = e_widget_ilist_add(evas, 16, 16, NULL);
|
||||
cfdata->rate_list = ob;
|
||||
e_widget_size_min_set(ob, 100, 80);
|
||||
|
@ -414,20 +435,20 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
e_widget_table_object_append(ot, of, 0, 0, 1, 1, 1, 1, 1, 1);
|
||||
|
||||
man = e_manager_current_get();
|
||||
sizes = ecore_x_randr_screen_sizes_get(man->root, &s);
|
||||
sizes = ecore_x_randr_screen_primary_output_sizes_get(man->root, &s);
|
||||
cfdata->has_rates = 0;
|
||||
|
||||
if ((!sizes) || (s == 0))
|
||||
ecore_timer_add(0.5, _deferred_noxrandr_error, NULL);
|
||||
else
|
||||
{
|
||||
cfdata->orig_size = ecore_x_randr_current_screen_size_get(man->root);
|
||||
cfdata->orig_rate = ecore_x_randr_current_screen_refresh_rate_get(man->root);
|
||||
ecore_x_randr_screen_primary_output_current_size_get(man->root, &cfdata->orig_size.width, &cfdata->orig_size.height, NULL, NULL, &cfdata->orig_size_index);
|
||||
cfdata->orig_rate = ecore_x_randr_screen_primary_output_current_refresh_rate_get(man->root);
|
||||
|
||||
for (i = 0; i < (s - 1); i++)
|
||||
{
|
||||
Resolution * res;
|
||||
Ecore_X_Screen_Refresh_Rate * rates;
|
||||
Ecore_X_Randr_Refresh_Rate * rates;
|
||||
int r = 0, j;
|
||||
|
||||
res = E_NEW(Resolution, 1);
|
||||
|
@ -435,22 +456,23 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
|
||||
res->size.width = sizes[i].width;
|
||||
res->size.height = sizes[i].height;
|
||||
rates = ecore_x_randr_screen_refresh_rates_get(man->root, i, &r);
|
||||
res->size_index = i;
|
||||
rates = ecore_x_randr_screen_primary_output_refresh_rates_get(man->root, i, &r);
|
||||
for (j = 0; j < r; j++)
|
||||
{
|
||||
Ecore_X_Screen_Refresh_Rate * rt;
|
||||
Ecore_X_Randr_Refresh_Rate * rt;
|
||||
|
||||
cfdata->has_rates = 1;
|
||||
rt = E_NEW(Ecore_X_Screen_Refresh_Rate, 1);
|
||||
rt = E_NEW(Ecore_X_Randr_Refresh_Rate, 1);
|
||||
if (!rt) continue;
|
||||
rt->rate = rates[j].rate;
|
||||
*rt = rates[j];
|
||||
res->rates = eina_list_append(res->rates, rt);
|
||||
}
|
||||
if (rates) E_FREE(rates);
|
||||
cfdata->resolutions = eina_list_append(cfdata->resolutions, res);
|
||||
}
|
||||
|
||||
cfdata->resolutions = eina_list_sort(cfdata->resolutions,
|
||||
cfdata->resolutions = eina_list_sort(cfdata->resolutions,
|
||||
eina_list_count(cfdata->resolutions), _sort_resolutions);
|
||||
cfdata->resolutions = eina_list_reverse(cfdata->resolutions);
|
||||
|
||||
|
@ -466,19 +488,19 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
if (cfdata->can_rotate)
|
||||
{
|
||||
of = e_widget_framelist_add(evas, _("Rotation"), 0);
|
||||
rg = e_widget_radio_group_new(&(cfdata->rotation));
|
||||
ob = e_widget_radio_icon_add(evas, NULL, "preferences-screen-normal", 24, 24, ECORE_X_RANDR_ROT_0, rg);
|
||||
rg = e_widget_radio_group_new(&(cfdata->orientation));
|
||||
ob = e_widget_radio_icon_add(evas, NULL, "preferences-screen-normal", 24, 24, ECORE_X_RANDR_ORIENTATION_ROT_0, rg);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
if (!(cfdata->can_rotate & ECORE_X_RANDR_ROT_0)) e_widget_disabled_set(ob, 1);
|
||||
ob = e_widget_radio_icon_add(evas, NULL, "preferences-screen-left", 24, 24, ECORE_X_RANDR_ROT_90, rg);
|
||||
if (!(cfdata->can_rotate & ECORE_X_RANDR_ORIENTATION_ROT_0)) e_widget_disabled_set(ob, 1);
|
||||
ob = e_widget_radio_icon_add(evas, NULL, "preferences-screen-left", 24, 24, ECORE_X_RANDR_ORIENTATION_ROT_90, rg);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
if (!(cfdata->can_rotate & ECORE_X_RANDR_ROT_90)) e_widget_disabled_set(ob, 1);
|
||||
ob = e_widget_radio_icon_add(evas, NULL, "preferences-screen-around", 24, 24, ECORE_X_RANDR_ROT_180, rg);
|
||||
if (!(cfdata->can_rotate & ECORE_X_RANDR_ORIENTATION_ROT_90)) e_widget_disabled_set(ob, 1);
|
||||
ob = e_widget_radio_icon_add(evas, NULL, "preferences-screen-around", 24, 24, ECORE_X_RANDR_ORIENTATION_ROT_180, rg);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
if (!(cfdata->can_rotate & ECORE_X_RANDR_ROT_180)) e_widget_disabled_set(ob, 1);
|
||||
ob = e_widget_radio_icon_add(evas, NULL, "preferences-screen-right", 24, 24, ECORE_X_RANDR_ROT_270, rg);
|
||||
if (!(cfdata->can_rotate & ECORE_X_RANDR_ORIENTATION_ROT_180)) e_widget_disabled_set(ob, 1);
|
||||
ob = e_widget_radio_icon_add(evas, NULL, "preferences-screen-right", 24, 24, ECORE_X_RANDR_ORIENTATION_ROT_270, rg);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
if (!(cfdata->can_rotate & ECORE_X_RANDR_ROT_270)) e_widget_disabled_set(ob, 1);
|
||||
if (!(cfdata->can_rotate & ECORE_X_RANDR_ORIENTATION_ROT_270)) e_widget_disabled_set(ob, 1);
|
||||
e_widget_table_object_append(ot, of, 0, 1, 1, 1, 1, 0, 1, 0);
|
||||
}
|
||||
|
||||
|
@ -487,10 +509,10 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
of = e_widget_framelist_add(evas, _("Mirroring"), 0);
|
||||
ob = e_widget_check_icon_add(evas, NULL, "preferences-screen-hflip", 24, 24, &(cfdata->flip_x));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
if (!(cfdata->can_flip & ECORE_X_RANDR_FLIP_X)) e_widget_disabled_set(ob, 1);
|
||||
if (!(cfdata->can_flip & ECORE_X_RANDR_ORIENTATION_FLIP_X)) e_widget_disabled_set(ob, 1);
|
||||
ob = e_widget_check_icon_add(evas, NULL, "preferences-screen-vflip", 24, 24, &(cfdata->flip_y));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
if (!(cfdata->can_flip & ECORE_X_RANDR_FLIP_Y))
|
||||
if (!(cfdata->can_flip & ECORE_X_RANDR_ORIENTATION_FLIP_Y))
|
||||
e_widget_disabled_set(ob, 1);
|
||||
e_widget_table_object_append(ot, of, 0, 2, 1, 1, 1, 0, 1, 0);
|
||||
}
|
||||
|
@ -545,7 +567,7 @@ _load_resolutions(E_Config_Dialog_Data *cfdata)
|
|||
e_util_icon_theme_set(ob, "dialog-ok-apply");
|
||||
sel = res->id;
|
||||
}
|
||||
e_widget_ilist_append(cfdata->res_list, ob, buf,
|
||||
e_widget_ilist_append(cfdata->res_list, ob, buf,
|
||||
_ilist_item_change, cfdata, NULL);
|
||||
}
|
||||
|
||||
|
@ -593,16 +615,16 @@ _load_rates(E_Config_Dialog_Data *cfdata)
|
|||
EINA_LIST_FOREACH(cfdata->resolutions, l, res)
|
||||
if (res->id == r)
|
||||
{
|
||||
Ecore_X_Screen_Refresh_Rate *rt;
|
||||
Ecore_X_Randr_Refresh_Rate *rt;
|
||||
Eina_List *ll;
|
||||
|
||||
EINA_LIST_FOREACH(res->rates, ll, rt)
|
||||
{
|
||||
Evas_Object *ob = NULL;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%i Hz", rt->rate);
|
||||
snprintf(buf, sizeof(buf), "%i Hz", (int)*rt);
|
||||
|
||||
if (rt->rate == cfdata->orig_rate.rate)
|
||||
if (*rt == cfdata->orig_rate)
|
||||
{
|
||||
ob = e_icon_add(evas);
|
||||
e_util_icon_theme_set(ob, "dialog-ok-apply");
|
||||
|
@ -622,7 +644,7 @@ _load_rates(E_Config_Dialog_Data *cfdata)
|
|||
}
|
||||
|
||||
static void
|
||||
_ilist_item_change(void *data)
|
||||
_ilist_item_change(void *data)
|
||||
{
|
||||
_load_rates(data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue