Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails when gtk-layer-shell not found #49

Closed
wineee opened this issue Apr 19, 2024 · 1 comment
Closed

Build fails when gtk-layer-shell not found #49

wineee opened this issue Apr 19, 2024 · 1 comment

Comments

@wineee
Copy link

wineee commented Apr 19, 2024

    # aarch64-unknown-linux-gnu-gcc ... -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=c11 -Wno-unused-parameter -Wno-unused-result -Wno-missing-braces -MD -MQ wlogout.p/main.c.o -MF wlogout.p/main.c.o.d -o wlogout.p/main.c.o -c ../main.c
    # ../main.c: In function 'set_fullscreen':
    # ../main.c:499:17: error: unused variable 'mon' [-Werror=unused-variable]
    # 499 |     GdkMonitor *mon = gdk_display_get_monitor(gdk_display_get_default(), monitor);
    #     |                 ^~~
    # cc1: all warnings being treated as errors

gtk-layer-shell is an optional dependency, but we set werror=true in meson,
and when gtk-layer-shell not found, there is an unused warning (become error due to werror)

wlogout/main.c

Lines 526 to 543 in bc76e5d

GdkMonitor *mon =
gdk_display_get_monitor(gdk_display_get_default(), monitor);
if (protocol && layershell)
{
#ifdef LAYERSHELL
gtk_layer_init_for_window(win);
gtk_layer_set_layer(win, GTK_LAYER_SHELL_LAYER_OVERLAY);
gtk_layer_set_namespace(win, "logout_dialog");
gtk_layer_set_exclusive_zone(win, exclusive_level);
for (int j = 0; j < GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER; j++)
{
gtk_layer_set_anchor(win, j, TRUE);
}
gtk_layer_set_monitor(win, mon);
gtk_layer_set_keyboard_interactivity(win, keyboard);
#endif

@ArtsyMacaw
Copy link
Owner

@wineee Can you check if the latest commit fixes your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants