AppSystem: make wmclass nullable

This commit is contained in:
David Hewitt 2022-10-14 13:02:05 +00:00 committed by Corentin Noël
parent fe1d3d031f
commit ea26a61029

View File

@ -39,7 +39,11 @@ public class Gala.AppSystem : GLib.Object {
return app;
}
public unowned Gala.App? lookup_startup_wmclass (string wmclass) {
public unowned Gala.App? lookup_startup_wmclass (string? wmclass) {
if (wmclass == null) {
return null;
}
GLib.DesktopAppInfo? info = app_cache.lookup_startup_wmclass (wmclass);
if (info == null) {
return null;
@ -74,7 +78,11 @@ public class Gala.AppSystem : GLib.Object {
return null;
}
public unowned Gala.App? lookup_desktop_wmclass (string wmclass) {
public unowned Gala.App? lookup_desktop_wmclass (string? wmclass) {
if (wmclass == null) {
return null;
}
/* First try without changing the case (this handles
org.example.Foo.Bar.desktop applications)