зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1903508 - Part 2: Implement nsLookAndFeel::GetKeyboardLayoutImpl() for the windows platform. r=win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D215071
This commit is contained in:
Родитель
907cde80ec
Коммит
63a951e9fb
|
@ -878,6 +878,16 @@ auto nsLookAndFeel::ComputeTitlebarColors() -> TitlebarColors {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsresult nsLookAndFeel::GetKeyboardLayoutImpl(nsACString& aLayout) {
|
||||||
|
char layout[KL_NAMELENGTH];
|
||||||
|
if (!::GetKeyboardLayoutNameA(layout)) {
|
||||||
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
|
}
|
||||||
|
aLayout.Assign(layout);
|
||||||
|
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
void nsLookAndFeel::EnsureInit() {
|
void nsLookAndFeel::EnsureInit() {
|
||||||
if (mInitialized) {
|
if (mInitialized) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -62,6 +62,8 @@ class nsLookAndFeel final : public nsXPLookAndFeel {
|
||||||
gfxFontStyle& aFontStyle) override;
|
gfxFontStyle& aFontStyle) override;
|
||||||
char16_t GetPasswordCharacterImpl() override;
|
char16_t GetPasswordCharacterImpl() override;
|
||||||
|
|
||||||
|
nsresult GetKeyboardLayoutImpl(nsACString& aLayout) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct TitlebarColors {
|
struct TitlebarColors {
|
||||||
// NOTE: These are the DWM accent colors, which might not match the
|
// NOTE: These are the DWM accent colors, which might not match the
|
||||||
|
|
Загрузка…
Ссылка в новой задаче