mirror of
https://github.com/LorenzCK/OnTopReplica.git
synced 2024-05-20 20:33:06 +12:00
PointBasedWindowSeeker now filters non-matching windows.
RestoreWindowSeeker filtering improved.
This commit is contained in:
parent
fbf8fae7f0
commit
2155f81d99
|
@ -26,6 +26,7 @@ namespace OnTopReplica.WindowSeekers {
|
||||||
|
|
||||||
//Sort and store
|
//Sort and store
|
||||||
_currentWindowList = (from t in _sortingList
|
_currentWindowList = (from t in _sortingList
|
||||||
|
where t.Item1 > 0
|
||||||
orderby t.Item1 descending
|
orderby t.Item1 descending
|
||||||
select t.Item2).ToList();
|
select t.Item2).ToList();
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace OnTopReplica.WindowSeekers {
|
||||||
//Class exact match
|
//Class exact match
|
||||||
if (!string.IsNullOrEmpty(Class)) {
|
if (!string.IsNullOrEmpty(Class)) {
|
||||||
string wndClass = handle.Class;
|
string wndClass = handle.Class;
|
||||||
if (wndClass.StartsWith(Class, StringComparison.InvariantCulture)){
|
if (wndClass.Equals(Class, StringComparison.InvariantCulture)){
|
||||||
points += 10;
|
points += 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,10 +40,10 @@ namespace OnTopReplica.WindowSeekers {
|
||||||
//Title match (may not be exact, but let's try)
|
//Title match (may not be exact, but let's try)
|
||||||
if (!string.IsNullOrEmpty(Title) && !string.IsNullOrEmpty(handle.Title)) {
|
if (!string.IsNullOrEmpty(Title) && !string.IsNullOrEmpty(handle.Title)) {
|
||||||
if (handle.Title.StartsWith(Title, StringComparison.InvariantCultureIgnoreCase)) {
|
if (handle.Title.StartsWith(Title, StringComparison.InvariantCultureIgnoreCase)) {
|
||||||
points += 10;
|
points += 5;
|
||||||
}
|
}
|
||||||
if (handle.Title.Equals(Title, StringComparison.InvariantCultureIgnoreCase)) {
|
if (handle.Title.Equals(Title, StringComparison.InvariantCultureIgnoreCase)) {
|
||||||
points += 5;
|
points += 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue