Skip to content

Commit c3a29a1

Browse files
committed
Start fixing OpenSUSE Leap build
1 parent 473f5a9 commit c3a29a1

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

lib/App.vala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,13 @@ public class Gala.App : GLib.Object {
158158
return windows.data;
159159
}
160160

161+
#if VALA_0_56_17
161162
public GLib.SList<pid_t?> get_pids () {
162163
var results = new GLib.SList<pid_t?> ();
164+
#else
165+
public GLib.SList<int?> get_pids () {
166+
var results = new GLib.SList<int?> ();
167+
#endif
163168
foreach (unowned var window in windows) {
164169
var pid = window.get_pid ();
165170
if (pid < 1) {

meson.build

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,7 @@ gnome = import('gnome')
1111
i18n = import('i18n')
1212
pkg = import('pkgconfig')
1313
cc = meson.get_compiler('c')
14-
15-
gala_version = meson.project_version()
16-
17-
vala_version_required = '0.46.0'
1814
vala = meson.get_compiler('vala')
19-
if not vala.version().version_compare('>= @0@'.format(vala_version_required))
20-
error('Valac >= @0@ required!'.format(vala_version_required))
21-
endif
2215

2316
vapi_dir = meson.current_source_dir() / 'vapi'
2417

@@ -35,7 +28,7 @@ conf.set_quoted('DATADIR', data_dir)
3528
conf.set_quoted('PKGDATADIR', pkgdata_dir)
3629
conf.set_quoted('PLUGINDIR', plugins_dir)
3730
conf.set_quoted('RESOURCEPATH', '/org/pantheon/desktop/gala')
38-
conf.set_quoted('VERSION', gala_version)
31+
conf.set_quoted('VERSION', meson.project_version())
3932
config_h = configure_file(
4033
output: 'config.h',
4134
configuration: conf
@@ -158,6 +151,10 @@ if get_option('systemd')
158151
vala_flags += ['--define', 'WITH_SYSTEMD']
159152
endif
160153

154+
if vala.version().version_compare('>= 0.56.17')
155+
vala_flags += ['--define', 'VALA_0_56_17']
156+
endif
157+
161158
add_project_arguments(vala_flags, language: 'vala')
162159
add_project_link_arguments(['-Wl,-rpath,@0@'.format(mutter_typelib_dir)], language: 'c')
163160

src/WindowTracker.vala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ public class Gala.WindowTracker : GLib.Object {
5252
return get_app_from_id (id);
5353
}
5454

55+
#if VALA_0_56_17
5556
private static unowned Gala.App? get_app_from_pid (pid_t pid) {
57+
#else
58+
private static unowned Gala.App? get_app_from_pid (int pid) {
59+
#endif
5660
var running_apps = Gala.AppSystem.get_default ().get_running_apps ();
5761
foreach (unowned Gala.App app in running_apps) {
5862
var app_pids = app.get_pids ();

0 commit comments

Comments
 (0)