parent
a64efb0677
commit
3b8ca2ebd5
@ -0,0 +1,11 @@
|
|||||||
|
diff -up chromium-100.0.4896.75/net/base/address_list.h.missing-include-tuple chromium-100.0.4896.75/net/base/address_list.h
|
||||||
|
--- chromium-100.0.4896.75/net/base/address_list.h.missing-include-tuple 2022-04-08 10:03:31.950894611 -0400
|
||||||
|
+++ chromium-100.0.4896.75/net/base/address_list.h 2022-04-08 10:03:43.926970267 -0400
|
||||||
|
@@ -8,6 +8,7 @@
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
+#include <tuple>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
@ -0,0 +1,49 @@
|
|||||||
|
diff -up chromium-100.0.4896.75/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc.old-xkb chromium-100.0.4896.75/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
|
||||||
|
--- chromium-100.0.4896.75/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc.old-xkb 2022-04-08 10:12:14.725197002 -0400
|
||||||
|
+++ chromium-100.0.4896.75/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc 2022-04-08 10:13:04.512511489 -0400
|
||||||
|
@@ -31,14 +31,6 @@
|
||||||
|
#include "ui/events/keycodes/keyboard_code_conversion.h"
|
||||||
|
#include "ui/events/keycodes/keyboard_code_conversion_xkb.h"
|
||||||
|
|
||||||
|
-// xkb_keymap_key_get_mods_for_level is relatively new (introduced in ver 1.0,
|
||||||
|
-// Sep 6, 2020), thus it is not available on some platform, such as Ubuntu
|
||||||
|
-// 18.04, which we still supports.
|
||||||
|
-// Thus declare the function as weak here, so we can check the availability on
|
||||||
|
-// runtime.
|
||||||
|
-extern "C" __attribute__((weak)) decltype(
|
||||||
|
- xkb_keymap_key_get_mods_for_level) xkb_keymap_key_get_mods_for_level;
|
||||||
|
-
|
||||||
|
namespace ui {
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
@@ -925,18 +917,10 @@ void XkbKeyboardLayoutEngine::SetKeymap(
|
||||||
|
const xkb_keysym_t* keysyms;
|
||||||
|
int num_syms = xkb_keymap_key_get_syms_by_level(keymap, keycode, layout,
|
||||||
|
level, &keysyms);
|
||||||
|
- if (xkb_keymap_key_get_mods_for_level) {
|
||||||
|
- xkb_mod_mask_t masks[100]; // Large enough buffer.
|
||||||
|
- int num_mods = xkb_keymap_key_get_mods_for_level(
|
||||||
|
- keymap, keycode, layout, level, masks, std::size(masks));
|
||||||
|
- AddEntries(base::make_span(keysyms, num_syms),
|
||||||
|
- base::make_span(masks, num_mods), keycode);
|
||||||
|
- } else {
|
||||||
|
// If not, unfortunately, there's no convenient/efficient way
|
||||||
|
// to take the possible masks. Thus, use mask 0 always.
|
||||||
|
constexpr xkb_mod_mask_t kMask[] = {0};
|
||||||
|
AddEntries(base::make_span(keysyms, num_syms), kMask, keycode);
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1000,10 +984,7 @@ int XkbKeyboardLayoutEngine::UpdateModif
|
||||||
|
|
||||||
|
DomCode XkbKeyboardLayoutEngine::GetDomCodeByKeysym(uint32_t keysym,
|
||||||
|
uint32_t modifiers) const {
|
||||||
|
- // If xkb_keymap_key_get_mods_for_level is not available, all entries are
|
||||||
|
- // stored with modifiers mask is 0.
|
||||||
|
- if (!xkb_keymap_key_get_mods_for_level)
|
||||||
|
- modifiers = 0;
|
||||||
|
+ modifiers = 0;
|
||||||
|
|
||||||
|
auto iter = xkb_keysym_map_.find(XkbKeysymMapKey(keysym, modifiers));
|
||||||
|
if (iter == xkb_keysym_map_.end()) {
|
Loading…
Reference in new issue