• Maksim Sisov's avatar
    [ozone/wayland] Fix crash when right-clicking on the window decoration area. · ac76759c
    Maksim Sisov authored
    On chrome/x11, right-clicking on the window decoration bar toggles a
    context menu whose one of the menu items allows switching between
    builtin and system/native window decorations.
    
    Today, chrome/ozone/wayland crashes when building the menu because it tried to
    read a preference only registered in use_x11: kUseCustomChromeFrame.
    
    So this CL does two things:
    
    - registers the preference [1] based on PlatformProperties in case of USE_OZONE.
    
    - checks whether using system title bar[2] is supported by underlying ozone platform.
    By default, ozone platforms have this feature disabled.
    
    [1] kUseCustomChromeFrame
    [2] IDC_USE_SYSTEM_TITLE_BAR
    
    Based on tonikitoo@igalia.com's patch.
    
    Bug: 578890, 849596
    Change-Id: Ib05d2057f1193a9e41580d0133e35dff4bc2ea77
    Reviewed-on: https://chromium-review.googlesource.com/1167045
    Commit-Queue: Maksim Sisov <msisov@igalia.com>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#582087}
    ac76759c
DEPS 9.93 KB