forked from enlightenment/enlightenment
use default x cursor optionally. doesn't have an immediate effect when changed with enlightenment_remote. need to support cursors for hotspots like resize handles etc
SVN revision: 16967
This commit is contained in:
parent
0e10739f44
commit
51c87a5c30
|
@ -29,6 +29,7 @@
|
||||||
#include <Ecore_Config.h>
|
#include <Ecore_Config.h>
|
||||||
#include <Ecore_File.h>
|
#include <Ecore_File.h>
|
||||||
#include <Ecore_X_Atoms.h>
|
#include <Ecore_X_Atoms.h>
|
||||||
|
#include <Ecore_X_Cursor.h>
|
||||||
#include <Eet.h>
|
#include <Eet.h>
|
||||||
#include <Edje.h>
|
#include <Edje.h>
|
||||||
|
|
||||||
|
|
|
@ -329,6 +329,7 @@ e_config_init(void)
|
||||||
E_CONFIG_VAL(D, T, resize_info_follows, INT); /**/
|
E_CONFIG_VAL(D, T, resize_info_follows, INT); /**/
|
||||||
E_CONFIG_VAL(D, T, focus_last_focused_per_desktop, INT); /**/
|
E_CONFIG_VAL(D, T, focus_last_focused_per_desktop, INT); /**/
|
||||||
E_CONFIG_VAL(D, T, focus_revert_on_hide_or_close, INT); /**/
|
E_CONFIG_VAL(D, T, focus_revert_on_hide_or_close, INT); /**/
|
||||||
|
E_CONFIG_VAL(D, T, use_e_cursor, INT); /**/
|
||||||
E_CONFIG_VAL(D, T, cursor_size, INT); /**/
|
E_CONFIG_VAL(D, T, cursor_size, INT); /**/
|
||||||
E_CONFIG_VAL(D, T, menu_autoscroll_margin, INT); /**/
|
E_CONFIG_VAL(D, T, menu_autoscroll_margin, INT); /**/
|
||||||
E_CONFIG_VAL(D, T, menu_autoscroll_cursor_margin, INT); /**/
|
E_CONFIG_VAL(D, T, menu_autoscroll_cursor_margin, INT); /**/
|
||||||
|
@ -446,6 +447,7 @@ e_config_init(void)
|
||||||
e_config->resize_info_follows = 1;
|
e_config->resize_info_follows = 1;
|
||||||
e_config->focus_last_focused_per_desktop = 1;
|
e_config->focus_last_focused_per_desktop = 1;
|
||||||
e_config->focus_revert_on_hide_or_close = 1;
|
e_config->focus_revert_on_hide_or_close = 1;
|
||||||
|
e_config->use_e_cursor = 1;
|
||||||
e_config->cursor_size = 32;
|
e_config->cursor_size = 32;
|
||||||
e_config->menu_autoscroll_margin = 0;
|
e_config->menu_autoscroll_margin = 0;
|
||||||
e_config->menu_autoscroll_cursor_margin = 1;
|
e_config->menu_autoscroll_cursor_margin = 1;
|
||||||
|
@ -1393,6 +1395,7 @@ e_config_init(void)
|
||||||
E_CONFIG_LIMIT(e_config->resize_info_follows, 0, 1);
|
E_CONFIG_LIMIT(e_config->resize_info_follows, 0, 1);
|
||||||
E_CONFIG_LIMIT(e_config->focus_last_focused_per_desktop, 0, 1);
|
E_CONFIG_LIMIT(e_config->focus_last_focused_per_desktop, 0, 1);
|
||||||
E_CONFIG_LIMIT(e_config->focus_revert_on_hide_or_close, 0, 1);
|
E_CONFIG_LIMIT(e_config->focus_revert_on_hide_or_close, 0, 1);
|
||||||
|
E_CONFIG_LIMIT(e_config->use_e_cursor, 0, 1);
|
||||||
E_CONFIG_LIMIT(e_config->cursor_size, 0, 1024);
|
E_CONFIG_LIMIT(e_config->cursor_size, 0, 1024);
|
||||||
E_CONFIG_LIMIT(e_config->menu_autoscroll_margin, 0, 50);
|
E_CONFIG_LIMIT(e_config->menu_autoscroll_margin, 0, 50);
|
||||||
E_CONFIG_LIMIT(e_config->menu_autoscroll_cursor_margin, 0, 50);
|
E_CONFIG_LIMIT(e_config->menu_autoscroll_cursor_margin, 0, 50);
|
||||||
|
|
|
@ -147,6 +147,7 @@ struct _E_Config
|
||||||
int resize_info_follows;
|
int resize_info_follows;
|
||||||
int focus_last_focused_per_desktop;
|
int focus_last_focused_per_desktop;
|
||||||
int focus_revert_on_hide_or_close;
|
int focus_revert_on_hide_or_close;
|
||||||
|
int use_e_cursor;
|
||||||
int cursor_size;
|
int cursor_size;
|
||||||
int menu_autoscroll_margin;
|
int menu_autoscroll_margin;
|
||||||
int menu_autoscroll_cursor_margin;
|
int menu_autoscroll_cursor_margin;
|
||||||
|
|
|
@ -122,7 +122,13 @@ e_container_new(E_Manager *man)
|
||||||
evas_object_data_set(o, "e_container", con);
|
evas_object_data_set(o, "e_container", con);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
|
if (e_config->use_e_cursor)
|
||||||
con->pointer.root = e_pointer_window_set(con->manager->root);
|
con->pointer.root = e_pointer_window_set(con->manager->root);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ecore_x_window_cursor_set (con->manager->root,
|
||||||
|
ecore_x_cursor_shape_get (ECORE_X_CURSOR_LEFT_PTR));
|
||||||
|
}
|
||||||
|
|
||||||
con->num = container_num;
|
con->num = container_num;
|
||||||
container_num++;
|
container_num++;
|
||||||
|
|
|
@ -61,7 +61,16 @@ e_init_init(void)
|
||||||
_e_init_evas = ecore_evas_get(_e_init_ecore_evas);
|
_e_init_evas = ecore_evas_get(_e_init_ecore_evas);
|
||||||
ecore_evas_name_class_set(_e_init_ecore_evas, "E", "Init_Window");
|
ecore_evas_name_class_set(_e_init_ecore_evas, "E", "Init_Window");
|
||||||
ecore_evas_title_set(_e_init_ecore_evas, "Enlightenment Init");
|
ecore_evas_title_set(_e_init_ecore_evas, "Enlightenment Init");
|
||||||
|
|
||||||
|
if (e_config->use_e_cursor)
|
||||||
_e_init_pointer = e_pointer_window_set(_e_init_win);
|
_e_init_pointer = e_pointer_window_set(_e_init_win);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_e_init_pointer = NULL;
|
||||||
|
ecore_x_window_cursor_set (_e_init_win,
|
||||||
|
ecore_x_cursor_shape_get (ECORE_X_CURSOR_LEFT_PTR));
|
||||||
|
}
|
||||||
|
|
||||||
ecore_evas_raise(_e_init_ecore_evas);
|
ecore_evas_raise(_e_init_ecore_evas);
|
||||||
ecore_evas_show(_e_init_ecore_evas);
|
ecore_evas_show(_e_init_ecore_evas);
|
||||||
|
|
||||||
|
@ -145,12 +154,17 @@ e_init_hide(void)
|
||||||
evas_object_del(_e_init_object);
|
evas_object_del(_e_init_object);
|
||||||
e_canvas_del(_e_init_ecore_evas);
|
e_canvas_del(_e_init_ecore_evas);
|
||||||
ecore_evas_free(_e_init_ecore_evas);
|
ecore_evas_free(_e_init_ecore_evas);
|
||||||
|
|
||||||
|
if (_e_init_pointer)
|
||||||
|
{
|
||||||
e_object_del(E_OBJECT(_e_init_pointer));
|
e_object_del(E_OBJECT(_e_init_pointer));
|
||||||
|
_e_init_pointer = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
_e_init_ecore_evas = NULL;
|
_e_init_ecore_evas = NULL;
|
||||||
_e_init_evas = NULL;
|
_e_init_evas = NULL;
|
||||||
_e_init_win = 0;
|
_e_init_win = 0;
|
||||||
_e_init_object = NULL;
|
_e_init_object = NULL;
|
||||||
_e_init_pointer = NULL;
|
|
||||||
e_canvas_cache_flush();
|
e_canvas_cache_flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4818,6 +4818,48 @@ break;
|
||||||
#undef HDL
|
#undef HDL
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#define HDL E_IPC_OP_USE_E_CURSOR_SET
|
||||||
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
|
OP("-use-e-cursor-set", 1, "Set whether E's cursor should be used", 0, HDL)
|
||||||
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
|
REQ_INT(atoi(params[0]), HDL);
|
||||||
|
#elif (TYPE == E_WM_IN)
|
||||||
|
START_INT(val, HDL);
|
||||||
|
e_config->use_e_cursor = val;
|
||||||
|
E_CONFIG_LIMIT(e_config->use_e_cursor, 0, 1);
|
||||||
|
SAVE;
|
||||||
|
END_INT;
|
||||||
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
|
#endif
|
||||||
|
#undef HDL
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
#define HDL E_IPC_OP_USE_E_CURSOR_GET
|
||||||
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
|
OP("-use-e-cursor-get", 0, "Get whether E's cursor should be used", 1, HDL)
|
||||||
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
|
REQ_NULL(HDL);
|
||||||
|
#elif (TYPE == E_WM_IN)
|
||||||
|
SEND_INT(e_config->use_e_cursor, E_IPC_OP_CURSOR_SIZE_GET_REPLY, HDL);
|
||||||
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
|
#endif
|
||||||
|
#undef HDL
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
#define HDL E_IPC_OP_USE_E_CURSOR_GET_REPLY
|
||||||
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
|
#elif (TYPE == E_REMOTE_OUT)
|
||||||
|
#elif (TYPE == E_WM_IN)
|
||||||
|
#elif (TYPE == E_REMOTE_IN)
|
||||||
|
START_INT(val, HDL);
|
||||||
|
printf("REPLY: %d\n", val);
|
||||||
|
END_INT;
|
||||||
|
#endif
|
||||||
|
#undef HDL
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
#define HDL E_IPC_OP_MENU_AUTOSCROLL_MARGIN_SET
|
#define HDL E_IPC_OP_MENU_AUTOSCROLL_MARGIN_SET
|
||||||
#if (TYPE == E_REMOTE_OPTIONS)
|
#if (TYPE == E_REMOTE_OPTIONS)
|
||||||
OP("-menu-autoscroll-margin-set", 1, "Set the distance from the edge of the screen the menu will autoscroll to", 0, HDL)
|
OP("-menu-autoscroll-margin-set", 1, "Set the distance from the edge of the screen the menu will autoscroll to", 0, HDL)
|
||||||
|
|
|
@ -272,3 +272,7 @@
|
||||||
#define E_IPC_OP_BINDING_WHEEL_LIST_REPLY 267
|
#define E_IPC_OP_BINDING_WHEEL_LIST_REPLY 267
|
||||||
#define E_IPC_OP_BINDING_WHEEL_ADD 268
|
#define E_IPC_OP_BINDING_WHEEL_ADD 268
|
||||||
#define E_IPC_OP_BINDING_WHEEL_DEL 269
|
#define E_IPC_OP_BINDING_WHEEL_DEL 269
|
||||||
|
|
||||||
|
#define E_IPC_OP_USE_E_CURSOR_SET 270
|
||||||
|
#define E_IPC_OP_USE_E_CURSOR_GET 271
|
||||||
|
#define E_IPC_OP_USE_E_CURSOR_GET_REPLY 272
|
||||||
|
|
Loading…
Reference in New Issue