summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-06-16 14:59:42 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-06-16 15:00:12 -0400
commitb58e380b19d1c55d622e9accd2127ad3fda07190 (patch)
tree93f80fcc9a68620bff07dd7a8acc23bede766595
parent773122db665a666a40e37e62e1eb4467419a1296 (diff)
simplify drm output update event by using randr screen refresh queuing
also moves all the output add/del into e_comp_wl
-rw-r--r--src/modules/wl_drm/e_mod_main.c41
1 files changed, 2 insertions, 39 deletions
diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c
index afce6cf66..7045832d7 100644
--- a/src/modules/wl_drm/e_mod_main.c
+++ b/src/modules/wl_drm/e_mod_main.c
@@ -86,47 +86,10 @@ end:
86} 86}
87 87
88static Eina_Bool 88static Eina_Bool
89_e_mod_drm_cb_output(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) 89_e_mod_drm_cb_output(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
90{ 90{
91 const Eina_List *l;
92 E_Randr2_Screen *screen;
93 Eina_Bool connected = EINA_FALSE;
94 int subpixel = 0;
95 Ecore_Drm2_Event_Output_Changed *e;
96
97 if (!(e = event)) goto end;
98
99 DBG("WL_DRM OUTPUT CHANGE");
100
101 EINA_LIST_FOREACH(e_randr2->screens, l, screen)
102 {
103 if ((!strcmp(screen->info.name, e->name)) &&
104 (!strcmp(screen->info.screen, e->model)))
105 {
106 connected = e->enabled;
107 subpixel = e->subpixel;
108
109 if (connected)
110 {
111 if (!e_comp_wl_output_init(screen->id, e->make, e->model,
112 e->x, e->y, e->w, e->h,
113 e->phys_width, e->phys_height,
114 e->refresh, subpixel,
115 e->transform))
116 {
117 ERR("Could not setup new output: %s", screen->id);
118 }
119 }
120 else
121 e_comp_wl_output_remove(screen->id);
122
123 break;
124 }
125 }
126
127end:
128 if (!e_randr2_cfg->ignore_hotplug_events) 91 if (!e_randr2_cfg->ignore_hotplug_events)
129 e_randr2_screen_refresh_queue(EINA_TRUE); 92 e_randr2_screen_refresh_queue(1);
130 93
131 return ECORE_CALLBACK_PASS_ON; 94 return ECORE_CALLBACK_PASS_ON;
132} 95}