mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #11952 - cynicaldevil:master, r=Ms2ger
Creates KeyModifiers value using empty() instead of from_bits() <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11935 . <!-- Either: --> - [X] These changes do not require tests because: @jdm said so :P <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11952) <!-- Reviewable:end -->
This commit is contained in:
commit
87d08eb4e8
1 changed files with 1 additions and 1 deletions
|
@ -576,7 +576,7 @@ impl Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn glutin_mods_to_script_mods(modifiers: KeyModifiers) -> constellation_msg::KeyModifiers {
|
fn glutin_mods_to_script_mods(modifiers: KeyModifiers) -> constellation_msg::KeyModifiers {
|
||||||
let mut result = constellation_msg::KeyModifiers::from_bits(0).expect("infallible");
|
let mut result = constellation_msg::KeyModifiers::empty();
|
||||||
if modifiers.intersects(LEFT_SHIFT | RIGHT_SHIFT) {
|
if modifiers.intersects(LEFT_SHIFT | RIGHT_SHIFT) {
|
||||||
result.insert(SHIFT);
|
result.insert(SHIFT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue