forked from enlightenment/efl
Ecore_X: Fix formatting of new xfixes code (someone's editor is not
indenting correctly) ;) Fix formatting of some existing code to declare variables at the top of functions. Remove some unused variables. SVN revision: 62209
This commit is contained in:
parent
c416b7c843
commit
9afbe23fe2
|
@ -186,6 +186,7 @@ _ecore_xcb_events_init(void)
|
||||||
ECORE_X_EVENT_SELECTION_CLEAR = ecore_event_type_new();
|
ECORE_X_EVENT_SELECTION_CLEAR = ecore_event_type_new();
|
||||||
ECORE_X_EVENT_SELECTION_REQUEST = ecore_event_type_new();
|
ECORE_X_EVENT_SELECTION_REQUEST = ecore_event_type_new();
|
||||||
ECORE_X_EVENT_SELECTION_NOTIFY = ecore_event_type_new();
|
ECORE_X_EVENT_SELECTION_NOTIFY = ecore_event_type_new();
|
||||||
|
ECORE_X_EVENT_FIXES_SELECTION_NOTIFY = ecore_event_type_new();
|
||||||
ECORE_X_EVENT_CLIENT_MESSAGE = ecore_event_type_new();
|
ECORE_X_EVENT_CLIENT_MESSAGE = ecore_event_type_new();
|
||||||
ECORE_X_EVENT_WINDOW_SHAPE = ecore_event_type_new();
|
ECORE_X_EVENT_WINDOW_SHAPE = ecore_event_type_new();
|
||||||
ECORE_X_EVENT_SCREENSAVER_NOTIFY = ecore_event_type_new();
|
ECORE_X_EVENT_SCREENSAVER_NOTIFY = ecore_event_type_new();
|
||||||
|
@ -368,7 +369,7 @@ _ecore_xcb_events_handle(xcb_generic_event_t *ev)
|
||||||
_ecore_xcb_event_handle_generic_event(ev);
|
_ecore_xcb_event_handle_generic_event(ev);
|
||||||
#ifdef ECORE_XCB_DAMAGE
|
#ifdef ECORE_XCB_DAMAGE
|
||||||
else if ((_ecore_xcb_event_damage >= 0) &&
|
else if ((_ecore_xcb_event_damage >= 0) &&
|
||||||
(response == _ecore_xcb_event_damage + XCB_DAMAGE_NOTIFY))
|
(response == (_ecore_xcb_event_damage + XCB_DAMAGE_NOTIFY)))
|
||||||
_ecore_xcb_event_handle_damage_notify(ev);
|
_ecore_xcb_event_handle_damage_notify(ev);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ECORE_XCB_RANDR
|
#ifdef ECORE_XCB_RANDR
|
||||||
|
@ -388,7 +389,7 @@ _ecore_xcb_events_handle(xcb_generic_event_t *ev)
|
||||||
#endif
|
#endif
|
||||||
#ifdef ECORE_XCB_SHAPE
|
#ifdef ECORE_XCB_SHAPE
|
||||||
else if ((_ecore_xcb_event_shape >= 0) &&
|
else if ((_ecore_xcb_event_shape >= 0) &&
|
||||||
(response == _ecore_xcb_event_shape + XCB_SHAPE_NOTIFY))
|
(response == (_ecore_xcb_event_shape + XCB_SHAPE_NOTIFY)))
|
||||||
_ecore_xcb_event_handle_shape_change(ev);
|
_ecore_xcb_event_handle_shape_change(ev);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ECORE_XCB_SYNC
|
#ifdef ECORE_XCB_SYNC
|
||||||
|
@ -1792,14 +1793,15 @@ _ecore_xcb_event_handle_mapping_notify(xcb_generic_event_t *event)
|
||||||
static void
|
static void
|
||||||
_ecore_xcb_event_handle_damage_notify(xcb_generic_event_t *event)
|
_ecore_xcb_event_handle_damage_notify(xcb_generic_event_t *event)
|
||||||
{
|
{
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
||||||
|
|
||||||
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
|
||||||
|
|
||||||
#ifdef ECORE_XCB_DAMAGE
|
#ifdef ECORE_XCB_DAMAGE
|
||||||
xcb_damage_notify_event_t *ev;
|
xcb_damage_notify_event_t *ev;
|
||||||
Ecore_X_Event_Damage *e;
|
Ecore_X_Event_Damage *e;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
||||||
|
#ifdef ECORE_XCB_DAMAGE
|
||||||
ev = (xcb_damage_notify_event_t *)event;
|
ev = (xcb_damage_notify_event_t *)event;
|
||||||
if (!(e = calloc(1, sizeof(Ecore_X_Event_Damage)))) return;
|
if (!(e = calloc(1, sizeof(Ecore_X_Event_Damage)))) return;
|
||||||
|
|
||||||
|
@ -1823,14 +1825,15 @@ _ecore_xcb_event_handle_damage_notify(xcb_generic_event_t *event)
|
||||||
static void
|
static void
|
||||||
_ecore_xcb_event_handle_randr_change(xcb_generic_event_t *event)
|
_ecore_xcb_event_handle_randr_change(xcb_generic_event_t *event)
|
||||||
{
|
{
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
||||||
|
|
||||||
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
|
||||||
|
|
||||||
#ifdef ECORE_XCB_RANDR
|
#ifdef ECORE_XCB_RANDR
|
||||||
xcb_randr_screen_change_notify_event_t *ev;
|
xcb_randr_screen_change_notify_event_t *ev;
|
||||||
Ecore_X_Event_Screen_Change *e;
|
Ecore_X_Event_Screen_Change *e;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
||||||
|
#ifdef ECORE_XCB_RANDR
|
||||||
ev = (xcb_randr_screen_change_notify_event_t *)event;
|
ev = (xcb_randr_screen_change_notify_event_t *)event;
|
||||||
if (!(e = calloc(1, sizeof(Ecore_X_Event_Screen_Change)))) return;
|
if (!(e = calloc(1, sizeof(Ecore_X_Event_Screen_Change)))) return;
|
||||||
|
|
||||||
|
@ -1852,13 +1855,14 @@ _ecore_xcb_event_handle_randr_change(xcb_generic_event_t *event)
|
||||||
static void
|
static void
|
||||||
_ecore_xcb_event_handle_randr_notify(xcb_generic_event_t *event)
|
_ecore_xcb_event_handle_randr_notify(xcb_generic_event_t *event)
|
||||||
{
|
{
|
||||||
|
#ifdef ECORE_XCB_RANDR
|
||||||
|
xcb_randr_notify_event_t *ev;
|
||||||
|
#endif
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
||||||
|
|
||||||
#ifdef ECORE_XCB_RANDR
|
#ifdef ECORE_XCB_RANDR
|
||||||
xcb_randr_notify_event_t *ev;
|
|
||||||
|
|
||||||
ev = (xcb_randr_notify_event_t *)event;
|
ev = (xcb_randr_notify_event_t *)event;
|
||||||
switch (ev->subCode)
|
switch (ev->subCode)
|
||||||
{
|
{
|
||||||
|
@ -1880,12 +1884,14 @@ _ecore_xcb_event_handle_randr_notify(xcb_generic_event_t *event)
|
||||||
static void
|
static void
|
||||||
_ecore_xcb_event_handle_randr_crtc_change(xcb_generic_event_t *event)
|
_ecore_xcb_event_handle_randr_crtc_change(xcb_generic_event_t *event)
|
||||||
{
|
{
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
||||||
|
|
||||||
#ifdef ECORE_XCB_RANDR
|
#ifdef ECORE_XCB_RANDR
|
||||||
xcb_randr_notify_event_t *ev;
|
xcb_randr_notify_event_t *ev;
|
||||||
Ecore_X_Event_Randr_Crtc_Change *e;
|
Ecore_X_Event_Randr_Crtc_Change *e;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
#ifdef ECORE_XCB_RANDR
|
||||||
ev = (xcb_randr_notify_event_t *)event;
|
ev = (xcb_randr_notify_event_t *)event;
|
||||||
if (!(e = calloc(1, sizeof(Ecore_X_Event_Randr_Crtc_Change))))
|
if (!(e = calloc(1, sizeof(Ecore_X_Event_Randr_Crtc_Change))))
|
||||||
return;
|
return;
|
||||||
|
@ -1906,12 +1912,14 @@ _ecore_xcb_event_handle_randr_crtc_change(xcb_generic_event_t *event)
|
||||||
static void
|
static void
|
||||||
_ecore_xcb_event_handle_randr_output_change(xcb_generic_event_t *event)
|
_ecore_xcb_event_handle_randr_output_change(xcb_generic_event_t *event)
|
||||||
{
|
{
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
||||||
|
|
||||||
#ifdef ECORE_XCB_RANDR
|
#ifdef ECORE_XCB_RANDR
|
||||||
xcb_randr_notify_event_t *ev;
|
xcb_randr_notify_event_t *ev;
|
||||||
Ecore_X_Event_Randr_Output_Change *e;
|
Ecore_X_Event_Randr_Output_Change *e;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
#ifdef ECORE_XCB_RANDR
|
||||||
ev = (xcb_randr_notify_event_t *)event;
|
ev = (xcb_randr_notify_event_t *)event;
|
||||||
if (!(e = calloc(1, sizeof(Ecore_X_Event_Randr_Crtc_Change))))
|
if (!(e = calloc(1, sizeof(Ecore_X_Event_Randr_Crtc_Change))))
|
||||||
return;
|
return;
|
||||||
|
@ -1931,12 +1939,14 @@ _ecore_xcb_event_handle_randr_output_change(xcb_generic_event_t *event)
|
||||||
static void
|
static void
|
||||||
_ecore_xcb_event_handle_randr_output_property_change(xcb_generic_event_t *event)
|
_ecore_xcb_event_handle_randr_output_property_change(xcb_generic_event_t *event)
|
||||||
{
|
{
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
||||||
|
|
||||||
#ifdef ECORE_XCB_RANDR
|
#ifdef ECORE_XCB_RANDR
|
||||||
xcb_randr_notify_event_t *ev;
|
xcb_randr_notify_event_t *ev;
|
||||||
Ecore_X_Event_Randr_Output_Property_Notify *e;
|
Ecore_X_Event_Randr_Output_Property_Notify *e;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
#ifdef ECORE_XCB_RANDR
|
||||||
ev = (xcb_randr_notify_event_t *)event;
|
ev = (xcb_randr_notify_event_t *)event;
|
||||||
if (!(e = calloc(1, sizeof(Ecore_X_Event_Randr_Output_Property_Notify))))
|
if (!(e = calloc(1, sizeof(Ecore_X_Event_Randr_Output_Property_Notify))))
|
||||||
return;
|
return;
|
||||||
|
@ -1957,14 +1967,15 @@ _ecore_xcb_event_handle_randr_output_property_change(xcb_generic_event_t *event)
|
||||||
static void
|
static void
|
||||||
_ecore_xcb_event_handle_screensaver_notify(xcb_generic_event_t *event)
|
_ecore_xcb_event_handle_screensaver_notify(xcb_generic_event_t *event)
|
||||||
{
|
{
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
||||||
|
|
||||||
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
|
||||||
|
|
||||||
#ifdef ECORE_XCB_SCREENSAVER
|
#ifdef ECORE_XCB_SCREENSAVER
|
||||||
xcb_screensaver_notify_event_t *ev;
|
xcb_screensaver_notify_event_t *ev;
|
||||||
Ecore_X_Event_Screensaver_Notify *e;
|
Ecore_X_Event_Screensaver_Notify *e;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
||||||
|
#ifdef ECORE_XCB_SCREENSAVER
|
||||||
ev = (xcb_screensaver_notify_event_t *)event;
|
ev = (xcb_screensaver_notify_event_t *)event;
|
||||||
if (!(e = calloc(1, sizeof(Ecore_X_Event_Screensaver_Notify)))) return;
|
if (!(e = calloc(1, sizeof(Ecore_X_Event_Screensaver_Notify)))) return;
|
||||||
|
|
||||||
|
@ -2019,14 +2030,16 @@ _ecore_xcb_event_handle_shape_change(xcb_generic_event_t *event)
|
||||||
static void
|
static void
|
||||||
_ecore_xcb_event_handle_sync_counter(xcb_generic_event_t *event)
|
_ecore_xcb_event_handle_sync_counter(xcb_generic_event_t *event)
|
||||||
{
|
{
|
||||||
|
#ifdef ECORE_XCB_SYNC
|
||||||
|
xcb_sync_counter_notify_event_t *ev;
|
||||||
|
Ecore_X_Event_Sync_Counter *e;
|
||||||
|
#endif
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
||||||
|
|
||||||
#ifdef ECORE_XCB_SYNC
|
#ifdef ECORE_XCB_SYNC
|
||||||
xcb_sync_counter_notify_event_t *ev;
|
|
||||||
Ecore_X_Event_Sync_Counter *e;
|
|
||||||
|
|
||||||
ev = (xcb_sync_counter_notify_event_t *)event;
|
ev = (xcb_sync_counter_notify_event_t *)event;
|
||||||
if (!(e = calloc(1, sizeof(Ecore_X_Event_Sync_Counter)))) return;
|
if (!(e = calloc(1, sizeof(Ecore_X_Event_Sync_Counter)))) return;
|
||||||
|
|
||||||
|
@ -2039,14 +2052,15 @@ _ecore_xcb_event_handle_sync_counter(xcb_generic_event_t *event)
|
||||||
static void
|
static void
|
||||||
_ecore_xcb_event_handle_sync_alarm(xcb_generic_event_t *event)
|
_ecore_xcb_event_handle_sync_alarm(xcb_generic_event_t *event)
|
||||||
{
|
{
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
||||||
|
|
||||||
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
|
||||||
|
|
||||||
#ifdef ECORE_XCB_SYNC
|
#ifdef ECORE_XCB_SYNC
|
||||||
xcb_sync_alarm_notify_event_t *ev;
|
xcb_sync_alarm_notify_event_t *ev;
|
||||||
Ecore_X_Event_Sync_Alarm *e;
|
Ecore_X_Event_Sync_Alarm *e;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
||||||
|
#ifdef ECORE_XCB_SYNC
|
||||||
ev = (xcb_sync_alarm_notify_event_t *)event;
|
ev = (xcb_sync_alarm_notify_event_t *)event;
|
||||||
if (!(e = calloc(1, sizeof(Ecore_X_Event_Sync_Alarm)))) return;
|
if (!(e = calloc(1, sizeof(Ecore_X_Event_Sync_Alarm)))) return;
|
||||||
|
|
||||||
|
@ -2058,20 +2072,21 @@ _ecore_xcb_event_handle_sync_alarm(xcb_generic_event_t *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ecore_xcb_event_handle_xfixes_selection_notify(xcb_generic_event_t *event __UNUSED__)
|
_ecore_xcb_event_handle_xfixes_selection_notify(xcb_generic_event_t *event)
|
||||||
{
|
{
|
||||||
|
#ifdef ECORE_XCB_XFIXES
|
||||||
Ecore_X_Event_Fixes_Selection_Notify *e;
|
Ecore_X_Event_Fixes_Selection_Notify *e;
|
||||||
Ecore_X_Atom sel;
|
Ecore_X_Atom sel;
|
||||||
xcb_xfixes_selection_notify_event_t *ev;
|
xcb_xfixes_selection_notify_event_t *ev;
|
||||||
|
#endif
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
_ecore_xcb_event_last_mouse_move = EINA_FALSE;
|
||||||
|
#ifdef ECORE_XCB_XFIXES
|
||||||
ev = (xcb_xfixes_selection_notify_event_t *)event;
|
ev = (xcb_xfixes_selection_notify_event_t *)event;
|
||||||
|
|
||||||
e = calloc(1, sizeof(*e));
|
if (!(e = calloc(1, sizeof(*e)))) return;
|
||||||
if (!e)
|
|
||||||
return;
|
|
||||||
|
|
||||||
e->win = ev->window;
|
e->win = ev->window;
|
||||||
e->owner = ev->owner;
|
e->owner = ev->owner;
|
||||||
|
@ -2079,18 +2094,17 @@ _ecore_xcb_event_handle_xfixes_selection_notify(xcb_generic_event_t *event __UNU
|
||||||
e->selection_time = ev->selection_timestamp;
|
e->selection_time = ev->selection_timestamp;
|
||||||
e->atom = sel = ev->selection;
|
e->atom = sel = ev->selection;
|
||||||
if (sel == ECORE_X_ATOM_SELECTION_PRIMARY)
|
if (sel == ECORE_X_ATOM_SELECTION_PRIMARY)
|
||||||
e->selection = ECORE_X_SELECTION_PRIMARY;
|
e->selection = ECORE_X_SELECTION_PRIMARY;
|
||||||
else if (sel == ECORE_X_ATOM_SELECTION_SECONDARY)
|
else if (sel == ECORE_X_ATOM_SELECTION_SECONDARY)
|
||||||
e->selection = ECORE_X_SELECTION_SECONDARY;
|
e->selection = ECORE_X_SELECTION_SECONDARY;
|
||||||
else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD)
|
else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD)
|
||||||
e->selection = ECORE_X_SELECTION_CLIPBOARD;
|
e->selection = ECORE_X_SELECTION_CLIPBOARD;
|
||||||
else
|
else
|
||||||
e->selection = ECORE_X_SELECTION_OTHER;
|
e->selection = ECORE_X_SELECTION_OTHER;
|
||||||
e->reason = ev->subtype;
|
e->reason = ev->subtype;
|
||||||
|
|
||||||
ecore_event_add(ECORE_X_EVENT_FIXES_SELECTION_NOTIFY, e, NULL, NULL);
|
ecore_event_add(ECORE_X_EVENT_FIXES_SELECTION_NOTIFY, e, NULL, NULL);
|
||||||
} /* _ecore_x_event_handle_fixes_selection_notify */
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2147,7 +2161,7 @@ _ecore_xcb_event_key_press(xcb_generic_event_t *event)
|
||||||
xcb_keycode_t keycode = 0;
|
xcb_keycode_t keycode = 0;
|
||||||
xcb_key_press_event_t *xevent;
|
xcb_key_press_event_t *xevent;
|
||||||
char *keyname = NULL, *key = NULL;
|
char *keyname = NULL, *key = NULL;
|
||||||
char *compose = NULL, *tmp = NULL;
|
char *compose = NULL;
|
||||||
char compose_buffer[256];
|
char compose_buffer[256];
|
||||||
int val = 0;
|
int val = 0;
|
||||||
|
|
||||||
|
@ -2176,7 +2190,7 @@ _ecore_xcb_event_key_press(xcb_generic_event_t *event)
|
||||||
compose_buffer[val] = 0;
|
compose_buffer[val] = 0;
|
||||||
compose =
|
compose =
|
||||||
eina_str_convert(nl_langinfo(CODESET), "UTF-8", compose_buffer);
|
eina_str_convert(nl_langinfo(CODESET), "UTF-8", compose_buffer);
|
||||||
tmp = compose;
|
// tmp = compose;
|
||||||
}
|
}
|
||||||
|
|
||||||
key = _ecore_xcb_keymap_keysym_to_string(sym);
|
key = _ecore_xcb_keymap_keysym_to_string(sym);
|
||||||
|
@ -2217,7 +2231,7 @@ _ecore_xcb_event_key_release(xcb_generic_event_t *event)
|
||||||
xcb_keycode_t keycode = 0;
|
xcb_keycode_t keycode = 0;
|
||||||
xcb_key_release_event_t *xevent;
|
xcb_key_release_event_t *xevent;
|
||||||
char *keyname = NULL, *key = NULL;
|
char *keyname = NULL, *key = NULL;
|
||||||
char *compose = NULL, *tmp = NULL;
|
char *compose = NULL;
|
||||||
char compose_buffer[256];
|
char compose_buffer[256];
|
||||||
int val = 0;
|
int val = 0;
|
||||||
|
|
||||||
|
@ -2246,7 +2260,7 @@ _ecore_xcb_event_key_release(xcb_generic_event_t *event)
|
||||||
compose_buffer[val] = 0;
|
compose_buffer[val] = 0;
|
||||||
compose =
|
compose =
|
||||||
eina_str_convert(nl_langinfo(CODESET), "UTF-8", compose_buffer);
|
eina_str_convert(nl_langinfo(CODESET), "UTF-8", compose_buffer);
|
||||||
tmp = compose;
|
// tmp = compose;
|
||||||
}
|
}
|
||||||
|
|
||||||
key = _ecore_xcb_keymap_keysym_to_string(sym);
|
key = _ecore_xcb_keymap_keysym_to_string(sym);
|
||||||
|
|
Loading…
Reference in New Issue