forked from enlightenment/enlightenment
parent
198e6aaf52
commit
f66c6c6f2c
|
@ -71,10 +71,11 @@ static Eina_Bool _e_border_cb_window_focus_in(void *data,
|
|||
static Eina_Bool _e_border_cb_window_focus_out(void *data,
|
||||
int ev_type,
|
||||
void *ev);
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
static Eina_Bool _e_border_cb_client_message(void *data,
|
||||
int ev_type,
|
||||
void *ev);
|
||||
|
||||
#endif
|
||||
static Eina_Bool _e_border_cb_window_state_request(void *data,
|
||||
int ev_type,
|
||||
void *ev);
|
||||
|
@ -127,10 +128,11 @@ static Eina_Bool _e_border_cb_grab_replay(void *data,
|
|||
void *event);
|
||||
static void _e_border_cb_drag_finished(E_Drag *drag,
|
||||
int dropped);
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
static Eina_Bool _e_border_cb_desk_window_profile_change(void *data,
|
||||
int ev_type,
|
||||
void *ev);
|
||||
|
||||
#endif
|
||||
static void _e_border_eval(E_Border *bd);
|
||||
static void _e_border_eval0(E_Border *bd);
|
||||
static void _e_border_container_layout_hook(E_Container *con);
|
||||
|
@ -319,8 +321,10 @@ e_border_init(void)
|
|||
_e_border_cb_window_focus_in, NULL);
|
||||
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_FOCUS_OUT,
|
||||
_e_border_cb_window_focus_out, NULL);
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_CLIENT_MESSAGE,
|
||||
_e_border_cb_client_message, NULL);
|
||||
#endif
|
||||
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_STATE_REQUEST,
|
||||
_e_border_cb_window_state_request, NULL);
|
||||
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST,
|
||||
|
@ -342,9 +346,10 @@ e_border_init(void)
|
|||
_e_border_cb_config_icon_theme, NULL);
|
||||
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CONFIG_MODE_CHANGED,
|
||||
_e_border_cb_config_mode, NULL);
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
E_LIST_HANDLER_APPEND(handlers, E_EVENT_DESK_WINDOW_PROFILE_CHANGE,
|
||||
_e_border_cb_desk_window_profile_change, NULL);
|
||||
|
||||
#endif
|
||||
if (!borders_hash) borders_hash = eina_hash_string_superfast_new(NULL);
|
||||
|
||||
E_EVENT_BORDER_ADD = ecore_event_type_new();
|
||||
|
@ -667,9 +672,11 @@ e_border_new(E_Container *con,
|
|||
video_parent = EINA_TRUE;
|
||||
else if (atoms[i] == ECORE_X_ATOM_E_VIDEO_POSITION)
|
||||
video_position = EINA_TRUE;
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
/* loop to check for window profile list atom */
|
||||
else if (atoms[i] == ECORE_X_ATOM_E_WINDOW_PROFILE_SUPPORTED)
|
||||
bd->client.e.fetch.profile = 1;
|
||||
#endif
|
||||
}
|
||||
if (video_position && video_parent)
|
||||
{
|
||||
|
@ -942,6 +949,7 @@ e_border_desk_set(E_Border *bd,
|
|||
E_OBJECT_CHECK(desk);
|
||||
E_OBJECT_TYPE_CHECK(desk, E_DESK_TYPE);
|
||||
if (bd->desk == desk) return;
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
if ((e_config->use_desktop_window_profile) &&
|
||||
(bd->client.e.state.profile.use))
|
||||
{
|
||||
|
@ -954,6 +962,7 @@ e_border_desk_set(E_Border *bd,
|
|||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ecore_x_window_shadow_tree_flush();
|
||||
if (bd->fullscreen)
|
||||
{
|
||||
|
@ -4832,6 +4841,7 @@ e_border_resize_limit(E_Border *bd,
|
|||
static void
|
||||
_e_border_free(E_Border *bd)
|
||||
{
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
if (bd->client.e.state.profile.use)
|
||||
{
|
||||
if (bd->client.e.state.profile.available_list)
|
||||
|
@ -4860,6 +4870,7 @@ _e_border_free(E_Border *bd)
|
|||
bd->client.e.state.profile.wait_for_done = 0;
|
||||
bd->client.e.state.profile.use = 0;
|
||||
}
|
||||
#endif
|
||||
if (bd->client.e.state.video_parent && bd->client.e.state.video_parent_border)
|
||||
{
|
||||
bd->client.e.state.video_parent_border->client.e.state.video_child =
|
||||
|
@ -5874,6 +5885,7 @@ _e_border_cb_window_property(void *data __UNUSED__,
|
|||
bd->client.netwm.fetch.state = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
else if (e->atom == ECORE_X_ATOM_E_WINDOW_PROFILE_SUPPORTED)
|
||||
{
|
||||
bd->client.e.fetch.profile = 1;
|
||||
|
@ -5884,7 +5896,7 @@ _e_border_cb_window_property(void *data __UNUSED__,
|
|||
bd->client.e.fetch.profile = 1;
|
||||
bd->changed = 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
|
@ -6108,6 +6120,7 @@ _e_border_cb_window_focus_out(void *data __UNUSED__,
|
|||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
static Eina_Bool
|
||||
_e_border_cb_client_message(void *data __UNUSED__,
|
||||
int ev_type __UNUSED__,
|
||||
|
@ -6160,7 +6173,7 @@ _e_border_cb_client_message(void *data __UNUSED__,
|
|||
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
#endif
|
||||
static Eina_Bool
|
||||
_e_border_cb_window_state_request(void *data __UNUSED__,
|
||||
int ev_type __UNUSED__,
|
||||
|
@ -7061,6 +7074,7 @@ _e_border_cb_drag_finished(E_Drag *drag,
|
|||
drag_border = NULL;
|
||||
}
|
||||
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
static Eina_Bool
|
||||
_e_border_cb_desk_window_profile_change(void *data __UNUSED__,
|
||||
int ev_type __UNUSED__,
|
||||
|
@ -7081,7 +7095,7 @@ _e_border_cb_desk_window_profile_change(void *data __UNUSED__,
|
|||
}
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
#endif
|
||||
static Eina_Bool
|
||||
_e_border_post_move_resize_job(void *data)
|
||||
{
|
||||
|
@ -7176,7 +7190,6 @@ _e_border_eval0(E_Border *bd)
|
|||
{
|
||||
int change_urgent = 0;
|
||||
int rem_change = 0;
|
||||
Eina_Bool need_desk_set = EINA_FALSE;
|
||||
|
||||
if (e_object_is_del(E_OBJECT(bd)))
|
||||
{
|
||||
|
@ -7305,8 +7318,10 @@ _e_border_eval0(E_Border *bd)
|
|||
bd->client.e.fetch.state = 0;
|
||||
rem_change = 1;
|
||||
}
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
if (bd->client.e.fetch.profile)
|
||||
{
|
||||
Eina_Bool need_desk_set = EINA_FALSE;
|
||||
const char **list = NULL;
|
||||
int n, i, res;
|
||||
unsigned int use;
|
||||
|
@ -7368,6 +7383,7 @@ _e_border_eval0(E_Border *bd)
|
|||
|
||||
bd->client.e.fetch.profile = 0;
|
||||
}
|
||||
#endif
|
||||
if (bd->client.netwm.fetch.type)
|
||||
{
|
||||
e_hints_window_type_get(bd);
|
||||
|
@ -7993,6 +8009,7 @@ _e_border_eval0(E_Border *bd)
|
|||
bd->client.netwm.update.state = 0;
|
||||
}
|
||||
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
if ((e_config->use_desktop_window_profile) && (need_desk_set))
|
||||
{
|
||||
if (!(bd->client.e.state.profile.name) &&
|
||||
|
@ -8041,7 +8058,7 @@ _e_border_eval0(E_Border *bd)
|
|||
bd->client.e.state.profile.name);
|
||||
bd->client.e.state.profile.wait_for_done = 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
if (bd->new_client)
|
||||
{
|
||||
E_Event_Border_Add *ev;
|
||||
|
|
|
@ -393,6 +393,7 @@ struct _E_Border
|
|||
Ecore_X_Window video_parent;
|
||||
E_Border *video_parent_border;
|
||||
Eina_List *video_child;
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
struct
|
||||
{
|
||||
const char *name;
|
||||
|
@ -401,7 +402,7 @@ struct _E_Border
|
|||
unsigned char wait_for_done : 1;
|
||||
unsigned char use : 1;
|
||||
} profile;
|
||||
|
||||
#endif
|
||||
unsigned char centered : 1;
|
||||
unsigned char video : 1;
|
||||
} state;
|
||||
|
@ -411,7 +412,9 @@ struct _E_Border
|
|||
unsigned char state : 1;
|
||||
unsigned char video_parent : 1;
|
||||
unsigned char video_position : 1;
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
unsigned char profile : 1;
|
||||
#endif
|
||||
} fetch;
|
||||
} e;
|
||||
|
||||
|
|
|
@ -18,7 +18,9 @@ static Eina_Bool _e_desk_show_animator(void *data);
|
|||
static void _e_desk_hide_begin(E_Desk *desk, int mode, int dx, int dy);
|
||||
static void _e_desk_hide_end(E_Desk *desk);
|
||||
static Eina_Bool _e_desk_hide_animator(void *data);
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
static void _e_desk_window_profile_change_protocol_set(void);
|
||||
#endif
|
||||
|
||||
EAPI int E_EVENT_DESK_SHOW = 0;
|
||||
EAPI int E_EVENT_DESK_BEFORE_SHOW = 0;
|
||||
|
@ -605,6 +607,7 @@ e_desk_window_profile_del(int container,
|
|||
}
|
||||
}
|
||||
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
EAPI void
|
||||
e_desk_window_profile_update(void)
|
||||
{
|
||||
|
@ -658,6 +661,7 @@ e_desk_window_profile_update(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
_e_desk_free(E_Desk *desk)
|
||||
|
@ -1057,6 +1061,7 @@ _e_desk_hide_animator(void *data)
|
|||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
static void
|
||||
_e_desk_window_profile_change_protocol_set(void)
|
||||
{
|
||||
|
@ -1069,3 +1074,4 @@ _e_desk_window_profile_change_protocol_set(void)
|
|||
(man->root, e_config->use_desktop_window_profile);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -79,7 +79,9 @@ EAPI void e_desk_col_remove(E_Zone *zone);
|
|||
EAPI void e_desk_window_profile_set(E_Desk *desk, const char *profile);
|
||||
EAPI void e_desk_window_profile_add(int container, int zone, int desk_x, int desk_y, const char *profile);
|
||||
EAPI void e_desk_window_profile_del(int container, int zone, int desk_x, int desk_y);
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
EAPI void e_desk_window_profile_update(void);
|
||||
#endif
|
||||
|
||||
extern EAPI int E_EVENT_DESK_SHOW;
|
||||
extern EAPI int E_EVENT_DESK_BEFORE_SHOW;
|
||||
|
|
|
@ -1680,8 +1680,10 @@ _e_main_screens_init(void)
|
|||
free(roots);
|
||||
return 0;
|
||||
}
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
ecore_x_e_window_profile_supported_set(roots[i],
|
||||
e_config->use_desktop_window_profile);
|
||||
#endif
|
||||
}
|
||||
free(roots);
|
||||
|
||||
|
|
|
@ -160,8 +160,9 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
cfdata->desk_x, cfdata->desk_y);
|
||||
e_desk_window_profile_add(cfdata->con_num, cfdata->zone_num,
|
||||
cfdata->desk_x, cfdata->desk_y, cfdata->profile);
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
e_desk_window_profile_update();
|
||||
|
||||
#endif
|
||||
e_bg_del(cfdata->con_num, cfdata->zone_num, cfdata->desk_x, cfdata->desk_y);
|
||||
e_bg_add(cfdata->con_num, cfdata->zone_num,
|
||||
cfdata->desk_x, cfdata->desk_y, cfdata->bg);
|
||||
|
|
|
@ -17,7 +17,9 @@ struct _E_Config_Dialog_Data
|
|||
int y;
|
||||
int edge_flip_dragging;
|
||||
int flip_wrap;
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
int use_desktop_window_profile;
|
||||
#endif
|
||||
int flip_mode;
|
||||
int flip_interp;
|
||||
double flip_speed;
|
||||
|
@ -61,7 +63,9 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
cfdata->y = e_config->zone_desks_y_count;
|
||||
cfdata->edge_flip_dragging = e_config->edge_flip_dragging;
|
||||
cfdata->flip_wrap = e_config->desk_flip_wrap;
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
cfdata->use_desktop_window_profile = e_config->use_desktop_window_profile;
|
||||
#endif
|
||||
cfdata->flip_mode = e_config->desk_flip_animate_mode;
|
||||
cfdata->flip_interp = e_config->desk_flip_animate_interpolation;
|
||||
cfdata->flip_speed = e_config->desk_flip_animate_time;
|
||||
|
@ -107,12 +111,13 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
e_config->edge_flip_dragging = cfdata->edge_flip_dragging;
|
||||
e_config->desk_flip_wrap = cfdata->flip_wrap;
|
||||
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
if (e_config->use_desktop_window_profile != cfdata->use_desktop_window_profile)
|
||||
{
|
||||
e_config->use_desktop_window_profile = cfdata->use_desktop_window_profile;
|
||||
e_desk_window_profile_update();
|
||||
}
|
||||
|
||||
#endif
|
||||
e_config_save_queue();
|
||||
return 1; /* Apply was OK */
|
||||
}
|
||||
|
@ -140,8 +145,12 @@ _basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfda
|
|||
(e_config->desk_flip_animate_interpolation != cfdata->flip_interp) ||
|
||||
(e_config->desk_flip_animate_time != cfdata->flip_speed) ||
|
||||
(e_config->edge_flip_dragging != cfdata->edge_flip_dragging) ||
|
||||
(e_config->desk_flip_wrap != cfdata->flip_wrap) ||
|
||||
(e_config->use_desktop_window_profile != cfdata->use_desktop_window_profile));
|
||||
(e_config->desk_flip_wrap != cfdata->flip_wrap)
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
||
|
||||
(e_config->use_desktop_window_profile != cfdata->use_desktop_window_profile)
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
/**--GUI--**/
|
||||
|
@ -187,7 +196,7 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
|
|||
e_widget_framelist_object_append(of, ob);
|
||||
|
||||
e_widget_list_object_append(o, of, 1, 0, 0.5);
|
||||
|
||||
#if (ECORE_VERSION_MAJOR > 1) || (ECORE_VERSION_MINOR >= 8)
|
||||
of = e_widget_framelist_add(evas, _("Desktop Window Profile"), 0);
|
||||
|
||||
ob = e_widget_check_add(evas, _("Use desktop window profile"),
|
||||
|
@ -195,7 +204,7 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
|
|||
e_widget_framelist_object_append(of, ob);
|
||||
|
||||
e_widget_list_object_append(o, of, 1, 0, 0.5);
|
||||
|
||||
#endif
|
||||
e_widget_toolbook_page_append(otb, NULL, _("Desktops"), o, 1, 1, 1, 1,
|
||||
0.5, 0.0);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
/* Increment for Major Changes */
|
||||
#define MOD_CONFIG_FILE_EPOCH 0x0001
|
||||
/* Increment for Minor Changes (ie: user doesn't need a new config) */
|
||||
#define MOD_CONFIG_FILE_GENERATION 0x0116
|
||||
#define MOD_CONFIG_FILE_GENERATION 0x0117
|
||||
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH << 16) | MOD_CONFIG_FILE_GENERATION)
|
||||
|
||||
typedef struct _Config Config;
|
||||
|
|
Loading…
Reference in New Issue