mirror of
https://github.com/swaywm/sway.git
synced 2026-02-16 22:05:35 -05:00
Merge 6abe7313fd into e3c2412565
This commit is contained in:
commit
26c9b4f6ad
1 changed files with 11 additions and 11 deletions
|
|
@ -204,7 +204,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
|
||||
switch (criteria->title->match_type) {
|
||||
case PATTERN_FOCUSED:
|
||||
if (focused && lenient_strcmp(title, view_get_title(focused))) {
|
||||
if (!focused || lenient_strcmp(title, view_get_title(focused))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -224,7 +224,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
|
||||
switch (criteria->shell->match_type) {
|
||||
case PATTERN_FOCUSED:
|
||||
if (focused && strcmp(shell, view_get_shell(focused))) {
|
||||
if (!focused || strcmp(shell, view_get_shell(focused))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -244,7 +244,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
|
||||
switch (criteria->app_id->match_type) {
|
||||
case PATTERN_FOCUSED:
|
||||
if (focused && lenient_strcmp(app_id, view_get_app_id(focused))) {
|
||||
if (!focused || lenient_strcmp(app_id, view_get_app_id(focused))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -264,7 +264,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
|
||||
switch (criteria->sandbox_engine->match_type) {
|
||||
case PATTERN_FOCUSED:
|
||||
if (focused && lenient_strcmp(sandbox_engine, view_get_sandbox_engine(focused))) {
|
||||
if (!focused || lenient_strcmp(sandbox_engine, view_get_sandbox_engine(focused))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -284,7 +284,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
|
||||
switch (criteria->sandbox_app_id->match_type) {
|
||||
case PATTERN_FOCUSED:
|
||||
if (focused && lenient_strcmp(sandbox_app_id, view_get_sandbox_app_id(focused))) {
|
||||
if (!focused || lenient_strcmp(sandbox_app_id, view_get_sandbox_app_id(focused))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -304,7 +304,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
|
||||
switch (criteria->sandbox_instance_id->match_type) {
|
||||
case PATTERN_FOCUSED:
|
||||
if (focused && lenient_strcmp(sandbox_instance_id, view_get_sandbox_instance_id(focused))) {
|
||||
if (!focused || lenient_strcmp(sandbox_instance_id, view_get_sandbox_instance_id(focused))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -324,7 +324,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
|
||||
switch (criteria->tag->match_type) {
|
||||
case PATTERN_FOCUSED:
|
||||
if (focused && lenient_strcmp(tag, view_get_tag(focused))) {
|
||||
if (!focused || lenient_strcmp(tag, view_get_tag(focused))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -356,7 +356,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
|
||||
switch (criteria->class->match_type) {
|
||||
case PATTERN_FOCUSED:
|
||||
if (focused && lenient_strcmp(class, view_get_class(focused))) {
|
||||
if (!focused || lenient_strcmp(class, view_get_class(focused))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -376,7 +376,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
|
||||
switch (criteria->instance->match_type) {
|
||||
case PATTERN_FOCUSED:
|
||||
if (focused && lenient_strcmp(instance, view_get_instance(focused))) {
|
||||
if (!focused || lenient_strcmp(instance, view_get_instance(focused))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -396,7 +396,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
|
||||
switch (criteria->window_role->match_type) {
|
||||
case PATTERN_FOCUSED:
|
||||
if (focused && lenient_strcmp(window_role, view_get_window_role(focused))) {
|
||||
if (!focused || lenient_strcmp(window_role, view_get_window_role(focused))) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
@ -454,7 +454,7 @@ static bool criteria_matches_view(struct criteria *criteria,
|
|||
|
||||
switch (criteria->workspace->match_type) {
|
||||
case PATTERN_FOCUSED:
|
||||
if (focused &&
|
||||
if (!focused ||
|
||||
strcmp(ws->name, focused->container->pending.workspace->name)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue