0

Roll third_party/libei

This moves from a pre-release snapshot to the current stable release, as
the former is not able to communicate with the current version of GNOME.

Bug: 378932951
Change-Id: Ib8f03b2179adb160a1dc5ebe3d2c50ca9b22d930
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6092041
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Commit-Queue: Erik Jensen <rkjnsn@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1395728}
This commit is contained in:
Erik Jensen
2024-12-12 18:21:58 -08:00
committed by Chromium LUCI CQ
parent 158f20f27e
commit 70b3feb8b0
5 changed files with 20 additions and 19 deletions

2
DEPS

@ -2712,7 +2712,7 @@ deps = {
'packages': [
{
'package': 'chromium/third_party/libei/linux-amd64',
'version': 'PQz4zG5Q3SXoAaCYq3RK99W3wg_v0NoOu1OzTSvA_oIC',
'version': '7V4n9OUxAo8k8zayCwZ47Bc5Mqr7Br1NXrxeMKXYBNQC',
},
],

@ -8,7 +8,7 @@
#include "base/check.h"
#include "base/memory/raw_ptr.h"
#include "third_party/libei/cipd/include/libei.h"
#include "third_party/libei/cipd/include/libei-1.0/libei.h"
namespace remoting {

@ -17,7 +17,7 @@
#include "base/sequence_checker.h"
#include "base/time/time.h"
#include "remoting/base/logging.h"
#include "third_party/libei/cipd/include/libei.h"
#include "third_party/libei/cipd/include/libei-1.0/libei.h"
#include "third_party/webrtc/modules/portal/portal_request_response.h"
#include "third_party/webrtc/modules/portal/scoped_glib.h"
#include "third_party/webrtc/modules/portal/xdg_desktop_portal_utils.h"
@ -123,8 +123,8 @@ void RemoteDesktopPortalInjector::InjectMouseButton(int code, bool pressed) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (use_ei_) {
if (ei_pointer_enabled_) {
ei_device_pointer_button(ei_pointer_, EvdevCodeToMouseButton(code),
pressed);
ei_device_button_button(ei_pointer_, EvdevCodeToMouseButton(code),
pressed);
ei_device_frame(ei_pointer_, ei_now(ei_));
} else {
// Non-ei injection is blocked by portal when EI has been enabled
@ -153,13 +153,13 @@ void RemoteDesktopPortalInjector::InjectMouseScroll(int axis, int steps) {
if (use_ei_) {
if (ei_absolute_pointer_enabled_) {
if (axis == ScrollType::VERTICAL_SCROLL) {
ei_device_pointer_scroll_discrete(ei_absolute_pointer_, 0,
steps * EI_SCROLL_FACTOR);
ei_device_scroll_discrete(ei_absolute_pointer_, 0,
steps * EI_SCROLL_FACTOR);
} else {
ei_device_pointer_scroll_discrete(ei_absolute_pointer_,
steps * EI_SCROLL_FACTOR, 0);
ei_device_scroll_discrete(ei_absolute_pointer_,
steps * EI_SCROLL_FACTOR, 0);
}
ei_device_pointer_scroll_stop(ei_absolute_pointer_, true, true);
ei_device_scroll_stop(ei_absolute_pointer_, true, true);
ei_device_frame(ei_absolute_pointer_, ei_now(ei_));
} else {
LOG(ERROR) << "Unable to scroll mouse since EI pointer is disabled";
@ -376,9 +376,10 @@ void RemoteDesktopPortalInjector::OnEiSeatAddedEvent(struct ei_event* event) {
ei_seat_ = ei_seat_ref(ei_event_get_seat(event));
HOST_LOG << "EI seat added: " << ei_seat_get_name(ei_seat_);
ei_seat_bind_capability(ei_seat_, EI_DEVICE_CAP_POINTER);
ei_seat_bind_capability(ei_seat_, EI_DEVICE_CAP_KEYBOARD);
ei_seat_bind_capability(ei_seat_, EI_DEVICE_CAP_POINTER_ABSOLUTE);
ei_seat_bind_capabilities(
ei_seat_, EI_DEVICE_CAP_POINTER, EI_DEVICE_CAP_KEYBOARD,
EI_DEVICE_CAP_POINTER_ABSOLUTE, EI_DEVICE_CAP_BUTTON,
EI_DEVICE_CAP_SCROLL, nullptr);
}
void RemoteDesktopPortalInjector::OnEiSeatRemovedEvent(struct ei_event* event) {
@ -535,9 +536,9 @@ void RemoteDesktopPortalInjector::HandleEiEvent(struct ei_event* event) {
case EI_EVENT_DEVICE_STOP_EMULATING:
case EI_EVENT_POINTER_MOTION:
case EI_EVENT_POINTER_MOTION_ABSOLUTE:
case EI_EVENT_POINTER_BUTTON:
case EI_EVENT_POINTER_SCROLL:
case EI_EVENT_POINTER_SCROLL_DISCRETE:
case EI_EVENT_BUTTON_BUTTON:
case EI_EVENT_SCROLL_DELTA:
case EI_EVENT_SCROLL_DISCRETE:
case EI_EVENT_KEYBOARD_KEY:
break;
default:

@ -15,7 +15,7 @@
#include "base/memory/scoped_refptr.h"
#include "base/sequence_checker.h"
#include "remoting/host/linux/ei_event_watcher_glib.h"
#include "third_party/libei/cipd/include/libei.h"
#include "third_party/libei/cipd/include/libei-1.0/libei.h"
#include "third_party/webrtc/modules/desktop_capture/linux/wayland/screen_capture_portal_interface.h"
#include "third_party/webrtc/modules/desktop_capture/linux/wayland/screencast_portal.h"
#include "third_party/webrtc/modules/portal/xdg_desktop_portal_utils.h"

@ -1,7 +1,7 @@
Name: libei
URL: https://gitlab.freedesktop.org/libinput/libei
Version: f9d691e98b515b544fb803a3c0c387621fd2d332
Revision: f9d691e98b515b544fb803a3c0c387621fd2d332
Version: 1.3.0
Revision: 997b7c0f37faea4f8bae59613c8f27370925d5b0
License: MIT
License File: LICENSE
Security Critical: yes