forked from enlightenment/enlightenment
parent
8764eebc1d
commit
4f75c57c75
|
@ -188,25 +188,25 @@ _12_screen_info_free(E_Randr_Screen_Info_12 *screen_info)
|
|||
|
||||
if (screen_info->crtcs)
|
||||
{
|
||||
EINA_LIST_FREE (screen_info->crtcs, crtc_info)
|
||||
EINA_LIST_FREE(screen_info->crtcs, crtc_info)
|
||||
_crtc_info_free(crtc_info);
|
||||
free(eina_list_nth(screen_info->crtcs, 0));
|
||||
}
|
||||
|
||||
if (screen_info->outputs)
|
||||
{
|
||||
EINA_LIST_FREE (screen_info->outputs, output_info)
|
||||
EINA_LIST_FREE(screen_info->outputs, output_info)
|
||||
_output_info_free(output_info);
|
||||
free(eina_list_nth(screen_info->outputs, 0));
|
||||
}
|
||||
|
||||
if (screen_info->modes)
|
||||
{
|
||||
EINA_LIST_FREE (screen_info->modes, mode_info)
|
||||
EINA_LIST_FREE(screen_info->modes, mode_info)
|
||||
ecore_x_randr_mode_info_free(mode_info);
|
||||
}
|
||||
|
||||
free (screen_info);
|
||||
free(screen_info);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -279,6 +279,7 @@ _12_screen_info_edid_is_available(const E_Randr_Edid_Hash *hash)
|
|||
}
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* returns a mode within a given list of modes that is gemetrically identical.
|
||||
* If none is found, NULL is returned.
|
||||
|
@ -364,7 +365,7 @@ _12_event_listeners_add(void)
|
|||
static Eina_Bool
|
||||
_output_change_event_cb(void *data __UNUSED__, int type, void *ev)
|
||||
{
|
||||
Ecore_X_Event_Randr_Output_Change *oce = (Ecore_X_Event_Randr_Output_Change*)ev;
|
||||
Ecore_X_Event_Randr_Output_Change *oce = (Ecore_X_Event_Randr_Output_Change *)ev;
|
||||
E_Randr_Output_Info *output_info = NULL;
|
||||
E_Randr_Crtc_Info *crtc_info = NULL;
|
||||
Eina_Bool policy_success = EINA_FALSE, con_state_changed = EINA_FALSE;
|
||||
|
@ -444,7 +445,7 @@ _output_change_event_cb(void *data __UNUSED__, int type, void *ev)
|
|||
INF("E_RANDR: Output %d was newly connected.", output_info->xid);
|
||||
|
||||
//only try to enable the monitor if there is no serialized setup
|
||||
if(!_12_try_restore_configuration())
|
||||
if (!_12_try_restore_configuration())
|
||||
{
|
||||
policy_success = e_randr_12_try_enable_output(output_info, output_info->policy, EINA_FALSE); //maybe give a success message?
|
||||
INF("E_RANDR: Policy \"%s\" was enforced %ssuccesfully.", _POLICIES_STRINGS[output_info->policy - 1], (policy_success ? "" : "un"));
|
||||
|
@ -477,7 +478,7 @@ _output_change_event_cb(void *data __UNUSED__, int type, void *ev)
|
|||
static Eina_Bool
|
||||
_crtc_change_event_cb(void *data __UNUSED__, int type, void *ev)
|
||||
{
|
||||
Ecore_X_Event_Randr_Crtc_Change *cce = (Ecore_X_Event_Randr_Crtc_Change*)ev;
|
||||
Ecore_X_Event_Randr_Crtc_Change *cce = (Ecore_X_Event_Randr_Crtc_Change *)ev;
|
||||
E_Randr_Crtc_Info *crtc_info;
|
||||
|
||||
EINA_SAFETY_ON_TRUE_RETURN_VAL(E_RANDR_12_NO, ECORE_CALLBACK_CANCEL);
|
||||
|
@ -511,7 +512,6 @@ _crtc_change_event_cb(void *data __UNUSED__, int type, void *ev)
|
|||
cce->geo.w,
|
||||
cce->geo.h);
|
||||
|
||||
|
||||
crtc_info = _12_screen_info_crtc_info_get(cce->crtc);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(crtc_info, ECORE_CALLBACK_RENEW);
|
||||
|
||||
|
@ -551,7 +551,7 @@ _crtc_change_event_cb(void *data __UNUSED__, int type, void *ev)
|
|||
static Eina_Bool
|
||||
_output_property_change_event_cb(void *data __UNUSED__, int type, void *ev)
|
||||
{
|
||||
Ecore_X_Event_Randr_Output_Property_Notify *opce = (Ecore_X_Event_Randr_Output_Property_Notify*)ev;
|
||||
Ecore_X_Event_Randr_Output_Property_Notify *opce = (Ecore_X_Event_Randr_Output_Property_Notify *)ev;
|
||||
E_Randr_Output_Info *output_info;
|
||||
|
||||
EINA_SAFETY_ON_TRUE_RETURN_VAL(E_RANDR_12_NO, ECORE_CALLBACK_CANCEL);
|
||||
|
@ -741,18 +741,22 @@ e_randr_12_try_enable_output(E_Randr_Output_Info *output_info, Ecore_X_Randr_Out
|
|||
usable_crtc->geometry.x = crtc_rel->geometry.x;
|
||||
usable_crtc->geometry.y = 0;
|
||||
break;
|
||||
|
||||
case ECORE_X_RANDR_OUTPUT_POLICY_RIGHT:
|
||||
usable_crtc->geometry.x = (crtc_rel->geometry.x + crtc_rel->geometry.w);
|
||||
usable_crtc->geometry.y = crtc_rel->geometry.y;
|
||||
break;
|
||||
|
||||
case ECORE_X_RANDR_OUTPUT_POLICY_BELOW:
|
||||
usable_crtc->geometry.x = crtc_rel->geometry.x;
|
||||
usable_crtc->geometry.y = (crtc_rel->geometry.y + crtc_rel->geometry.h);
|
||||
break;
|
||||
|
||||
case ECORE_X_RANDR_OUTPUT_POLICY_LEFT:
|
||||
usable_crtc->geometry.y = crtc_rel->geometry.y;
|
||||
usable_crtc->geometry.x = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
usable_crtc->geometry.y = 0;
|
||||
usable_crtc->geometry.x = 0;
|
||||
|
@ -805,7 +809,6 @@ e_randr_12_try_enable_output(E_Randr_Output_Info *output_info, Ecore_X_Randr_Out
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -820,8 +823,9 @@ _12_event_listeners_remove(void)
|
|||
{
|
||||
Ecore_Event_Handler *_event_handler = NULL;
|
||||
|
||||
EINA_LIST_FREE (_event_handlers, _event_handler)
|
||||
EINA_LIST_FREE(_event_handlers, _event_handler)
|
||||
ecore_event_handler_del(_event_handler);
|
||||
ecore_poller_del(poller);
|
||||
poller = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue