Skip to content

Commit e4012c6

Browse files
committed
firefox display lock fix
1 parent 15dd8f8 commit e4012c6

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

Common/common_app_define.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// common application definitions
44
#define APPNAME L"LGTV Companion"
5-
#define APP_VERSION L"5.0.4"
5+
#define APP_VERSION L"5.0.5"
66
#define CONFIG_FILE L"config.json"
77
#define LOG_FILE L"log.txt"
88
#define WINDOW_CLASS_UNIQUE L"YOLOx0x0x0181818"

LGTV Companion Setup/Product.wxs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!-- When publishing updated version, make sure to update "ProductCode" GUID and "Version" -->
22
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui" >
33
<Package Name="LGTV Companion" Language="1033"
4-
Version="5.0.4" Manufacturer="J Persson" UpgradeCode="0BA17E5B-11CE-491D-B1A1-05DD2D9F610A" InstallerVersion="500"
5-
ProductCode="{074EE5D8-3952-4DC8-A78A-A1D739FAE3A0}">
4+
Version="5.0.5" Manufacturer="J Persson" UpgradeCode="0BA17E5B-11CE-491D-B1A1-05DD2D9F610A" InstallerVersion="500"
5+
ProductCode="{3051B992-3412-418A-A33D-EA3F2B8C8422}">
66
<SummaryInformation Description="LGTV Companion installer" />
77
<Media Id="1" Cabinet="LGTVapp.cab" EmbedCab="yes" />
88
<MajorUpgrade DowngradeErrorMessage="A newer version of LGTV Companion is already installed." />

LGTV Companion User/user_idle_mode.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,21 @@ bool UIM::isDisplayLock(bool& video_wake_lock, std::vector <std::wstring> & proc
8686
*/
8787
}
8888

89-
if (reason_message == L"Video Wake Lock")
89+
if (reason_message == L"Video Wake Lock") //most browsers
9090
video_wake_lock = true;
9191
if (requesterName != L"")
9292
{
93+
std::wstring processName;
9394
size_t lastSlash = requesterName.find_last_of(L"\\/");
9495
if (lastSlash != std::wstring::npos)
95-
processes.push_back(tools::tolower(requesterName.substr(lastSlash + 1)));
96+
processName = tools::tolower(requesterName.substr(lastSlash + 1));
9697
else
97-
processes.push_back(tools::tolower(requesterName));
98+
processName = tools::tolower(requesterName);
99+
processes.push_back(processName);
100+
// Firefox
101+
if(processName == L"firefox.exe")
102+
if (reason_message == L"display request")
103+
video_wake_lock = true;
98104
}
99105
}
100106
return true;

0 commit comments

Comments
 (0)