Lines Matching +full:- +full:- +full:include
3 * @file lv_wayland.c - The Wayland client for LVGL applications
20 #include "lv_wayland.h"
21 #include "lv_wayland_smm.h"
25 #include <stdio.h>
26 #include <stddef.h>
27 #include <stdbool.h>
28 #include <stdint.h>
29 #include <stdlib.h>
30 #include <unistd.h>
31 #include <fcntl.h>
32 #include <errno.h>
33 #include <string.h>
34 #include <time.h>
35 #include <poll.h>
36 #include <sys/mman.h>
37 #include <linux/input.h>
38 #include <linux/input-event-codes.h>
39 #include <wayland-client.h>
40 #include <wayland-cursor.h>
41 #include <xkbcommon/xkbcommon.h>
43 #include "lvgl.h"
46 #include "wayland_xdg_shell.h"
67 #define BUTTON_SIZE (TITLE_BAR_HEIGHT - (2 * BUTTON_MARGIN))
100 #define NUM_DECORATIONS (LAST_DECORATION-FIRST_DECORATION+1)
274 * NOTE: this function is invoked by the wayland-server library within the compositor
279 * @param struct wl_callback The callback that needs to be destroyed and re-created
292 window = obj->window; in graphic_obj_frame_done()
293 window->frame_counter++; in graphic_obj_frame_done()
296 window->frame_counter - 1, window->frame_counter); in graphic_obj_frame_done()
298 window->frame_done = true; in graphic_obj_frame_done()
327 app->shm_format = format; in shm_format()
332 app->shm_format != WL_SHM_FORMAT_ARGB8888) { in shm_format()
335 app->shm_format = format; in shm_format()
340 app->shm_format = format; in shm_format()
359 app->pointer_obj = NULL; in pointer_handle_enter()
363 app->pointer_obj = wl_surface_get_user_data(surface); in pointer_handle_enter()
365 app->pointer_obj->input.pointer.x = pos_x; in pointer_handle_enter()
366 app->pointer_obj->input.pointer.y = pos_y; in pointer_handle_enter()
369 if(!app->pointer_obj->window->xdg_toplevel || app->opt_disable_decorations) { in pointer_handle_enter()
373 struct window * window = app->pointer_obj->window; in pointer_handle_enter()
375 switch(app->pointer_obj->type) { in pointer_handle_enter()
377 if(window->maximized) { in pointer_handle_enter()
383 else if(pos_x >= (window->width + BORDER_SIZE - (BORDER_SIZE * 5))) { in pointer_handle_enter()
391 if(window->maximized) { in pointer_handle_enter()
397 else if(pos_x >= (window->width + BORDER_SIZE - (BORDER_SIZE * 5))) { in pointer_handle_enter()
405 if(window->maximized) { in pointer_handle_enter()
411 else if(pos_y >= (window->height + BORDER_SIZE - (BORDER_SIZE * 5))) { in pointer_handle_enter()
419 if(window->maximized) { in pointer_handle_enter()
425 else if(pos_y >= (window->height + BORDER_SIZE - (BORDER_SIZE * 5))) { in pointer_handle_enter()
437 if(app->cursor_surface) { in pointer_handle_enter()
438 … wl_cursor_image * cursor_image = wl_cursor_theme_get_cursor(app->cursor_theme, cursor)->images[0]; in pointer_handle_enter()
439 …wl_pointer_set_cursor(pointer, serial, app->cursor_surface, cursor_image->hotspot_x, cursor_image-… in pointer_handle_enter()
440 wl_surface_attach(app->cursor_surface, wl_cursor_image_get_buffer(cursor_image), 0, 0); in pointer_handle_enter()
441 wl_surface_damage(app->cursor_surface, 0, 0, cursor_image->width, cursor_image->height); in pointer_handle_enter()
442 wl_surface_commit(app->cursor_surface); in pointer_handle_enter()
443 app->cursor_flush_pending = true; in pointer_handle_enter()
455 if(!surface || (app->pointer_obj == wl_surface_get_user_data(surface))) { in pointer_handle_leave()
456 app->pointer_obj = NULL; in pointer_handle_leave()
468 if(!app->pointer_obj) { in pointer_handle_motion()
472 …app->pointer_obj->input.pointer.x = LV_MAX(0, LV_MIN(wl_fixed_to_int(sx), app->pointer_obj->width … in pointer_handle_motion()
473 …app->pointer_obj->input.pointer.y = LV_MAX(0, LV_MIN(wl_fixed_to_int(sy), app->pointer_obj->height… in pointer_handle_motion()
489 if(!app->pointer_obj) { in pointer_handle_button()
496 window = app->pointer_obj->window; in pointer_handle_button()
497 int pos_x = app->pointer_obj->input.pointer.x; in pointer_handle_button()
498 int pos_y = app->pointer_obj->input.pointer.y; in pointer_handle_button()
501 switch(app->pointer_obj->type) { in pointer_handle_button()
505 app->pointer_obj->input.pointer.left_button = lv_state; in pointer_handle_button()
508 app->pointer_obj->input.pointer.right_button = lv_state; in pointer_handle_button()
511 app->pointer_obj->input.pointer.wheel_button = lv_state; in pointer_handle_button()
522 if(window->xdg_toplevel) { in pointer_handle_button()
523 xdg_toplevel_move(window->xdg_toplevel, app->wl_seat, serial); in pointer_handle_button()
524 window->flush_pending = true; in pointer_handle_button()
528 if(window->wl_shell_surface) { in pointer_handle_button()
529 wl_shell_surface_move(window->wl_shell_surface, app->wl_seat, serial); in pointer_handle_button()
530 window->flush_pending = true; in pointer_handle_button()
537 window->shall_close = true; in pointer_handle_button()
543 if(window->xdg_toplevel) { in pointer_handle_button()
544 if(window->maximized) { in pointer_handle_button()
545 xdg_toplevel_unset_maximized(window->xdg_toplevel); in pointer_handle_button()
548 xdg_toplevel_set_maximized(window->xdg_toplevel); in pointer_handle_button()
550 window->maximized ^= true; in pointer_handle_button()
551 window->flush_pending = true; in pointer_handle_button()
557 if(window->xdg_toplevel) { in pointer_handle_button()
558 xdg_toplevel_set_minimized(window->xdg_toplevel); in pointer_handle_button()
559 window->flush_pending = true; in pointer_handle_button()
565 if(window->xdg_toplevel && !window->maximized) { in pointer_handle_button()
570 else if(pos_x >= (window->width + BORDER_SIZE - (BORDER_SIZE * 5))) { in pointer_handle_button()
576 xdg_toplevel_resize(window->xdg_toplevel, in pointer_handle_button()
577 window->application->wl_seat, serial, edge); in pointer_handle_button()
578 window->flush_pending = true; in pointer_handle_button()
584 if(window->xdg_toplevel && !window->maximized) { in pointer_handle_button()
589 else if(pos_x >= (window->width + BORDER_SIZE - (BORDER_SIZE * 5))) { in pointer_handle_button()
595 xdg_toplevel_resize(window->xdg_toplevel, in pointer_handle_button()
596 window->application->wl_seat, serial, edge); in pointer_handle_button()
597 window->flush_pending = true; in pointer_handle_button()
603 if(window->xdg_toplevel && !window->maximized) { in pointer_handle_button()
608 else if(pos_y >= (window->height + BORDER_SIZE - (BORDER_SIZE * 5))) { in pointer_handle_button()
614 xdg_toplevel_resize(window->xdg_toplevel, in pointer_handle_button()
615 window->application->wl_seat, serial, edge); in pointer_handle_button()
616 window->flush_pending = true; in pointer_handle_button()
622 if(window->xdg_toplevel && !window->maximized) { in pointer_handle_button()
627 else if(pos_y >= (window->height + BORDER_SIZE - (BORDER_SIZE * 5))) { in pointer_handle_button()
633 xdg_toplevel_resize(window->xdg_toplevel, in pointer_handle_button()
634 window->application->wl_seat, serial, edge); in pointer_handle_button()
635 window->flush_pending = true; in pointer_handle_button()
655 if(!app->pointer_obj) { in pointer_handle_axis()
661 app->pointer_obj->input.pointer.wheel_diff++; in pointer_handle_axis()
664 app->pointer_obj->input.pointer.wheel_diff--; in pointer_handle_axis()
768 keymap = xkb_keymap_new_from_string(app->xkb_context, map_str, in keyboard_handle_keymap()
786 xkb_keymap_unref(app->seat.xkb.keymap); in keyboard_handle_keymap()
787 xkb_state_unref(app->seat.xkb.state); in keyboard_handle_keymap()
788 app->seat.xkb.keymap = keymap; in keyboard_handle_keymap()
789 app->seat.xkb.state = state; in keyboard_handle_keymap()
803 app->keyboard_obj = NULL; in keyboard_handle_enter()
806 app->keyboard_obj = wl_surface_get_user_data(surface); in keyboard_handle_enter()
818 if(!surface || (app->keyboard_obj == wl_surface_get_user_data(surface))) { in keyboard_handle_leave()
819 app->keyboard_obj = NULL; in keyboard_handle_leave()
836 if(!app->keyboard_obj || !app->seat.xkb.state) { in keyboard_handle_key()
840 if(xkb_state_key_get_syms(app->seat.xkb.state, code, &syms) == 1) { in keyboard_handle_key()
849 app->keyboard_obj->input.keyboard.key = lv_key; in keyboard_handle_key()
850 app->keyboard_obj->input.keyboard.state = lv_state; in keyboard_handle_key()
864 /* If we're not using a keymap, then we don't handle PC-style modifiers */ in keyboard_handle_modifiers()
865 if(!app->seat.xkb.keymap) { in keyboard_handle_modifiers()
869 xkb_state_update_mask(app->seat.xkb.state, in keyboard_handle_modifiers()
896 app->touch_obj = NULL; in touch_handle_down()
901 app->touch_obj = wl_surface_get_user_data(surface); in touch_handle_down()
902 i = app->touch_obj->input.touch_event_cnt; in touch_handle_down()
904 app->touch_obj->input.touches[i].point.x = wl_fixed_to_int(x_w); in touch_handle_down()
905 app->touch_obj->input.touches[i].point.y = wl_fixed_to_int(y_w); in touch_handle_down()
906 app->touch_obj->input.touches[i].id = id; in touch_handle_down()
907 app->touch_obj->input.touches[i].timestamp = time; in touch_handle_down()
908 app->touch_obj->input.touches[i].state = LV_INDEV_STATE_PRESSED; in touch_handle_down()
909 app->touch_obj->input.touch_event_cnt++; in touch_handle_down()
912 struct window * window = app->touch_obj->window; in touch_handle_down()
913 switch(app->touch_obj->type) { in touch_handle_down()
916 if(window->xdg_toplevel) { in touch_handle_down()
917 xdg_toplevel_move(window->xdg_toplevel, app->wl_seat, serial); in touch_handle_down()
918 window->flush_pending = true; in touch_handle_down()
922 if(window->wl_shell_surface) { in touch_handle_down()
923 wl_shell_surface_move(window->wl_shell_surface, app->wl_seat, serial); in touch_handle_down()
924 window->flush_pending = true; in touch_handle_down()
947 i = app->touch_obj->input.touch_event_cnt; in touch_handle_up()
949 app->touch_obj->input.touches[i].point.x = 0; in touch_handle_up()
950 app->touch_obj->input.touches[i].point.y = 0; in touch_handle_up()
951 app->touch_obj->input.touches[i].id = id; in touch_handle_up()
952 app->touch_obj->input.touches[i].timestamp = time; in touch_handle_up()
953 app->touch_obj->input.touches[i].state = LV_INDEV_STATE_RELEASED; in touch_handle_up()
955 app->touch_obj->input.touch_event_cnt++; in touch_handle_up()
959 struct window * window = app->touch_obj->window; in touch_handle_up()
960 switch(app->touch_obj->type) { in touch_handle_up()
962 window->shall_close = true; in touch_handle_up()
966 if(window->xdg_toplevel) { in touch_handle_up()
967 if(window->maximized) { in touch_handle_up()
968 xdg_toplevel_unset_maximized(window->xdg_toplevel); in touch_handle_up()
971 xdg_toplevel_set_maximized(window->xdg_toplevel); in touch_handle_up()
973 window->maximized ^= true; in touch_handle_up()
977 if(window->xdg_toplevel) { in touch_handle_up()
978 xdg_toplevel_set_minimized(window->xdg_toplevel); in touch_handle_up()
979 window->flush_pending = true; in touch_handle_up()
1002 touch = &app->touch_obj->input.touches[0]; in touch_handle_motion()
1005 for(i = 0; i < app->touch_obj->input.touch_event_cnt; i++) { in touch_handle_motion()
1006 if(touch->id == id) { in touch_handle_motion()
1014 i = app->touch_obj->input.touch_event_cnt; in touch_handle_motion()
1015 app->touch_obj->input.touches[i].point.x = wl_fixed_to_int(x_w); in touch_handle_motion()
1016 app->touch_obj->input.touches[i].point.y = wl_fixed_to_int(y_w); in touch_handle_motion()
1017 app->touch_obj->input.touches[i].id = id; in touch_handle_motion()
1018 app->touch_obj->input.touches[i].timestamp = time; in touch_handle_motion()
1019 app->touch_obj->input.touches[i].state = LV_INDEV_STATE_PRESSED; in touch_handle_motion()
1020 app->touch_obj->input.touch_event_cnt++; in touch_handle_motion()
1025 cur->point.x = wl_fixed_to_int(x_w); in touch_handle_motion()
1026 cur->point.y = wl_fixed_to_int(y_w); in touch_handle_motion()
1027 cur->id = id; in touch_handle_motion()
1028 cur->timestamp = time; in touch_handle_motion()
1059 struct seat * seat = &app->seat; in seat_handle_capabilities()
1061 if((caps & WL_SEAT_CAPABILITY_POINTER) && !seat->wl_pointer) { in seat_handle_capabilities()
1062 seat->wl_pointer = wl_seat_get_pointer(wl_seat); in seat_handle_capabilities()
1063 wl_pointer_add_listener(seat->wl_pointer, &pointer_listener, app); in seat_handle_capabilities()
1064 app->cursor_surface = wl_compositor_create_surface(app->compositor); in seat_handle_capabilities()
1065 if(!app->cursor_surface) { in seat_handle_capabilities()
1069 else if(!(caps & WL_SEAT_CAPABILITY_POINTER) && seat->wl_pointer) { in seat_handle_capabilities()
1070 wl_pointer_destroy(seat->wl_pointer); in seat_handle_capabilities()
1071 if(app->cursor_surface) { in seat_handle_capabilities()
1072 wl_surface_destroy(app->cursor_surface); in seat_handle_capabilities()
1074 seat->wl_pointer = NULL; in seat_handle_capabilities()
1077 if((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !seat->wl_keyboard) { in seat_handle_capabilities()
1078 seat->wl_keyboard = wl_seat_get_keyboard(wl_seat); in seat_handle_capabilities()
1079 wl_keyboard_add_listener(seat->wl_keyboard, &keyboard_listener, app); in seat_handle_capabilities()
1081 else if(!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && seat->wl_keyboard) { in seat_handle_capabilities()
1082 wl_keyboard_destroy(seat->wl_keyboard); in seat_handle_capabilities()
1083 seat->wl_keyboard = NULL; in seat_handle_capabilities()
1087 if((caps & WL_SEAT_CAPABILITY_TOUCH) && !seat->wl_touch) { in seat_handle_capabilities()
1088 seat->wl_touch = wl_seat_get_touch(wl_seat); in seat_handle_capabilities()
1089 wl_touch_add_listener(seat->wl_touch, &touch_listener, app); in seat_handle_capabilities()
1092 else if(!(caps & WL_SEAT_CAPABILITY_TOUCH) && seat->wl_touch) { in seat_handle_capabilities()
1093 wl_touch_destroy(seat->wl_touch); in seat_handle_capabilities()
1094 seat->wl_touch = NULL; in seat_handle_capabilities()
1109 …window->decoration[d] = create_graphic_obj(&application, window, (FIRST_DECORATION + d), window->b… in draw_window()
1110 if(!window->decoration[d]) { in draw_window()
1121 if(window->xdg_toplevel) { in draw_window()
1122 xdg_toplevel_destroy(window->xdg_toplevel); in draw_window()
1127 lv_refr_now(window->lv_disp); in draw_window()
1147 else if((width != window->width) || (height != window->height)) { in wl_shell_handle_configure()
1148 window->resize_width = width; in wl_shell_handle_configure()
1149 window->resize_height = height; in wl_shell_handle_configure()
1150 window->resize_pending = true; in wl_shell_handle_configure()
1167 if(window->body->surface_configured == false) { in xdg_surface_handle_configure()
1169 if(window->resize_pending == false) { in xdg_surface_handle_configure()
1171 draw_window(window, window->width, window->height); in xdg_surface_handle_configure()
1178 draw_window(window, window->resize_width, window->resize_height); in xdg_surface_handle_configure()
1179 window->width = window->resize_width; in xdg_surface_handle_configure()
1180 window->height = window->resize_height; in xdg_surface_handle_configure()
1181 window->resize_pending = false; in xdg_surface_handle_configure()
1184 window->body->surface_configured = true; in xdg_surface_handle_configure()
1202 LV_LOG_TRACE("current body w:%d h:%d", window->body->width, window->body->height); in xdg_toplevel_handle_configure()
1203 LV_LOG_TRACE("window w:%d h:%d", window->width, window->height); in xdg_toplevel_handle_configure()
1211 if((width != window->width) || (height != window->height)) { in xdg_toplevel_handle_configure()
1212 window->resize_width = width; in xdg_toplevel_handle_configure()
1213 window->resize_height = height; in xdg_toplevel_handle_configure()
1214 window->resize_pending = true; in xdg_toplevel_handle_configure()
1225 window->shall_close = true; in xdg_toplevel_handle_close()
1274 app->compositor = wl_registry_bind(registry, name, &wl_compositor_interface, 1); in handle_global()
1277 app->subcompositor = wl_registry_bind(registry, name, &wl_subcompositor_interface, 1); in handle_global()
1280 app->shm = wl_registry_bind(registry, name, &wl_shm_interface, 1); in handle_global()
1281 wl_shm_add_listener(app->shm, &shm_listener, app); in handle_global()
1282 app->cursor_theme = wl_cursor_theme_load(NULL, 32, app->shm); in handle_global()
1285 app->wl_seat = wl_registry_bind(app->registry, name, &wl_seat_interface, 1); in handle_global()
1286 wl_seat_add_listener(app->wl_seat, &seat_listener, app); in handle_global()
1290 app->wl_shell = wl_registry_bind(registry, name, &wl_shell_interface, 1); in handle_global()
1296 app->xdg_wm = wl_registry_bind(app->registry, name, &xdg_wm_base_interface, 4); in handle_global()
1297 xdg_wm_base_add_listener(app->xdg_wm, &xdg_wm_base_listener, app); in handle_global()
1325 obj = SMM_GROUP_PROPERTIES(props->group)->tag[TAG_LOCAL]; in handle_wl_buffer_release()
1326 window = obj->window; in handle_wl_buffer_release()
1329 obj->width, in handle_wl_buffer_release()
1330 obj->height, window->frame_counter); in handle_wl_buffer_release()
1340 window->dmg_cache.start = window->dmg_cache.end; in cache_clear()
1341 window->dmg_cache.size = 0; in cache_clear()
1354 next_dmg = SMM_BUFFER_PROPERTIES(next_buf)->tag[TAG_BUFFER_DAMAGE]; in cache_purge()
1355 while((window->dmg_cache.cache + window->dmg_cache.start) != next_dmg) { in cache_purge()
1356 window->dmg_cache.start++; in cache_purge()
1357 window->dmg_cache.start %= DMG_CACHE_CAPACITY; in cache_purge()
1358 window->dmg_cache.size--; in cache_purge()
1365 if(SMM_BUFFER_PROPERTIES(buf)->tag[TAG_BUFFER_DAMAGE] == NULL) { in cache_add_area()
1370 if((window->dmg_cache.start == window->dmg_cache.end) && in cache_add_area()
1371 (window->dmg_cache.size)) { in cache_add_area()
1381 memcpy(window->dmg_cache.cache + window->dmg_cache.end, in cache_add_area()
1384 window->dmg_cache.end++; in cache_add_area()
1385 window->dmg_cache.end %= DMG_CACHE_CAPACITY; in cache_add_area()
1386 window->dmg_cache.size++; in cache_add_area()
1401 struct graphic_object * obj = SMM_GROUP_PROPERTIES(props->group)->tag[TAG_LOCAL]; in cache_apply_areas()
1405 next_dmg = (window->dmg_cache.cache + window->dmg_cache.end); in cache_apply_areas()
1408 next_dmg = SMM_BUFFER_PROPERTIES(next_buf)->tag[TAG_BUFFER_DAMAGE]; in cache_apply_areas()
1414 …start = ((lv_area_t *)SMM_BUFFER_PROPERTIES(src_buf)->tag[TAG_BUFFER_DAMAGE] - window->dmg_cache.c… in cache_apply_areas()
1415 while((window->dmg_cache.cache + start) != next_dmg) { in cache_apply_areas()
1416 /* Copy an area from source to destination (line-by-line) */ in cache_apply_areas()
1417 dmg = (window->dmg_cache.cache + start); in cache_apply_areas()
1418 for(y = dmg->y1; y <= dmg->y2; y++) { in cache_apply_areas()
1419 offset = (dmg->x1 + (y * obj->width)) * bpp; in cache_apply_areas()
1423 ((dmg->x2 - dmg->x1 + 1) * bpp)); in cache_apply_areas()
1441 wl_pool = wl_shm_create_pool(app->shm, in sme_new_pool()
1442 props->fd, in sme_new_pool()
1443 props->size); in sme_new_pool()
1455 wl_shm_pool_resize(props->tag[TAG_LOCAL], props->size); in sme_expand_pool()
1460 struct wl_shm_pool * wl_pool = SMM_POOL_PROPERTIES(pool)->tag[TAG_LOCAL]; in sme_free_pool()
1472 struct wl_shm_pool * wl_pool = SMM_POOL_PROPERTIES(props->pool)->tag[TAG_LOCAL]; in sme_new_buffer()
1474 struct graphic_object * obj = SMM_GROUP_PROPERTIES(props->group)->tag[TAG_LOCAL]; in sme_new_buffer()
1477 LV_LOG_TRACE("create new buffer of width %d height %d", obj->width, obj->height); in sme_new_buffer()
1481 props->offset, in sme_new_buffer()
1482 obj->width, in sme_new_buffer()
1483 obj->height, in sme_new_buffer()
1484 obj->width * bpp, in sme_new_buffer()
1485 app->shm_format); in sme_new_buffer()
1505 struct graphic_object * obj = SMM_GROUP_PROPERTIES(props->group)->tag[TAG_LOCAL]; in sme_init_buffer()
1517 if(SMM_BUFFER_PROPERTIES(src)->tag[TAG_BUFFER_DAMAGE] == NULL) { in sme_init_buffer()
1529 src = smm_latest(props->group); in sme_init_buffer()
1541 (obj->width * bpp) * obj->height); in sme_init_buffer()
1555 cache_apply_areas(obj->window, buf_base, src_base, src); in sme_init_buffer()
1558 /* Purge out-of-date cached damage (up to and including next buffer) */ in sme_init_buffer()
1561 cache_purge(obj->window, src); in sme_init_buffer()
1572 struct wl_buffer * wl_buf = SMM_BUFFER_PROPERTIES(buf)->tag[TAG_LOCAL]; in sme_free_buffer()
1595 obj->surface = wl_compositor_create_surface(app->compositor); in create_graphic_obj()
1596 if(!obj->surface) { in create_graphic_obj()
1601 obj->buffer_group = smm_create(); in create_graphic_obj()
1602 if(obj->buffer_group == NULL) { in create_graphic_obj()
1607 obj->window = window; in create_graphic_obj()
1608 obj->type = type; in create_graphic_obj()
1609 obj->surface_configured = true; in create_graphic_obj()
1610 obj->pending_buffer = NULL; in create_graphic_obj()
1611 wl_surface_set_user_data(obj->surface, obj); in create_graphic_obj()
1612 SMM_TAG(obj->buffer_group, TAG_LOCAL, obj); in create_graphic_obj()
1617 wl_surface_destroy(obj->surface); in create_graphic_obj()
1628 if(obj->subsurface) { in destroy_graphic_obj()
1629 wl_subsurface_destroy(obj->subsurface); in destroy_graphic_obj()
1632 wl_surface_destroy(obj->surface); in destroy_graphic_obj()
1633 smm_destroy(obj->buffer_group); in destroy_graphic_obj()
1641 struct wl_buffer * wl_buf = SMM_BUFFER_PROPERTIES(decoration_buffer)->tag[TAG_LOCAL]; in attach_decoration()
1645 switch(decoration->type) { in attach_decoration()
1648 pos_y = -TITLE_BAR_HEIGHT; in attach_decoration()
1651 pos_x = parent->width - 1 * (BUTTON_MARGIN + BUTTON_SIZE); in attach_decoration()
1652 pos_y = -1 * (BUTTON_MARGIN + BUTTON_SIZE + (BORDER_SIZE / 2)); in attach_decoration()
1656 pos_x = parent->width - 2 * (BUTTON_MARGIN + BUTTON_SIZE); in attach_decoration()
1657 pos_y = -1 * (BUTTON_MARGIN + BUTTON_SIZE + (BORDER_SIZE / 2)); in attach_decoration()
1660 pos_x = parent->width - 3 * (BUTTON_MARGIN + BUTTON_SIZE); in attach_decoration()
1661 pos_y = -1 * (BUTTON_MARGIN + BUTTON_SIZE + (BORDER_SIZE / 2)); in attach_decoration()
1665 pos_x = -BORDER_SIZE; in attach_decoration()
1666 pos_y = -(BORDER_SIZE + TITLE_BAR_HEIGHT); in attach_decoration()
1669 pos_x = -BORDER_SIZE; in attach_decoration()
1670 pos_y = parent->height; in attach_decoration()
1673 pos_x = -BORDER_SIZE; in attach_decoration()
1674 pos_y = -TITLE_BAR_HEIGHT; in attach_decoration()
1677 pos_x = parent->width; in attach_decoration()
1678 pos_y = -TITLE_BAR_HEIGHT; in attach_decoration()
1690 /* https://gitlab.freedesktop.org/wayland/weston/-/issues/446 */ in attach_decoration()
1694 wl_surface_attach(decoration->surface, wl_buf, 0, 0); in attach_decoration()
1695 wl_surface_commit(decoration->surface); in attach_decoration()
1698 if(decoration->subsurface == NULL) { in attach_decoration()
1701 decoration->subsurface = wl_subcompositor_get_subsurface(window->application->subcompositor, in attach_decoration()
1702 decoration->surface, in attach_decoration()
1703 parent->surface); in attach_decoration()
1704 if(!decoration->subsurface) { in attach_decoration()
1710 wl_subsurface_set_position(decoration->subsurface, pos_x, pos_y); in attach_decoration()
1711 wl_surface_attach(decoration->surface, wl_buf, 0, 0); in attach_decoration()
1712 wl_surface_commit(decoration->surface); in attach_decoration()
1717 wl_surface_destroy(decoration->surface); in attach_decoration()
1718 decoration->surface = NULL; in attach_decoration()
1793 switch(decoration->type) { in create_decoration()
1795 decoration->width = window_width; in create_decoration()
1796 decoration->height = TITLE_BAR_HEIGHT; in create_decoration()
1799 decoration->width = BUTTON_SIZE; in create_decoration()
1800 decoration->height = BUTTON_SIZE; in create_decoration()
1804 decoration->width = BUTTON_SIZE; in create_decoration()
1805 decoration->height = BUTTON_SIZE; in create_decoration()
1808 decoration->width = BUTTON_SIZE; in create_decoration()
1809 decoration->height = BUTTON_SIZE; in create_decoration()
1813 decoration->width = window_width + 2 * (BORDER_SIZE); in create_decoration()
1814 decoration->height = BORDER_SIZE; in create_decoration()
1817 decoration->width = window_width + 2 * (BORDER_SIZE); in create_decoration()
1818 decoration->height = BORDER_SIZE; in create_decoration()
1821 decoration->width = BORDER_SIZE; in create_decoration()
1822 decoration->height = window_height + TITLE_BAR_HEIGHT; in create_decoration()
1825 decoration->width = BORDER_SIZE; in create_decoration()
1826 decoration->height = window_height + TITLE_BAR_HEIGHT; in create_decoration()
1835 LV_LOG_TRACE("decoration window %dx%d", decoration->width, decoration->height); in create_decoration()
1837 smm_resize(decoration->buffer_group, in create_decoration()
1838 (decoration->width * bpp) * decoration->height); in create_decoration()
1840 buf = smm_acquire(decoration->buffer_group); in create_decoration()
1854 switch(decoration->type) { in create_decoration()
1856 … color_fill(buf_base, lv_color_make(0x66, 0x66, 0x66), decoration->width, decoration->height); in create_decoration()
1859 … color_fill(buf_base, lv_color_make(0xCC, 0xCC, 0xCC), decoration->width, decoration->height); in create_decoration()
1860 for(y = 0; y < decoration->height; y++) { in create_decoration()
1861 for(x = 0; x < decoration->width; x++) { in create_decoration()
1862 … pixel = (lv_color_t *)((unsigned char *)buf_base + (y * (decoration->width * bpp)) + x * bpp); in create_decoration()
1863 if((x >= BUTTON_PADDING) && (x < decoration->width - BUTTON_PADDING)) { in create_decoration()
1864 if((x == y) || (x == decoration->width - 1 - y)) { in create_decoration()
1867 else if((x == y - 1) || (x == decoration->width - y)) { in create_decoration()
1876 … color_fill(buf_base, lv_color_make(0xCC, 0xCC, 0xCC), decoration->width, decoration->height); in create_decoration()
1877 for(y = 0; y < decoration->height; y++) { in create_decoration()
1878 for(x = 0; x < decoration->width; x++) { in create_decoration()
1879 … pixel = (lv_color_t *)((unsigned char *)buf_base + (y * (decoration->width * bpp)) + x * bpp); in create_decoration()
1880 …if(((x == BUTTON_PADDING) && (y >= BUTTON_PADDING) && (y < decoration->height - BUTTON_PADDING)) || in create_decoration()
1881 …((x == (decoration->width - BUTTON_PADDING)) && (y >= BUTTON_PADDING) && (y <= decoration->height … in create_decoration()
1882 … ((y == BUTTON_PADDING) && (x >= BUTTON_PADDING) && (x < decoration->width - BUTTON_PADDING)) || in create_decoration()
1883 …((y == (BUTTON_PADDING + 1)) && (x >= BUTTON_PADDING) && (x < decoration->width - BUTTON_PADDING))… in create_decoration()
1884 …((y == (decoration->height - BUTTON_PADDING)) && (x >= BUTTON_PADDING) && (x < decoration->width -… in create_decoration()
1891 … color_fill(buf_base, lv_color_make(0xCC, 0xCC, 0xCC), decoration->width, decoration->height); in create_decoration()
1892 for(y = 0; y < decoration->height; y++) { in create_decoration()
1893 for(x = 0; x < decoration->width; x++) { in create_decoration()
1894 … pixel = (lv_color_t *)((unsigned char *)buf_base + (y * (decoration->width * bpp)) + x * bpp); in create_decoration()
1895 if((x >= BUTTON_PADDING) && (x < decoration->width - BUTTON_PADDING) && in create_decoration()
1896 … (y > decoration->height - (2 * BUTTON_PADDING)) && (y < decoration->height - BUTTON_PADDING)) { in create_decoration()
1910 … color_fill(buf_base, lv_color_make(0x66, 0x66, 0x66), decoration->width, decoration->height); in create_decoration()
1917 return attach_decoration(window, decoration, buf, window->body); in create_decoration()
1926 if(decoration->subsurface) { in detach_decoration()
1927 wl_subsurface_destroy(decoration->subsurface); in detach_decoration()
1928 decoration->subsurface = NULL; in detach_decoration()
1944 window->width = width; in resize_window()
1945 window->height = height; in resize_window()
1948 if(!window->application->opt_disable_decorations && !window->fullscreen) { in resize_window()
1949 width -= (2 * BORDER_SIZE); in resize_window()
1950 height -= (TITLE_BAR_HEIGHT + (2 * BORDER_SIZE)); in resize_window()
1957 smm_resize(window->body->buffer_group, ((width * bpp) * height) * 2); in resize_window()
1959 window->body->width = width; in resize_window()
1960 window->body->height = height; in resize_window()
1962 /* Pre-allocate two buffers for the window body here */ in resize_window()
1963 body_buf1 = smm_acquire(window->body->buffer_group); in resize_window()
1964 body_buf2 = smm_acquire(window->body->buffer_group); in resize_window()
1967 LV_LOG_ERROR("Cannot pre-allocate backing buffers for window body"); in resize_window()
1968 wl_surface_destroy(window->body->surface); in resize_window()
1978 if(!window->application->opt_disable_decorations && !window->fullscreen) { in resize_window()
1980 if(!create_decoration(window, window->decoration[b], in resize_window()
1981 window->body->width, window->body->height)) { in resize_window()
1987 else if(!window->application->opt_disable_decorations) { in resize_window()
1991 detach_decoration(window, window->decoration[b]); in resize_window()
1998 window->width, window->height, in resize_window()
1999 window->body->width, window->body->height, in resize_window()
2000 window->frame_counter, window->frame_done); in resize_window()
2002 width = window->body->width; in resize_window()
2003 height = window->body->height; in resize_window()
2005 if(window->lv_disp != NULL) { in resize_window()
2008 lv_display_get_color_format(window->lv_disp)); in resize_window()
2010 window->lv_disp_draw_buf = lv_draw_buf_reshape( in resize_window()
2011 window->lv_disp_draw_buf, in resize_window()
2012 lv_display_get_color_format(window->lv_disp), in resize_window()
2015 lv_display_set_resolution(window->lv_disp, width, height); in resize_window()
2017 window->body->input.pointer.x = LV_MIN((int32_t)window->body->input.pointer.x, (width - 1)); in resize_window()
2018 … window->body->input.pointer.y = LV_MIN((int32_t)window->body->input.pointer.y, (height - 1)); in resize_window()
2034 window = lv_ll_ins_tail(&app->window_ll); in create_window()
2042 window->application = app; in create_window()
2045 window->body = create_graphic_obj(app, window, OBJECT_WINDOW, NULL); in create_window()
2046 window->width = width; in create_window()
2047 window->height = height; in create_window()
2049 if(!window->body) { in create_window()
2059 else if(app->xdg_wm) { in create_window()
2060 window->xdg_surface = xdg_wm_base_get_xdg_surface(app->xdg_wm, window->body->surface); in create_window()
2061 if(!window->xdg_surface) { in create_window()
2066 xdg_surface_add_listener(window->xdg_surface, &xdg_surface_listener, window); in create_window()
2068 window->xdg_toplevel = xdg_surface_get_toplevel(window->xdg_surface); in create_window()
2069 if(!window->xdg_toplevel) { in create_window()
2074 xdg_toplevel_add_listener(window->xdg_toplevel, &xdg_toplevel_listener, window); in create_window()
2075 xdg_toplevel_set_title(window->xdg_toplevel, title); in create_window()
2076 xdg_toplevel_set_app_id(window->xdg_toplevel, title); in create_window()
2081 window->body->surface_configured = false; in create_window()
2085 else if(app->wl_shell) { in create_window()
2086 window->wl_shell_surface = wl_shell_get_shell_surface(app->wl_shell, window->body->surface); in create_window()
2087 if(!window->wl_shell_surface) { in create_window()
2092 wl_shell_surface_add_listener(window->wl_shell_surface, &shell_surface_listener, window); in create_window()
2093 wl_shell_surface_set_toplevel(window->wl_shell_surface); in create_window()
2094 wl_shell_surface_set_title(window->wl_shell_surface, title); in create_window()
2097 draw_window(window, window->width, window->height); in create_window()
2110 if(window->wl_shell_surface) { in create_window()
2111 wl_shell_surface_destroy(window->wl_shell_surface); in create_window()
2115 if(window->xdg_surface) { in create_window()
2116 xdg_surface_destroy(window->xdg_surface); in create_window()
2121 wl_surface_destroy(window->body->surface); in create_window()
2124 lv_ll_remove(&app->window_ll, window); in create_window()
2136 if(window->wl_shell_surface) { in destroy_window()
2137 wl_shell_surface_destroy(window->wl_shell_surface); in destroy_window()
2141 if(window->xdg_toplevel) { in destroy_window()
2142 xdg_toplevel_destroy(window->xdg_toplevel); in destroy_window()
2143 xdg_surface_destroy(window->xdg_surface); in destroy_window()
2150 if(window->decoration[b]) { in destroy_window()
2151 destroy_graphic_obj(window->decoration[b]); in destroy_window()
2152 window->decoration[b] = NULL; in destroy_window()
2157 destroy_graphic_obj(window->body); in destroy_window()
2180 app = window->application; in _lv_wayland_flush()
2181 buf = window->body->pending_buffer; in _lv_wayland_flush()
2195 if(window->closed || window->shall_close) { in _lv_wayland_flush()
2199 else if((area->x2 < 0) || (area->y2 < 0) || (area->x1 > hres - 1) || (area->y1 > vres - 1)) { in _lv_wayland_flush()
2205 buf = smm_acquire(window->body->buffer_group); in _lv_wayland_flush()
2211 window->body->pending_buffer = buf; in _lv_wayland_flush()
2214 window->dmg_cache.cache + window->dmg_cache.end); in _lv_wayland_flush()
2225 if(app->shm_format == WL_SHM_FORMAT_ARGB8888) { in _lv_wayland_flush()
2230 memcpy(((char *)buf_base) + ((((area->y1 + y) * hres) + area->x1) * bpp), in _lv_wayland_flush()
2236 wl_surface_damage(window->body->surface, in _lv_wayland_flush()
2237 area->x1, in _lv_wayland_flush()
2238 area->y1, in _lv_wayland_flush()
2247 wl_buf = SMM_BUFFER_PROPERTIES(buf)->tag[TAG_LOCAL]; in _lv_wayland_flush()
2248 wl_surface_attach(window->body->surface, wl_buf, 0, 0); in _lv_wayland_flush()
2249 wl_surface_commit(window->body->surface); in _lv_wayland_flush()
2250 window->body->pending_buffer = NULL; in _lv_wayland_flush()
2251 window->frame_done = false; in _lv_wayland_flush()
2253 cb = wl_surface_frame(window->body->surface); in _lv_wayland_flush()
2254 wl_callback_add_listener(cb, &wl_surface_frame_listener, window->body); in _lv_wayland_flush()
2255 LV_LOG_TRACE("last flush frame: %d", window->frame_counter); in _lv_wayland_flush()
2257 window->flush_pending = true; in _lv_wayland_flush()
2270 window->body->pending_buffer = NULL; in _lv_wayland_flush()
2292 if((window->shall_close) && (window->close_cb != NULL)) { in _lv_wayland_handle_output()
2293 window->shall_close = window->close_cb(window->lv_disp); in _lv_wayland_handle_output()
2296 if(window->closed) { in _lv_wayland_handle_output()
2299 else if(window->shall_close) { in _lv_wayland_handle_output()
2300 window->closed = true; in _lv_wayland_handle_output()
2301 window->shall_close = false; in _lv_wayland_handle_output()
2304 window->body->input.pointer.x = 0; in _lv_wayland_handle_output()
2305 window->body->input.pointer.y = 0; in _lv_wayland_handle_output()
2306 window->body->input.pointer.left_button = LV_INDEV_STATE_RELEASED; in _lv_wayland_handle_output()
2307 window->body->input.pointer.right_button = LV_INDEV_STATE_RELEASED; in _lv_wayland_handle_output()
2308 window->body->input.pointer.wheel_button = LV_INDEV_STATE_RELEASED; in _lv_wayland_handle_output()
2309 window->body->input.pointer.wheel_diff = 0; in _lv_wayland_handle_output()
2310 if(window->application->pointer_obj == window->body) { in _lv_wayland_handle_output()
2311 window->application->pointer_obj = NULL; in _lv_wayland_handle_output()
2314 window->body->input.keyboard.key = 0; in _lv_wayland_handle_output()
2315 window->body->input.keyboard.state = LV_INDEV_STATE_RELEASED; in _lv_wayland_handle_output()
2316 if(window->application->keyboard_obj == window->body) { in _lv_wayland_handle_output()
2317 window->application->keyboard_obj = NULL; in _lv_wayland_handle_output()
2322 shall_flush |= window->flush_pending; in _lv_wayland_handle_output()
2326 if(wl_display_flush(application.display) == -1) { in _lv_wayland_handle_output()
2335 window->flush_pending = false; in _lv_wayland_handle_output()
2345 if(!window || window->closed) { in _lv_wayland_pointer_read()
2349 data->point.x = window->body->input.pointer.x; in _lv_wayland_pointer_read()
2350 data->point.y = window->body->input.pointer.y; in _lv_wayland_pointer_read()
2351 data->state = window->body->input.pointer.left_button; in _lv_wayland_pointer_read()
2358 if(!window || window->closed) { in _lv_wayland_pointeraxis_read()
2362 data->state = window->body->input.pointer.wheel_button; in _lv_wayland_pointeraxis_read()
2363 data->enc_diff = window->body->input.pointer.wheel_diff; in _lv_wayland_pointeraxis_read()
2365 window->body->input.pointer.wheel_diff = 0; in _lv_wayland_pointeraxis_read()
2371 if(!window || window->closed) { in _lv_wayland_keyboard_read()
2375 data->key = window->body->input.keyboard.key; in _lv_wayland_keyboard_read()
2376 data->state = window->body->input.keyboard.state; in _lv_wayland_keyboard_read()
2387 if(!window || window->closed) { in _lv_wayland_touch_read()
2391 /* Collect touches if there are any - send them to the gesture recognizer */ in _lv_wayland_touch_read()
2392 recognizer = &window->body->input.recognizer; in _lv_wayland_touch_read()
2394 LV_LOG_TRACE("collected touch events: %d", window->body->input.touch_event_cnt); in _lv_wayland_touch_read()
2396 lv_indev_gesture_detect_pinch(recognizer, &window->body->input.touches[0], in _lv_wayland_touch_read()
2397 window->body->input.touch_event_cnt); in _lv_wayland_touch_read()
2399 window->body->input.touch_event_cnt = 0; in _lv_wayland_touch_read()
2487 * De-initialize Wayland driver
2494 if(!window->closed) { in wayland_deinit()
2498 lv_draw_buf_destroy(window->lv_disp_draw_buf); in wayland_deinit()
2499 lv_display_delete(window->lv_disp); in wayland_deinit()
2594 window->close_cb = close_cb; in lv_wayland_window_create()
2597 window->lv_disp = lv_display_create(hor_res, ver_res); in lv_wayland_window_create()
2598 if(window->lv_disp == NULL) { in lv_wayland_window_create()
2604 lv_display_get_color_format(window->lv_disp)); in lv_wayland_window_create()
2606 window->lv_disp_draw_buf = lv_draw_buf_create( in lv_wayland_window_create()
2609 lv_display_get_color_format(window->lv_disp), in lv_wayland_window_create()
2613 lv_display_set_draw_buffers(window->lv_disp, window->lv_disp_draw_buf, NULL); in lv_wayland_window_create()
2614 lv_display_set_render_mode(window->lv_disp, LV_DISPLAY_RENDER_MODE_PARTIAL); in lv_wayland_window_create()
2615 lv_display_set_flush_cb(window->lv_disp, _lv_wayland_flush); in lv_wayland_window_create()
2616 lv_display_set_user_data(window->lv_disp, window); in lv_wayland_window_create()
2619 window->lv_indev_pointer = lv_indev_create(); in lv_wayland_window_create()
2620 lv_indev_set_type(window->lv_indev_pointer, LV_INDEV_TYPE_POINTER); in lv_wayland_window_create()
2621 lv_indev_set_read_cb(window->lv_indev_pointer, _lv_wayland_pointer_read); in lv_wayland_window_create()
2622 lv_indev_set_display(window->lv_indev_pointer, window->lv_disp); in lv_wayland_window_create()
2624 if(!window->lv_indev_pointer) { in lv_wayland_window_create()
2628 window->lv_indev_pointeraxis = lv_indev_create(); in lv_wayland_window_create()
2629 lv_indev_set_type(window->lv_indev_pointeraxis, LV_INDEV_TYPE_ENCODER); in lv_wayland_window_create()
2630 lv_indev_set_read_cb(window->lv_indev_pointeraxis, _lv_wayland_pointeraxis_read); in lv_wayland_window_create()
2631 lv_indev_set_display(window->lv_indev_pointeraxis, window->lv_disp); in lv_wayland_window_create()
2633 if(!window->lv_indev_pointeraxis) { in lv_wayland_window_create()
2639 window->lv_indev_touch = lv_indev_create(); in lv_wayland_window_create()
2640 lv_indev_set_type(window->lv_indev_touch, LV_INDEV_TYPE_POINTER); in lv_wayland_window_create()
2641 lv_indev_set_read_cb(window->lv_indev_touch, _lv_wayland_touch_read); in lv_wayland_window_create()
2642 lv_indev_set_display(window->lv_indev_touch, window->lv_disp); in lv_wayland_window_create()
2644 if(!window->lv_indev_touch) { in lv_wayland_window_create()
2650 window->lv_indev_keyboard = lv_indev_create(); in lv_wayland_window_create()
2651 lv_indev_set_type(window->lv_indev_keyboard, LV_INDEV_TYPE_KEYPAD); in lv_wayland_window_create()
2652 lv_indev_set_read_cb(window->lv_indev_keyboard, _lv_wayland_keyboard_read); in lv_wayland_window_create()
2653 lv_indev_set_display(window->lv_indev_keyboard, window->lv_disp); in lv_wayland_window_create()
2655 if(!window->lv_indev_keyboard) { in lv_wayland_window_create()
2659 return window->lv_disp; in lv_wayland_window_create()
2669 if(!window || window->closed) { in lv_wayland_window_close()
2672 window->shall_close = true; in lv_wayland_window_close()
2673 window->close_cb = NULL; in lv_wayland_window_close()
2689 if(!window->closed) { in lv_wayland_window_is_open()
2697 open = (!window->closed); in lv_wayland_window_is_open()
2712 if(!window || window->closed) { in lv_wayland_window_set_maximized()
2716 if(window->maximized != maximized) { in lv_wayland_window_set_maximized()
2719 if(window->wl_shell_surface) { in lv_wayland_window_set_maximized()
2723 //wl_shell_surface_set_maximized(window->wl_shell_surface); in lv_wayland_window_set_maximized()
2726 wl_shell_surface_set_toplevel(window->wl_shell_surface); in lv_wayland_window_set_maximized()
2728 window->maximized = maximized; in lv_wayland_window_set_maximized()
2729 window->flush_pending = true; in lv_wayland_window_set_maximized()
2734 if(window->xdg_toplevel) { in lv_wayland_window_set_maximized()
2736 xdg_toplevel_set_maximized(window->xdg_toplevel); in lv_wayland_window_set_maximized()
2739 xdg_toplevel_unset_maximized(window->xdg_toplevel); in lv_wayland_window_set_maximized()
2742 window->maximized = maximized; in lv_wayland_window_set_maximized()
2743 window->flush_pending = true; in lv_wayland_window_set_maximized()
2757 if(!window || window->closed) { in lv_wayland_window_set_fullscreen()
2761 if(window->fullscreen != fullscreen) { in lv_wayland_window_set_fullscreen()
2766 else if(window->xdg_toplevel) { in lv_wayland_window_set_fullscreen()
2768 xdg_toplevel_set_fullscreen(window->xdg_toplevel, NULL); in lv_wayland_window_set_fullscreen()
2771 xdg_toplevel_unset_fullscreen(window->xdg_toplevel); in lv_wayland_window_set_fullscreen()
2773 window->fullscreen = fullscreen; in lv_wayland_window_set_fullscreen()
2774 window->flush_pending = true; in lv_wayland_window_set_fullscreen()
2778 else if(window->wl_shell_surface) { in lv_wayland_window_set_fullscreen()
2780 wl_shell_surface_set_fullscreen(window->wl_shell_surface, in lv_wayland_window_set_fullscreen()
2785 wl_shell_surface_set_toplevel(window->wl_shell_surface); in lv_wayland_window_set_fullscreen()
2787 window->fullscreen = fullscreen; in lv_wayland_window_set_fullscreen()
2788 window->flush_pending = true; in lv_wayland_window_set_fullscreen()
2808 return window->lv_indev_pointer; in lv_wayland_get_pointer()
2822 return window->lv_indev_pointeraxis; in lv_wayland_get_pointeraxis()
2836 return window->lv_indev_keyboard; in lv_wayland_get_keyboard()
2850 return window->lv_indev_touch; in lv_wayland_get_touchscreen()
2860 /* Wayland input handling - it will also trigger the frame done handler */ in lv_wayland_timer_handler()
2865 LV_LOG_TRACE("handle timer frame: %d", window->frame_counter); in lv_wayland_timer_handler()
2867 if(window != NULL && window->frame_done == false in lv_wayland_timer_handler()
2868 && window->frame_counter > 0) { in lv_wayland_timer_handler()
2873 poll(&application.wayland_pfd, 1, -1); in lv_wayland_timer_handler()
2879 else if(window != NULL && window->body->surface_configured == false) { in lv_wayland_timer_handler()
2883 wl_surface_commit(window->body->surface); in lv_wayland_timer_handler()
2886 else if(window != NULL && window->resize_pending) { in lv_wayland_timer_handler()
2887 if(resize_window(window, window->resize_width, window->resize_height)) { in lv_wayland_timer_handler()
2888 window->resize_width = window->width; in lv_wayland_timer_handler()
2889 window->resize_height = window->height; in lv_wayland_timer_handler()
2890 window->resize_pending = false; in lv_wayland_timer_handler()
2896 window->frame_counter); in lv_wayland_timer_handler()
2899 else if(window->shall_close == true) { in lv_wayland_timer_handler()
2919 if(window->flush_pending) { in lv_wayland_timer_handler()