Skip to content

Commit ea694a3

Browse files
committed
csd-background: Log backend/layer-shell outcome at startup.
1 parent 31d939d commit ea694a3

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

plugins/background/main.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,24 @@
2525
static void
2626
pre_gtk_init (void)
2727
{
28-
if (!csd_check_layer_shell_support ()) {
29-
g_message ("csd-background: wlr-layer-shell not supported, using X11 backend");
28+
if (csd_check_layer_shell_support ()) {
29+
g_message ("csd-background: using Wayland backend, gtk-layer-shell supported");
30+
} else {
31+
g_message ("csd-background: not a Wayland session or wlr-layer-shell protocol not supported, using X11 backend");
3032
gdk_set_allowed_backends ("x11");
3133
}
3234
}
3335

3436
#define PRE_GTK_INIT pre_gtk_init
3537
#define FORCE_X11_BACKEND FALSE
3638
#else
39+
static void
40+
pre_gtk_init (void)
41+
{
42+
g_message ("csd-background: gtk-layer-shell not built, using X11 backend");
43+
}
44+
45+
#define PRE_GTK_INIT pre_gtk_init
3746
#define FORCE_X11_BACKEND TRUE
3847
#endif
3948

0 commit comments

Comments
 (0)