lv_drivers
lv_drivers copied to clipboard
listener function for opcode 2 of xdg_toplevel is NULL
Afer I build my project, fhe following errors occurred:
listener function for opcode 2 of xdg_toplevel is NULL Aborted (core dumped)
My configuration is:
#define LV_WAYLAND_XDG_SHELL 1
#define LV_WAYLAND_TIMER_HANDLER 1
#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
My runtime environment is
Linux mac 5.15.0-27-generic #28-Ubuntu SMP Thu Apr 14 04:55:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
And if I set LV_WAYLAND_WL_SHELL 1,following errors:
[Info] (0.000, +0) lv_init: begin (in lv_obj.c line #102) [Error] (0.000, +0) create_window: No shell available (in wayland.c line #1810) [Error] (0.000, +0) lv_wayland_create_window: failed to create wayland window (in wayland.c line #2313) [Warn] (0.000, +0) lv_disp_get_scr_act: no display registered to get its active screen (in lv_disp.c line #54) [Info] (0.000, +0) lv_obj_create: begin (in lv_obj.c line #206) [Warn] (0.000, +0) lv_obj_class_create_obj: No display created yet. No place to assign the new screen (in lv_obj_class.c line #58)
Segmentation fault (core dumped)
Did anyone have the same problem as me?
I cc @simplejack-src who have added some major refactoring and improvements to the Wayland driver.
I've made a pull request for the first one (looks like the drivers missing an event handler for an event that was added to the XDG shell protocol in a later revision). The second one I'm not so sure about, it looks like wl_shell
isn't supported by your compositor (however since our support of that shell is deprecated, I'm not too worried about that one).
Thank you for your reply. I did a test with the patch, and it works with the following code:
int main() {
lv_init();
lv_wayland_init();
lv_disp_t * display = lv_wayland_create_window(H_RES, V_RES, "Window Title", NULL);
lv_example_get_started_1();
while (1) {
lv_tick_inc(5);
lv_task_handler();
usleep(5*1000);
}
return 0;
}
But the following errors occured on the window after it runs about 30 seconds later:
"WIndow Title" is not responding. You may choose to wait a short while for it to continue or force the application to quit entirely.
I can't reproduce that (granted my compositor is Wayfire). Is your LVGL configuration correct? i.e. LV_WAYLAND_TIMER_HANDLER
is not defined (since your using the Wayland driver in a polling setup)?
This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.