- } else {
- seqclass = sn_startup_sequence_get_wmclass(seq);
- seqname = sn_startup_sequence_get_name(seq);
- seqbin = sn_startup_sequence_get_binary_name(seq);
-
- if ((seqname && !g_ascii_strcasecmp(seqname, wmclass)) ||
- (seqbin && !g_ascii_strcasecmp(seqbin, wmclass)) ||
- (seqclass && !strcmp(seqclass, wmclass)))
- found = TRUE;
+ }
+ else if (seqclass) {
+ /* seqclass = "a string to match against the "resource name" or
+ "resource class" hints. These are WM_CLASS[0] and WM_CLASS[1]"
+ - from the startup-notification spec
+ */
+ found = (seqclass && !strcmp(seqclass, wmclass)) ||
+ (seqclass && !strcmp(seqclass, name));
+ }
+ else if (seqbin) {
+ /* Check the binary name against the class and name hints
+ as well, to help apps that don't have the class set
+ correctly */
+ found = (seqbin && !g_ascii_strcasecmp(seqbin, wmclass)) ||
+ (seqbin && !g_ascii_strcasecmp(seqbin, name));