Commit aa3e861a authored by Alexander Lapshenkov's avatar Alexander Lapshenkov Committed by Commit Bot

Fix GCC incomplete designated initialization bug

For GCC 8.4.0 is important to get all the first initializer in
designated init-list in case of implicit construction. Correct compile
if use explicit construction.

Error example (GCC 8.4.0):
-c ../../ui/events/platform/x11/x11_event_source.cc -o obj/ui/events/platform/x11/x11/x11_event_source.o
../../ui/events/platform/x11/x11_event_source.cc: In function ‘void ui::{anonymous}::InitializeXkb(x11::Connection*)’:
../../ui/events/platform/x11/x11_event_source.cc:78:4: error: no matching function for call to ‘x11::Xkb::SelectEvents(<brace-enclosed initializer list>)’
   });

Change-Id: I80ea8d5f0a14bb8edc1e89e66eb6d1034bd1fec3
Bug: 819294
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2516219Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/master@{#823589}
parent 67d05977
......@@ -70,7 +70,7 @@ void InitializeXkb(x11::Connection* connection) {
}));
constexpr auto kXkbAllMapPartMask = static_cast<x11::Xkb::MapPart>(0xff);
xkb.SelectEvents({
xkb.SelectEvents(x11::Xkb::SelectEventsRequest{
.deviceSpec = static_cast<x11::Xkb::DeviceSpec>(x11::Xkb::Id::UseCoreKbd),
.affectWhich = x11::Xkb::EventType::NewKeyboardNotify,
.selectAll = x11::Xkb::EventType::NewKeyboardNotify,
......
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