mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-26 07:57:59 -04:00
wayland: rename variable ‘main’ to ‘main_surface’
Some compilers don’t think we know what we’re doing: ../wayland.c:1554:24: error: ‘main’ is usually a function
This commit is contained in:
parent
b1385f6439
commit
3149ef16c3
1 changed files with 8 additions and 6 deletions
14
wayland.c
14
wayland.c
|
|
@ -1551,22 +1551,24 @@ wayl_win_subsurface_new_with_custom_parent(
|
||||||
surf->surf = NULL;
|
surf->surf = NULL;
|
||||||
surf->sub = NULL;
|
surf->sub = NULL;
|
||||||
|
|
||||||
struct wl_surface *main = wl_compositor_create_surface(wayl->compositor);
|
struct wl_surface *main_surface
|
||||||
if (main == NULL)
|
= wl_compositor_create_surface(wayl->compositor);
|
||||||
|
|
||||||
|
if (main_surface == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
struct wl_subsurface *sub = wl_subcompositor_get_subsurface(
|
struct wl_subsurface *sub = wl_subcompositor_get_subsurface(
|
||||||
wayl->sub_compositor, main, parent);
|
wayl->sub_compositor, main_surface, parent);
|
||||||
|
|
||||||
if (sub == NULL) {
|
if (sub == NULL) {
|
||||||
wl_surface_destroy(main);
|
wl_surface_destroy(main_surface);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_surface_set_user_data(main, win);
|
wl_surface_set_user_data(main_surface, win);
|
||||||
wl_subsurface_set_sync(sub);
|
wl_subsurface_set_sync(sub);
|
||||||
|
|
||||||
surf->surf = main;
|
surf->surf = main_surface;
|
||||||
surf->sub = sub;
|
surf->sub = sub;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue