Skip to content

Commit

Permalink
Fix optional wayland handling in cc-display-panel (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkyBluefang committed Feb 12, 2024
1 parent b6f5917 commit a4619ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ final_message = [ '',
'** Colord support (Color management panel) : @0@'.format(colord.found()),
'** Wacom support (Wacom panel) : @0@'.format(libwacom.found()),
'** Online-Accounts support (Online-Accounts panel) : @0@'.format(goa.found()),
'** Wayland support : @0@'.format(cc.has_header('gdk/gdkwayland.h', dependencies: gtk)),
'',
]
message('\n'.join(final_message))
6 changes: 6 additions & 0 deletions panels/display/cc-display-panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@

#include <libcinnamon-desktop/cdesktop-enums.h>
#include <math.h>
#ifdef GDK_WINDOWING_WAYLAND
#include <gdk/gdkwayland.h>
#endif

#include <libupower-glib/upower.h>

Expand Down Expand Up @@ -114,7 +116,11 @@ struct _CcDisplayPanel

CC_PANEL_REGISTER (CcDisplayPanel, cc_display_panel)

#ifdef GDK_WINDOWING_WAYLAND
#define WAYLAND_SESSION() (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default()))
#else
#define WAYLAND_SESSION() (FALSE)
#endif

static void update_bottom_buttons (CcDisplayPanel *panel);
static void apply_current_configuration (CcDisplayPanel *self);
Expand Down

0 comments on commit a4619ac

Please sign in to comment.