Compare commits

...

17 Commits

Author SHA1 Message Date
Derek Foreman 3e36389294 compile against stable EFL again 4 years ago
Carsten Haitzler bf3982308b compile again after efl change interface names... 4 years ago
Stephen Houston 879f480193 Remove/mark unused variables to avoid warnings. 4 years ago
Stephen Houston dab40475bb This partially reverts ab88e01afa "edge flip while dragging with alt - fix to work again" 4 years ago
Derek Foreman 1fccd31c73 Defer initial xdg configure for iconified wayland clients 4 years ago
Carsten Haitzler 8d5d0dd5b8 e thumb - be consistent and use safe run for restarting thumbnailer 4 years ago
Carsten Haitzler fb65ad731e e pan/scrollframe - fix garbage pan values that happen temporarily 4 years ago
Carsten Haitzler 348494b2fa efm - dont add null icons to list ... fixes segv 4 years ago
Carsten Haitzler 747e70a7a8 startup - fix management of timer pointer for startup timeout 4 years ago
Carsten Haitzler 851d32450f efm - fill in some media icon blanks which lead to generic icons 4 years ago
Carsten Haitzler 150a4012fc e startup - support gnome autostart delay 4 years ago
maxerba 143d10b5e6 Updating all po files 4 years ago
Carsten Haitzler ef5d5c6cfc edge flip while dragging with alt - fix to work again 4 years ago
Chris Michael 2ed0a07bc9 wl_drm: refactor _drm2_randr_apply function to support multi-output 5 years ago
Chris Michael cac8cce542 conf_randr: Use eina_stringshare_replace 5 years ago
Chris Michael a8d73f0a26 wl-drm: remove old randr apply code 5 years ago
Chris Michael aef50cf24a wl-drm: move variable declaration to top and add TODO comment 5 years ago
  1. 3727
      po/ar.po
  2. 3674
      po/bg.po
  3. 3766
      po/ca.po
  4. 3726
      po/cs.po
  5. 655
      po/da.po
  6. 3800
      po/de.po
  7. 3732
      po/el.po
  8. 3755
      po/eo.po
  9. 3750
      po/es.po
  10. 3611
      po/et.po
  11. 3694
      po/fi.po
  12. 3561
      po/fo.po
  13. 3732
      po/fr.po
  14. 3683
      po/fr_CH.po
  15. 3734
      po/gl.po
  16. 3676
      po/he.po
  17. 3673
      po/hr.po
  18. 3710
      po/hu.po
  19. 438
      po/it.po
  20. 3678
      po/ja.po
  21. 3560
      po/km.po
  22. 3717
      po/ko.po
  23. 3620
      po/lt.po
  24. 3613
      po/ms.po
  25. 3631
      po/nb.po
  26. 3682
      po/nl.po
  27. 3673
      po/pl.po
  28. 3762
      po/pt.po
  29. 3727
      po/pt_BR.po
  30. 3615
      po/ro.po
  31. 3788
      po/ru.po
  32. 3669
      po/sk.po
  33. 3775
      po/sl.po
  34. 3765
      po/sr.po
  35. 3664
      po/sv.po
  36. 3741
      po/tr.po
  37. 3674
      po/uk.po
  38. 3760
      po/vi.po
  39. 3672
      po/zh_CN.po
  40. 3634
      po/zh_TW.po
  41. 16
      src/bin/e_comp_wl.c
  42. 20
      src/bin/e_config.c
  43. 2
      src/bin/e_config.h
  44. 1
      src/bin/e_desklock.c
  45. 2
      src/bin/e_fm.c
  46. 5
      src/bin/e_fm_device.c
  47. 2
      src/bin/e_gadget.c
  48. 6
      src/bin/e_pan.c
  49. 4
      src/bin/e_scrollframe.c
  50. 60
      src/bin/e_startup.c
  51. 2
      src/bin/e_thumb.c
  52. 5
      src/modules/conf_randr/e_int_config_randr2.c
  53. 2
      src/modules/packagekit/e_mod_main.c
  54. 261
      src/modules/wl_drm/e_mod_main.c

3727
po/ar.po

File diff suppressed because it is too large Load Diff

3674
po/bg.po

File diff suppressed because it is too large Load Diff

3766
po/ca.po

File diff suppressed because it is too large Load Diff

3726
po/cs.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3800
po/de.po

File diff suppressed because it is too large Load Diff

3732
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

3750
po/es.po

File diff suppressed because it is too large Load Diff

3611
po/et.po

File diff suppressed because it is too large Load Diff

3694
po/fi.po

File diff suppressed because it is too large Load Diff

3561
po/fo.po

File diff suppressed because it is too large Load Diff

3732
po/fr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3734
po/gl.po

File diff suppressed because it is too large Load Diff

3676
po/he.po

File diff suppressed because it is too large Load Diff

3673
po/hr.po

File diff suppressed because it is too large Load Diff

3710
po/hu.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3678
po/ja.po

File diff suppressed because it is too large Load Diff

3560
po/km.po

File diff suppressed because it is too large Load Diff

3717
po/ko.po

File diff suppressed because it is too large Load Diff

3620
po/lt.po

File diff suppressed because it is too large Load Diff

3613
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

3682
po/nl.po

File diff suppressed because it is too large Load Diff

3673
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

3615
po/ro.po

File diff suppressed because it is too large Load Diff

3788
po/ru.po

File diff suppressed because it is too large Load Diff

3669
po/sk.po

File diff suppressed because it is too large Load Diff

3775
po/sl.po

File diff suppressed because it is too large Load Diff

3765
po/sr.po

File diff suppressed because it is too large Load Diff

3664
po/sv.po

File diff suppressed because it is too large Load Diff

3741
po/tr.po

File diff suppressed because it is too large Load Diff

3674
po/uk.po

File diff suppressed because it is too large Load Diff

3760
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

@ -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);

@ -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)

@ -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!!!!!

@ -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;

@ -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;
}

@ -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);

@ -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);

@ -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);
}

@ -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",

@ -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;
}

@ -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);
}
}

@ -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);

@ -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;

@ -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;
e_drm2_output_info_get(output, NULL, NULL, &ow, &oh, NULL);
pw += MAX(pw, ow);
ph = MAX(ph, oh);
}
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;
/* 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);
printf("DRM2 RRR: set vsize: %ix%i\n", vw, vh);
crtcs = ecore_drm2_device_crtcs_get(dev, &num_crtcs);
outputs = ecore_drm2_outputs_get(dev);
EINA_LIST_FOREACH(e_randr2->screens, ll, s)
if ((crtcs) && (outputs))
{
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;
E_Randr2_Screen *s;
Eina_List *l;
int top_priority = 0, i;
ecore_drm2_output_mode_set(output, mode, s->config.geom.x,
s->config.geom.y);
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 *));
/* TODO: cannot support rotations until we support planes
* and we cannot support planes until Atomic support is in */
int orient = 0;
/* 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.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;
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;
}
}
}
}
}
}
}
}
ecore_drm2_output_rotation_set(output, orient);
numout = 0;
for (i = 0; i < num_crtcs; i++)
if (outconf[i]) numout++;
if (s->config.priority == top_priority)
_drm2_output_primary_set(outputs, output);
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);
}
}
}
}
ecore_drm2_output_enabled_set(output, s->config.enabled);
/* free(outputs); */
/* free(crtcs); */
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);
}
if (nw > maxw) nw = maxw;
if (nh > maxh) nh = maxh;
if (nw < minw) nw = minw;
if (nh < minh) nh = minh;
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;

Loading…
Cancel
Save