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

Add our wayland compatible screenlocker #636

Merged
merged 8 commits into from
Jan 12, 2025
Merged
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ jobs:
submodules: true
- name: Build Budgie Desktop
run: |
meson build -Dci=true
meson build -Dci=true -Dwith-runtime-dependencies=false
meson compile -C build
23 changes: 12 additions & 11 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@ am_cflags = [
]
add_global_arguments(am_cflags, language: 'c')

budgie_screensaver = find_program('budgie-screensaver', required: false)
gnome_screensaver = find_program('gnome-screensaver', required: false)
with_gnome_screensaver = get_option('with-gnome-screensaver')
if with_gnome_screensaver == false
assert(budgie_screensaver.found(), 'Budgie Screensaver is a required separate component of Budgie Desktop. Please ensure budgie-screensaver is available at configure and run time. You can find this at https://github.com/BuddiesOfBudgie/budgie-screensaver')
budgie_screensaver_vala_args = []
else
assert(gnome_screensaver.found(), 'Either GNOME Screensaver or Budgie Screensaver is a required separate component of Budgie Desktop. Please ensure one of these is available at configure and run time.')
budgie_screensaver_vala_args = ['-D', 'HAVE_GNOME_SCREENSAVER']
endif

meson.add_install_script('scripts/mesonPostInstall.sh')

fs = import('fs')
Expand Down Expand Up @@ -75,9 +64,21 @@ dep_canberra_gtk3 = dependency('libcanberra-gtk3')
# Needed for window tracking
dep_xfce4windowing = dependency('libxfce4windowing-0', version: '>= 4.19.7')

# Needed for upower interaction
dep_upower = dependency('upower-glib', version: '>= 0.99.8')

# Create config.h
cdata = configuration_data()

if get_option('with-runtime-dependencies')
find_program('wlopm', required: true)
find_program('swayidle', required: true)
found_gtklock = find_program('gtklock', required: false)
if found_gtklock.found() == false
find_program('swaylock', required: true)
endif
endif

# Inspired by https://github.com/GNOME/recipes/blob/master/meson.build
package_version = meson.project_version()

Expand Down
2 changes: 1 addition & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
option('ci', type: 'boolean', value: false, description: 'Continuous Integration flag (internal use only)')
option('use-old-zenity', type: 'boolean', value: false, description: 'Use old zenity CLI API for out-of-process dialog handling')
option('with-bluetooth', type: 'boolean', value: true, description: 'Enable Bluetooth (Vala option)')
option('with-gnome-screensaver', type: 'boolean', value: false, description: 'Build using gnome-screensaver as a dependency')
option('with-gtk-doc', type: 'boolean', value: true, description: 'Build gtk-doc documentation')
option('with-hibernate', type: 'boolean', value: true, description: 'Include support for system hibernation')
option('with-libuuid-time-safe', type: 'boolean', value: true, description: 'Enable use of LIBUUID.generate_time_safe (Vala option)')
option('with-polkit', type: 'boolean', value: true, description: 'Enable PolKit support')
option('with-stateless', type: 'boolean', value: false, description: 'Enable stateless XDG paths')
option('xdg-appdir', type: 'string', description: 'XDG autostart path')
option('with-runtime-dependencies', type: 'boolean', value: true, description: 'Check during build for critical runtime dependencies')
6 changes: 6 additions & 0 deletions src/daemon/manager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ namespace Budgie {
Budgie.XDGDirTracker? xdg_tracker;
Budgie.Background? background;

/* Screenlock */
Budgie.Screenlock? screenlock;
/**
* Construct a new ServiceManager and initialiase appropriately
*/
Expand Down Expand Up @@ -58,6 +60,10 @@ namespace Budgie {
}
xdg_tracker = new Budgie.XDGDirTracker();
xdg_tracker.setup_dbus(replace);


screenlock = Screenlock.init();
screenlock.setup_dbus();
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/daemon/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ daemon_sources = [
'menus.vala',
'osd.vala',
'settings.vala',
'screenlock.vala',
'tabswitcher.vala',
'xdgdirtracker/dbus.vala',
]
Expand All @@ -51,6 +52,7 @@ daemon_deps = [
dep_xfce4windowing,
dep_gst,
dep_cairo,
dep_upower,
link_libbudgieprivate,
libpanelplugin_vapi,
link_libappsys,
Expand Down
Loading
Loading