Compare commits

...

17 Commits

Author SHA1 Message Date
Derek Foreman 3e36389294 compile against stable EFL again
E should probably continue to build against released EFL older than
the current interface name changes.
2018-06-12 08:12:47 -04:00
Carsten Haitzler bf3982308b compile again after efl change interface names... 2018-06-12 08:12:47 -04:00
Stephen Houston 879f480193 Remove/mark unused variables to avoid warnings. 2018-06-12 08:12:47 -04:00
Stephen Houston dab40475bb This partially reverts ab88e01afa "edge flip while dragging with alt - fix to work again"
This commit broke e's config and therefore broke gadget key modifiers, gadget loading, among other things.  This reverts the changes in config/* that broke this.
2018-06-12 08:12:47 -04:00
Derek Foreman 1fccd31c73 Defer initial xdg configure for iconified wayland clients
Under wayland, if a client declares itself iconified before its first
commit, we should wait until it's no longer iconified before sending it
a configure.  This way it can avoid uselessly rendering buffers that
will never be displayed.

ref T6834
2018-06-12 08:12:47 -04:00
Carsten Haitzler 8d5d0dd5b8 e thumb - be consistent and use safe run for restarting thumbnailer
fix inconsistency in using ecore_exe_run and the e_util wrapper...

@fix
2018-06-12 08:12:47 -04:00
Carsten Haitzler fb65ad731e e pan/scrollframe - fix garbage pan values that happen temporarily
during setup garbage pan positions can be set due to uninitialized
local variables. fix that to initialize.

@fix
2018-06-12 08:12:47 -04:00
Carsten Haitzler 348494b2fa efm - dont add null icons to list ... fixes segv
as per title. dont store null icons in the list - not intended to be
that way.

@fix
2018-06-12 08:12:47 -04:00
Carsten Haitzler 747e70a7a8 startup - fix management of timer pointer for startup timeout
fixes access of invalid timer pointer value on slow systems. (was
being caught with magic/invalid eiod before)

@fix
2018-06-12 08:12:47 -04:00
Carsten Haitzler 851d32450f efm - fill in some media icon blanks which lead to generic icons
i found a thumbdrive i got a generic "whatever" file icon for...
because efm media type matching didnt find an icon name for it. fix
that.
2018-06-12 08:12:47 -04:00
Carsten Haitzler 150a4012fc e startup - support gnome autostart delay
support autostart delay - fixes T6785
2018-06-12 08:12:47 -04:00
maxerba 143d10b5e6 Updating all po files 2018-06-12 08:12:47 -04:00
Carsten Haitzler ef5d5c6cfc edge flip while dragging with alt - fix to work again
this fixes when you drag a wqindow to screen edge and it flips if you
use alt+drag as opposed to just dragging titlebar around without alt.
it fixes it by updating your config to allow "any modifier" for edge
flips which is actually correct.

@fix
2018-06-12 08:12:46 -04:00
Chris Michael 2ed0a07bc9 wl_drm: refactor _drm2_randr_apply function to support multi-output
This patch refactors the drm2_randr_apply function in order to support
clone & extended modes for multiple outputs. This is modeled closely
around the x11 randr apply code.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-03-29 09:55:59 -04:00
Chris Michael cac8cce542 conf_randr: Use eina_stringshare_replace
Instead of deleteing a stringshare and re-adding it, just use
eina_stringshare_replace

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-03-29 09:55:59 -04:00
Chris Michael a8d73f0a26 wl-drm: remove old randr apply code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-03-29 09:55:59 -04:00
Chris Michael aef50cf24a wl-drm: move variable declaration to top and add TODO comment
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-03-29 09:55:59 -04:00
54 changed files with 77098 additions and 65231 deletions

3739
po/ar.po

File diff suppressed because it is too large Load Diff

3682
po/bg.po

File diff suppressed because it is too large Load Diff

3774
po/ca.po

File diff suppressed because it is too large Load Diff

3740
po/cs.po

File diff suppressed because it is too large Load Diff

655
po/da.po

File diff suppressed because it is too large Load Diff

3816
po/de.po

File diff suppressed because it is too large Load Diff

3736
po/el.po

File diff suppressed because it is too large Load Diff

3755
po/eo.po

File diff suppressed because it is too large Load Diff

3756
po/es.po

File diff suppressed because it is too large Load Diff

3615
po/et.po

File diff suppressed because it is too large Load Diff

3698
po/fi.po

File diff suppressed because it is too large Load Diff

3579
po/fo.po

File diff suppressed because it is too large Load Diff

3742
po/fr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3740
po/gl.po

File diff suppressed because it is too large Load Diff

3690
po/he.po

File diff suppressed because it is too large Load Diff

3705
po/hr.po

File diff suppressed because it is too large Load Diff

3714
po/hu.po

File diff suppressed because it is too large Load Diff

438
po/it.po

File diff suppressed because it is too large Load Diff

3694
po/ja.po

File diff suppressed because it is too large Load Diff

3578
po/km.po

File diff suppressed because it is too large Load Diff

3731
po/ko.po

File diff suppressed because it is too large Load Diff

3630
po/lt.po

File diff suppressed because it is too large Load Diff

3617
po/ms.po

File diff suppressed because it is too large Load Diff

3631
po/nb.po

File diff suppressed because it is too large Load Diff

3700
po/nl.po

File diff suppressed because it is too large Load Diff

3685
po/pl.po

File diff suppressed because it is too large Load Diff

3762
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3619
po/ro.po

File diff suppressed because it is too large Load Diff

3792
po/ru.po

File diff suppressed because it is too large Load Diff

3697
po/sk.po

File diff suppressed because it is too large Load Diff

3781
po/sl.po

File diff suppressed because it is too large Load Diff

3769
po/sr.po

File diff suppressed because it is too large Load Diff

3676
po/sv.po

File diff suppressed because it is too large Load Diff

3743
po/tr.po

File diff suppressed because it is too large Load Diff

3688
po/uk.po

File diff suppressed because it is too large Load Diff

3766
po/vi.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1559,7 +1559,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
ec->want_focus |= ec->icccm.accepts_focus && (!ec->override);
}
}
else if (ec->comp_data->need_xdg_configure && ec->comp_data->shell.surface)
else if (ec->comp_data->need_xdg_configure && ec->comp_data->shell.surface && !ec->iconic)
_e_comp_wl_configure_send(ec, 0);
state->sx = 0;
@ -2980,6 +2980,17 @@ end:
_e_comp_wl_gl_shutdown();
}
static Eina_Bool
_e_comp_wl_cb_uniconify(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
{
E_Event_Client *ev = event;
E_Client *ec = ev->ec;
if (ec->comp_data->need_xdg_configure)
ec->comp_data->shell.configure_send(ec->comp_data->shell.surface, 0, 0, 0);
return ECORE_CALLBACK_PASS_ON;
}
/* public functions */
/**
@ -3038,6 +3049,9 @@ e_comp_wl_init(void)
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_MOVE,
_e_comp_wl_cb_mouse_move, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_UNICONIFY,
_e_comp_wl_cb_uniconify, NULL);
/* add hooks to catch e_client events */
e_client_hook_add(E_CLIENT_HOOK_NEW_CLIENT, _e_comp_wl_client_cb_new, NULL);
e_client_hook_add(E_CLIENT_HOOK_DEL, _e_comp_wl_client_cb_del, NULL);

View File

@ -1505,6 +1505,26 @@ e_config_load(void)
if (!elm_config_profile_exists(_e_config_profile))
elm_config_profile_save(_e_config_profile);
}
CONFIG_VERSION_CHECK(25)
{
Eina_List *l;
E_Config_Binding_Edge *ebe;
EINA_LIST_FOREACH(e_bindings->edge_bindings, l, ebe)
{
if ((ebe->context == E_BINDING_CONTEXT_ZONE) &&
(ebe->modifiers == 0) &&
(ebe->edge >= 1) && (ebe->edge <= 4) &&
(!ebe->any_mod) &&
(ebe->action) &&
(!strcmp(ebe->action, "desk_flip_in_direction")))
{
ebe->any_mod = 1;
}
}
CONFIG_VERSION_UPDATE_INFO(25);
e_config_save_queue();
}
}
elm_config_profile_set(_e_config_profile);
if (!e_config->remember_internal_fm_windows)

View File

