Skip to content

Commit 2b69ded

Browse files
authored
Merge pull request #55 from wmww/fix-warnings
Fix build warnings
2 parents 4b0d621 + b8ab5e3 commit 2b69ded

4 files changed

Lines changed: 13 additions & 2 deletions

File tree

examples/demo/gtk-layer-demo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ main (int argc, char **argv)
419419
g_cclosure_marshal_VOID__INT,
420420
G_TYPE_NONE, 1, G_TYPE_INT);
421421

422-
GtkApplication * app = gtk_application_new ("com.github.wmww.gtk4-layer-shell.demo", G_APPLICATION_FLAGS_NONE);
422+
GtkApplication * app = gtk_application_new ("com.github.wmww.gtk4-layer-shell.demo", G_APPLICATION_DEFAULT_FLAGS);
423423
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
424424
int status = g_application_run (G_APPLICATION (app), argc, argv);
425425
g_object_unref (app);

examples/meson.build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,11 @@ if get_option('vapi')
2020
'simple-example-vala',
2121
files('simple-example.vala'),
2222
dependencies: [gtk, gtk_layer_shell, vapi],
23+
c_args: [
24+
'-Wno-unused-but-set-variable',
25+
'-Wno-unused-parameter',
26+
'-Wno-cast-function-type',
27+
'-Wno-deprecated-declarations',
28+
],
2329
install: false)
2430
endif

examples/simple-example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ activate (GtkApplication* app, void *_data)
4848
int
4949
main (int argc, char **argv)
5050
{
51-
GtkApplication * app = gtk_application_new ("com.github.wmww.gtk4-layer-shell.example", G_APPLICATION_FLAGS_NONE);
51+
GtkApplication * app = gtk_application_new ("com.github.wmww.gtk4-layer-shell.example", G_APPLICATION_DEFAULT_FLAGS);
5252
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
5353
int status = g_application_run (G_APPLICATION (app), argc, argv);
5454
g_object_unref (app);

meson.build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ add_project_arguments(
1515
],
1616
language: 'c')
1717

18+
glib = dependency('glib-2.0', required: true) # Just needed for version check
19+
if glib.version().version_compare('<2.74')
20+
add_project_arguments('-DG_APPLICATION_DEFAULT_FLAGS=G_APPLICATION_FLAGS_NONE', language: 'c')
21+
endif
22+
1823
gtk = dependency('gtk4')
1924
wayland_client = dependency('wayland-client', version: '>=1.10.0')
2025

0 commit comments

Comments
 (0)