summaryrefslogtreecommitdiff
path: root/src/actionGroups/windowListGroup.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2021-08-03 20:24:04 +0200
committerJörg Frings-Fürst <debian@jff.email>2021-08-03 20:24:04 +0200
commitcb628a331b2235465a985e51eb3476b8c7b1e68b (patch)
tree07e89daf5a1ac485e73f22ccb2ec2a914eeaf0f1 /src/actionGroups/windowListGroup.vala
parent8ef660cf7c92b3407bf2fbfb0f063b90fbe991cf (diff)
parent38bebbbddf1b2e8620c6b3c2101f689c0296a1fc (diff)
Update upstream source from tag 'upstream/0.7.3'
Update to upstream version '0.7.3' with Debian dir 93afe8369b196a0543bb89394f0f3b70ff9dbb72
Diffstat (limited to 'src/actionGroups/windowListGroup.vala')
-rw-r--r--src/actionGroups/windowListGroup.vala15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/actionGroups/windowListGroup.vala b/src/actionGroups/windowListGroup.vala
index ba5ea2b..34ada18 100644
--- a/src/actionGroups/windowListGroup.vala
+++ b/src/actionGroups/windowListGroup.vala
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
-// Copyright 2011-2018 Simon Schneegans
+// Copyright 2011-2021 Simon Schneegans
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -176,6 +176,9 @@ public class WindowListGroup : ActionGroup {
string icon_name = "";
#if HAVE_BAMF
+
+ // bamf is not supported on wayland
+ if (GLib.Environment.get_variable("XDG_SESSION_TYPE") == "x11") {
var xid = (uint32) window.get_xid();
Bamf.Matcher bamf_matcher = Bamf.Matcher.get_default();
Bamf.Application app = bamf_matcher.get_application_for_xid(xid);
@@ -202,14 +205,14 @@ public class WindowListGroup : ActionGroup {
error("%s", e.message);
}
}
- } else {
- var application = window.get_application();
- icon_name = application.get_icon_name().down();
}
- #else
+ }
+ #endif
+
+ if (icon_name == "") {
var application = window.get_application();
icon_name = application.get_icon_name().down();
- #endif
+ }
return icon_name;
}