@ -46,7 +46,7 @@ typedef enum
/* 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 24
#define E_CONFIG_FILE_GENERATION 25
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH * 1000000) + E_CONFIG_FILE_GENERATION)
#define E_CONFIG_BINDINGS_VERSION 0 // DO NOT INCREMENT UNLESS YOU WANT TO WIPE ALL BINDINGS!!!!!

View File

@ -72,7 +72,6 @@ e_desklock_init(void)
EINTERN int
e_desklock_shutdown(void)
{
Eina_Bool waslocked = _e_desklock_state;
E_Desklock_Run *task;
Eina_List *l;
E_Config_Desklock_Background *bg;

View File

@ -4561,7 +4561,7 @@ _e_fm2_uri_selected_icon_list_get(Eina_List *uri)
if (eina_list_data_find(ic->sd->selected_icons, ic)) break;
ic = NULL;
}
icons = eina_list_append(icons, ic);
if (ic) icons = eina_list_append(icons, ic);
}
return icons;
}

View File

@ -100,12 +100,17 @@ _e_fm2_device_volume_setup(E_Volume *v)
icon = "media-floppy";
else if (!strcmp(v->storage->drive_type, "tape"))
icon = "media-tape";
else if (!strcmp(v->storage->drive_type, "thumb"))
// XXX: maybe a spcial type?
icon = "drive-removable-media";
else if (!strcmp(v->storage->drive_type, "compact_flash")
|| !strcmp(v->storage->drive_type, "memory_stick")
|| !strcmp(v->storage->drive_type, "smart_media")
|| !strcmp(v->storage->drive_type, "sd_mmc")
|| !strncmp(v->storage->drive_type, "flash", 5))
icon = "media-flash";
else // XXX: fallback if we don't know
icon = "media-floppy";
}
if (icon) eina_stringshare_replace(&v->icon, icon);

View File

@ -3122,7 +3122,7 @@ _desktop_editor_mouse_up_job(void *d)
}
static Eina_Bool
_desktop_editor_mouse_up(void *d, int t EINA_UNUSED, Ecore_Event_Mouse_Button *ev)
_desktop_editor_mouse_up(void *d, int t EINA_UNUSED, Ecore_Event_Mouse_Button *ev EINA_UNUSED)
{
E_FREE_LIST(desktop_editor_move_handlers, ecore_event_handler_del);
evas_object_pointer_mode_set(d, EVAS_OBJECT_POINTER_MODE_NOGRAB);

View File

@ -144,7 +144,7 @@ static void
_e_smart_child_resize_hook(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_Smart_Data *sd;
Evas_Coord w, h;
Evas_Coord w = 0, h = 0;
sd = data;
if (!sd->child_obj) return;
@ -173,10 +173,14 @@ _e_smart_add(Evas_Object *obj)
sd = E_NEW(E_Smart_Data, 1);
if (!sd) return;
sd->smart_obj = obj;
sd->px = 0;
sd->py = 0;
sd->x = 0;
sd->y = 0;
sd->w = 0;
sd->h = 0;
sd->child_w = 0;
sd->child_h = 0;
evas_object_smart_data_set(obj, sd);
}

View File

@ -733,7 +733,7 @@ static void
_e_smart_scrollbar_read(E_Smart_Data *sd)
{
Evas_Coord x, y, mx = 0, my = 0;
double vx, vy;
double vx = 0.0, vy = 0.0;
edje_object_part_drag_value_get(sd->edje_obj, "e.dragable.vbar", NULL, &vy);
edje_object_part_drag_value_get(sd->edje_obj, "e.dragable.hbar", &vx, NULL);
@ -915,7 +915,7 @@ _e_smart_scrollbar_size_adjust(E_Smart_Data *sd)
if ((sd->child_obj) || (sd->extern_pan))
{
Evas_Coord x = 0, y = 0, w = 0, h = 0, mx = 0, my = 0, vw = 0, vh = 0;
double vx, vy, size;
double vx = 0.0, vy = 0.0, size = 0.0;
edje_object_calc_force(sd->edje_obj);
edje_object_part_geometry_get(sd->edje_obj, "e.swallow.content",

View File

@ -15,7 +15,7 @@ static Eina_Bool _e_startup_time_exceeded(void *data);
static E_Order *startup_apps = NULL;
static int start_app_pos = -1;
static Ecore_Event_Handler *desktop_cache_update_handler = NULL;
static Ecore_Timer *timer;
static Ecore_Timer *timer = NULL;
static Eina_Bool desktop_cache_update = EINA_FALSE;
static Eina_Bool started = EINA_FALSE;
@ -43,6 +43,7 @@ e_startup_mode_set(E_Startup_Mode mode)
ecore_event_handler_add(EFREET_EVENT_DESKTOP_CACHE_BUILD,
_e_startup_event_cb,
strdup(buf));
if (timer) ecore_timer_del(timer);
timer = ecore_timer_add(5.0, _e_startup_time_exceeded, NULL);
e_init_undone();
}
@ -57,11 +58,46 @@ e_startup(void)
}
/* local subsystem functions */
static Eina_Bool
_e_startup_delay(void *data)
{
Efreet_Desktop *desktop = data;
e_exec(NULL, desktop, NULL, NULL, NULL);
efreet_desktop_unref(desktop);
return EINA_FALSE;
}
// custom float parser for N.nnnn, or N,nnnn or N to avoid locale issues
static double
_atof(const char *s)
{
const char *p;
double v = 0, dec;
for (p = s; isdigit(*p); p++)
{
v *= 10.0;
v += (double)(*p - '0');
}
if ((*p == '.') || (*p == ','))
{
dec = 0.1;
for (p++; isdigit(*p); p++)
{
v += ((double)(*p - '0')) * dec;
dec /= 10.0;
}
}
return v;
}
static void
_e_startup(void)
{
Efreet_Desktop *desktop;
char buf[8192];
char buf[1024];
const char *s;
double delay = 0.0;
if (!startup_apps)
{
@ -78,7 +114,22 @@ _e_startup(void)
e_init_done();
return;
}
e_exec(NULL, desktop, NULL, NULL, NULL);
if (desktop->x)
{
s = eina_hash_find(desktop->x, "X-GNOME-Autostart-Delay");
if (s)
{
const char *prev = setlocale(LC_NUMERIC, "C");
delay = _atof(s);
setlocale(LC_NUMERIC, prev);
}
}
if (delay > 0.0)
{
efreet_desktop_ref(desktop);
ecore_timer_add(delay, _e_startup_delay, desktop);
}
else e_exec(NULL, desktop, NULL, NULL, NULL);
snprintf(buf, sizeof(buf), _("Starting %s"), desktop->name);
e_init_status_set(buf);
ecore_job_add(_e_startup_next_cb, NULL);
@ -113,7 +164,7 @@ _e_startup_event_cb(void *data, int ev_type EINA_UNUSED, void *ev)
char *buf;
Efreet_Event_Cache_Update *e;
ecore_timer_del(timer);
if (timer) ecore_timer_del(timer);
timer = NULL;
e = ev;
@ -141,5 +192,6 @@ _e_startup_time_exceeded(void *data EINA_UNUSED)
fprintf(stderr, "E: efreet didn't notify about cache update\n");
_e_startup_error_dialog("E: Efreet did not update cache. "
"Please check your Efreet setup");
timer = NULL;
return ECORE_CALLBACK_CANCEL;
}

View File

@ -516,7 +516,7 @@ _e_thumb_cb_exe_event_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev
snprintf(buf, sizeof(buf), "%s/enlightenment/utils/enlightenment_thumb --nice=%d", e_prefix_lib_get(),
e_config->thumb_nice);
exe_thumb = ecore_exe_run(buf, NULL);
exe_thumb = e_util_exe_safe_run(buf, NULL);
_thumbnailers_exe = eina_list_append(_thumbnailers_exe, exe_thumb);
}
}

View File

@ -571,12 +571,11 @@ _cb_rel_to_set(void *data, Evas_Object *obj, void *event)
E_Randr2_Screen *s = _screen_config_id_find(cs2->id);
if (s)
{
printf("SEt to %p [%s]\n", cs, cs->id);
printf("Set to %p [%s]\n", cs, cs->id);
printf("find s = %p\n", s);
printf("s id = %s\n", s->id);
elm_object_text_set(obj, s->info.name);
eina_stringshare_del(cs->rel_to);
cs->rel_to = eina_stringshare_add(s->id);
eina_stringshare_replace(&cs->rel_to, s->id);
}
}
e_config_dialog_changed_set(cfdata->cfd, EINA_TRUE);

View File

@ -119,7 +119,7 @@ _gadget_del_cb(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
}
EINTERN Evas_Object *
_gadget_create_cb(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient)
_gadget_create_cb(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient EINA_UNUSED)
{
E_PackageKit_Instance *inst;
E_PackageKit_Module_Context *ctxt = packagekit_mod->data;

View File

@ -392,6 +392,8 @@ _drm2_randr_create(void)
if (ok)
{
int rotations;
if (!possible)
{
unsigned int refresh;
@ -413,13 +415,14 @@ _drm2_randr_create(void)
s->config.geom.w, s->config.geom.h);
}
/* TODO: get current output rotation and store in
* s->config.rotation */
s->info.can_rot_0 = EINA_FALSE;
s->info.can_rot_90 = EINA_FALSE;
s->info.can_rot_180 = EINA_FALSE;
s->info.can_rot_270 = EINA_FALSE;
int rotations;
rotations =
ecore_drm2_output_supported_rotations_get(output);
@ -520,106 +523,189 @@ _drm2_output_primary_set(const Eina_List *outputs, Ecore_Drm2_Output *output)
}
}
static Eina_Bool
_drm2_rotation_exists(Ecore_Drm2_Output *output, int rot)
{
int rots;
rots = ecore_drm2_output_supported_rotations_get(output);
if (rots >= 0)
{
if ((rot == 0) && (rots & ECORE_DRM2_ROTATION_NORMAL))
return EINA_TRUE;
if ((rot == 90) && (rots & ECORE_DRM2_ROTATION_90))
return EINA_TRUE;
if ((rot == 180) && (rots & ECORE_DRM2_ROTATION_180))
return EINA_TRUE;
if ((rot == 270) && (rots & ECORE_DRM2_ROTATION_270))
return EINA_TRUE;
}
return EINA_FALSE;
}
static void
_drm2_randr_apply(void)
{
const Eina_List *l;
Eina_List *ll;
E_Randr2_Screen *s;
Ecore_Drm2_Device *dev;
const Eina_List *outputs;
Ecore_Drm2_Output *output;
int minw, minh, maxw, maxh;
int ow = 0, oh = 0;
int pw = 0, ph = 0;
int vw = 0, vh = 0;
Ecore_Drm2_Output **outconf, *out;
int nw = 0, nh = 0;
int top_priority = 0;
int minw, minh, maxw, maxh;
unsigned int *crtcs = NULL;
int num_crtcs = 0, numout = 0;
const Eina_List *outputs = NULL;
E_Randr2_Screen **screenconf;
/* get drm device */
dev = ecore_evas_data_get(e_comp->ee, "device");
if (!dev) return;
outputs = ecore_drm2_outputs_get(dev);
if (!outputs) return;
ecore_drm2_device_screen_size_range_get(dev, &minw, &minh, &maxw, &maxh);
printf("DRM2 RRR: size range: %ix%i -> %ix%i\n", minw, minh, maxw, maxh);
nw = e_randr2->w;
nh = e_randr2->h;
/* get virtual size */
EINA_LIST_FOREACH(outputs, l, output)
{
if (!ecore_drm2_output_connected_get(output)) continue;
if (!ecore_drm2_output_enabled_get(output)) continue;
if (ecore_drm2_output_cloned_get(output)) continue;
/* get screen size range */
ecore_drm2_device_screen_size_range_get(dev, &minw, &minh, &maxw, &maxh);
printf("RRR: size range: %ix%i -> %ix%i\n", minw, minh, maxw, maxh);
e_drm2_output_info_get(output, NULL, NULL, &ow, &oh, NULL);
pw += MAX(pw, ow);
ph = MAX(ph, oh);
crtcs = ecore_drm2_device_crtcs_get(dev, &num_crtcs);
outputs = ecore_drm2_outputs_get(dev);
if ((crtcs) && (outputs))
{
E_Randr2_Screen *s;
Eina_List *l;
int top_priority = 0, i;
outconf = alloca(num_crtcs * sizeof(Ecore_Drm2_Output *));
screenconf = alloca(num_crtcs * sizeof(E_Randr2_Screen *));
memset(outconf, 0, num_crtcs * sizeof(Ecore_Drm2_Output *));
memset(screenconf, 0, num_crtcs * sizeof(E_Randr2_Screen *));
/* decide which outputs gets which crtcs */
EINA_LIST_FOREACH(e_randr2->screens, l, s)
{
printf("RRR: find output for '%s'\n", s->info.name);
if (s->config.configured)
{
out = _drm2_output_find(outputs, s->info.name);
if (out)
{
printf("RRR: enabled: %i\n", s->config.enabled);
if (s->config.enabled)
{
if (s->config.priority > top_priority)
top_priority = s->config.priority;
for (i = 0; i < num_crtcs; i++)
{
if (!outconf[i])
{
printf("RRR: crtc slot empty: %i\n", i);
if (ecore_drm2_output_possible_crtc_get(out, crtcs[i]))
{
if (_drm2_rotation_exists(out, s->config.rotation))
{
printf("RRR: assign slot out: %p\n", out);
outconf[i] = out;
screenconf[i] = s;
break;
}
}
}
}
}
}
}
}
numout = 0;
for (i = 0; i < num_crtcs; i++)
if (outconf[i]) numout++;
if (numout)
{
for (i = 0; i < num_crtcs; i++)
{
if (outconf[i])
{
Ecore_Drm2_Output_Mode *mode;
Ecore_Drm2_Rotation orient = ECORE_DRM2_ROTATION_NORMAL;
mode = _drm2_mode_screen_find(screenconf[i], outconf[i]);
if (screenconf[i]->config.rotation == 0)
orient = ECORE_DRM2_ROTATION_NORMAL;
else if (screenconf[i]->config.rotation == 90)
orient = ECORE_DRM2_ROTATION_90;
else if (screenconf[i]->config.rotation == 180)
orient = ECORE_DRM2_ROTATION_180;
else if (screenconf[i]->config.rotation == 270)
orient = ECORE_DRM2_ROTATION_270;
printf("RRR: crtc on: %i = '%s' @ %i %i - %ix%i orient %i mode %p out %p\n",
i, screenconf[i]->info.name,
screenconf[i]->config.geom.x,
screenconf[i]->config.geom.y,
screenconf[i]->config.geom.w,
screenconf[i]->config.geom.h,
orient, mode, outconf[i]);
ecore_drm2_output_mode_set(outconf[i], mode,
screenconf[i]->config.geom.x,
screenconf[i]->config.geom.y);
ecore_drm2_output_rotation_set(outconf[i], orient);
ecore_drm2_output_relative_to_set(outconf[i],
screenconf[i]->config.relative.to);
ecore_drm2_output_relative_mode_set(outconf[i],
screenconf[i]->config.relative.mode);
if (screenconf[i]->config.priority == top_priority)
{
_drm2_output_primary_set(outputs, outconf[i]);
top_priority = -1;
}
ecore_drm2_output_enabled_set(outconf[i],
screenconf[i]->config.enabled);
if ((screenconf[i]->config.relative.to) &&
(screenconf[i]->config.relative.mode ==
E_RANDR2_RELATIVE_CLONE))
{
Ecore_Drm2_Output *clone;
clone = _drm2_output_find(outputs,
screenconf[i]->config.relative.to);
ecore_evas_output_clone_set(e_comp->ee, outconf[i],
clone);
}
else
ecore_evas_output_clone_set(e_comp->ee, outconf[i],
NULL);
/* ecore_drm2_output_cloned_set(dev, outconf[i], EINA_TRUE); */
/* else */
/* ecore_drm2_output_cloned_set(dev, outconf[i], EINA_FALSE); */
}
else
{
printf("RRR: crtc off: %i\n", i);
}
}
}
}
/* free(outputs); */
/* free(crtcs); */
if (nw > maxw) nw = maxw;
if (nh > maxh) nh = maxh;
if (nw < minw) nw = minw;
if (nh < minh) nh = minh;
vw = nw;
vh = nh;
if (nw < pw) vw = pw;
if (nh < ph) vh = ph;
printf("DRM2 RRR: set vsize: %ix%i\n", vw, vh);
EINA_LIST_FOREACH(e_randr2->screens, ll, s)
{
Ecore_Drm2_Output_Mode *mode = NULL;
if (!s->config.configured) continue;
output = _drm2_output_find(outputs, s->info.name);
if (!output) continue;
if (s->config.enabled)
mode = _drm2_mode_screen_find(s, output);
if (s->config.priority > top_priority)
top_priority = s->config.priority;
ecore_drm2_output_mode_set(output, mode, s->config.geom.x,
s->config.geom.y);
/* TODO: cannot support rotations until we support planes
* and we cannot support planes until Atomic support is in */
int orient = 0;
if (s->config.rotation == 0)
orient = ECORE_DRM2_ROTATION_NORMAL;
else if (s->config.rotation == 90)
orient = ECORE_DRM2_ROTATION_90;
else if (s->config.rotation == 180)
orient = ECORE_DRM2_ROTATION_180;
else if (s->config.rotation == 270)
orient = ECORE_DRM2_ROTATION_270;
ecore_drm2_output_rotation_set(output, orient);
if (s->config.priority == top_priority)
_drm2_output_primary_set(outputs, output);
ecore_drm2_output_enabled_set(output, s->config.enabled);
printf("\tDRM2 RRR: Mode\n");
printf("\t\tDRM2 RRR: Geom: %d %d %dx%d\n",
s->config.geom.x, s->config.geom.y,
s->config.mode.w, s->config.mode.h);
printf("\t\tDRM2 RRR: Refresh: %f\n", s->config.mode.refresh);
printf("\t\tDRM2 RRR: Preferred: %d\n", s->config.mode.preferred);
printf("\tDRM2 RRR: Rotation: %d\n", s->config.rotation);
printf("\tDRM2 RRR: Relative Mode: %d\n", s->config.relative.mode);
printf("\tDRM2 RRR: Relative To: %s\n", s->config.relative.to);
printf("\tDRM2 RRR: Align: %f\n", s->config.relative.align);
}
printf("RRR: set vsize: %ix%i\n", nw, nh);
ecore_drm2_device_calibrate(dev, nw, nh);
ecore_drm2_device_pointer_max_set(dev, nw, nh);
ecore_drm2_device_pointer_warp(dev, nw / 2, nh / 2);
}
static void
@ -779,14 +865,13 @@ _drm_device_del(void *data EINA_UNUSED, const Efl_Event *event)
ecore_evas_cursor_device_unset(e_comp->ee, event->info);
}
EFL_CALLBACKS_ARRAY_DEFINE(_drm_device_del_cb,
{ EFL_CANVAS_EVENT_DEVICE_REMOVED, _drm_device_del });
E_API void *
e_modapi_init(E_Module *m)
{
int w = 0, h = 0;
static Efl_Callback_Array_Item arr[2] = { { 0, _drm_device_del } };
printf("LOAD WL_DRM MODULE\n");
/* try to init ecore_drm */
@ -832,6 +917,14 @@ e_modapi_init(E_Module *m)
ecore_evas_screen_geometry_get(e_comp->ee, NULL, NULL, &w, &h);
if (!e_comp_canvas_init(w, h)) return NULL;
#ifdef EFL_VERSION_1_21
arr[0].desc = EFL_CANVAS_SCENE_EVENT_DEVICE_REMOVED;
#else
if (E_EFL_VERSION_MINIMUM(1, 20, 99))
arr[0].desc = dlsym(NULL, "_EFL_CANVAS_SCENE_EVENT_DEVICE_REMOVED");
if (!arr[0].desc)
arr[0].desc = dlsym(NULL, "_EFL_CANVAS_EVENT_DEVICE_REMOVED");
#endif
ecore_evas_pointer_xy_get(e_comp->ee, &e_comp_wl->ptr.x,
&e_comp_wl->ptr.y);
evas_event_feed_mouse_in(e_comp->evas, 0, NULL);
@ -855,7 +948,7 @@ e_modapi_init(E_Module *m)
ecore_event_handler_add(ELPUT_EVENT_POINTER_MOTION,
(Ecore_Event_Handler_Cb)_pointer_motion, NULL);
efl_event_callback_array_priority_add(e_comp->evas, _drm_device_del_cb(),
efl_event_callback_array_priority_add(e_comp->evas, arr,
EFL_CALLBACK_PRIORITY_BEFORE, NULL);
return m;