Commit dc9e726e authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

Ozone/X11:custom_frame_pref_default value from GetCustomFramePrefDefault

non-Ozone/X11 uses the GetCustomFramePrefDefault() method to determine
whether a custom frame needs to be used. In contrast, Ozone/X11
always set that to false. That looks like an inconsistency between
twos.

Thus, use that method instead.

PS: I had to remove constexpr from the kX11PlatformProperties
to be able to change the value. It doesn't seem to be possible
to call the GetCustomFramePrefDefault method from initializer
as long as that method isn't constexpr and cannot be changed to
that either.

Bug: 789065
Change-Id: Ibd5e7387ea6d3e473f217638f203f74ae42c530f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2372462Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com>
Cr-Commit-Position: refs/heads/master@{#801048}
parent 97338136
...@@ -64,7 +64,7 @@ namespace ui { ...@@ -64,7 +64,7 @@ namespace ui {
namespace { namespace {
constexpr OzonePlatform::PlatformProperties kX11PlatformProperties{ static OzonePlatform::PlatformProperties kX11PlatformProperties{
.needs_view_token = false, .needs_view_token = false,
.custom_frame_pref_default = false, .custom_frame_pref_default = false,
.use_system_title_bar = true, .use_system_title_bar = true,
...@@ -83,7 +83,12 @@ constexpr OzonePlatform::PlatformProperties kX11PlatformProperties{ ...@@ -83,7 +83,12 @@ constexpr OzonePlatform::PlatformProperties kX11PlatformProperties{
class OzonePlatformX11 : public OzonePlatform, class OzonePlatformX11 : public OzonePlatform,
public ui::OSExchangeDataProviderFactoryOzone { public ui::OSExchangeDataProviderFactoryOzone {
public: public:
OzonePlatformX11() { SetInstance(this); } OzonePlatformX11() {
SetInstance(this);
kX11PlatformProperties.custom_frame_pref_default =
ui::GetCustomFramePrefDefault();
}
~OzonePlatformX11() override {} ~OzonePlatformX11() override {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment