mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
uwac: change seat API to not reference disposed UwacSeat
This is a false positive returned by covscan, but that doesn't hurt to fix it.
This commit is contained in:
@@ -37,6 +37,7 @@ typedef struct uwac_display UwacDisplay;
|
||||
typedef struct uwac_output UwacOutput;
|
||||
typedef struct uwac_window UwacWindow;
|
||||
typedef struct uwac_seat UwacSeat;
|
||||
typedef uint32_t UwacSeatId;
|
||||
|
||||
|
||||
/** @brief error codes */
|
||||
@@ -111,7 +112,12 @@ struct uwac_new_seat_event {
|
||||
};
|
||||
typedef struct uwac_new_seat_event UwacSeatNewEvent;
|
||||
|
||||
typedef struct uwac_new_seat_event UwacSeatRemovedEvent;
|
||||
|
||||
struct uwac_removed_seat_event {
|
||||
int type;
|
||||
UwacSeatId id;
|
||||
};
|
||||
typedef struct uwac_removed_seat_event UwacSeatRemovedEvent;
|
||||
|
||||
struct uwac_keyboard_enter_event {
|
||||
int type;
|
||||
@@ -213,6 +219,7 @@ union uwac_event {
|
||||
int type;
|
||||
UwacOutputNewEvent output_new;
|
||||
UwacSeatNewEvent seat_new;
|
||||
UwacSeatRemovedEvent seat_removed;
|
||||
UwacPointerEnterLeaveEvent mouse_enter_leave;
|
||||
UwacPointerMotionEvent mouse_motion;
|
||||
UwacPointerButtonEvent mouse_button;
|
||||
@@ -479,6 +486,14 @@ UWAC_API UwacReturnCode UwacNextEvent(UwacDisplay *display, UwacEvent *event);
|
||||
*/
|
||||
UWAC_API const char *UwacSeatGetName(const UwacSeat *seat);
|
||||
|
||||
/**
|
||||
* returns the id of the given UwacSeat
|
||||
*
|
||||
* @param seat the UwacSeat
|
||||
* @return the id of the seat
|
||||
*/
|
||||
UWAC_API UwacSeatId UwacSeatGetId(const UwacSeat *seat);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user