Project
Loading...
Searching...
No Matches
GPUDisplayFrontendWaylandEv.cxx
Go to the documentation of this file.
1// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15// Functions of the Wayland frontend that need the evdev codes from linux/input-event-codes.h.
16// That header defines macros KEY_UP, KEY_F1, ..., which replace GPUDisplayFrontend::KEY_* (e.g. KEY_F1 becomes 59 = ';'), so it must not be included in GPUDisplayFrontendWayland.cxx,
17// and here only after all other headers, and the functions in this file must not use GPUDisplayFrontend::KEY_*.
18
20#include <linux/input-event-codes.h>
21
22using namespace o2::gpu;
23
24void GPUDisplayFrontendWayland::handlePointerButton(uint32_t button, bool pressed)
25{
26 if (button == BTN_RIGHT) {
27 mMouseDnR = pressed;
28 } else if (button == BTN_LEFT) {
29 mMouseDn = pressed;
30 } else if (button == BTN_MIDDLE) {
31 mMouseDnM = pressed;
32 }
33 if (pressed) {
36 }
37}