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

Fix optional wayland handling in cc-display-panel #323

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading