mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Added UWAC_EVENT_OUTPUT_GEOMETRY event
This commit is contained in:
@@ -97,6 +97,7 @@ enum
|
||||
UWAC_EVENT_CLIPBOARD_AVAILABLE,
|
||||
UWAC_EVENT_CLIPBOARD_SELECT,
|
||||
UWAC_EVENT_CLIPBOARD_OFFER,
|
||||
UWAC_EVENT_OUTPUT_GEOMETRY,
|
||||
};
|
||||
|
||||
/** @brief window states */
|
||||
@@ -243,11 +244,27 @@ struct uwac_clipboard_event
|
||||
};
|
||||
typedef struct uwac_clipboard_event UwacClipboardEvent;
|
||||
|
||||
struct uwac_output_geometry_event
|
||||
{
|
||||
int type;
|
||||
UwacOutput* output;
|
||||
int x;
|
||||
int y;
|
||||
int physical_width;
|
||||
int physical_height;
|
||||
int subpixel;
|
||||
const char *make;
|
||||
const char *model;
|
||||
int transform;
|
||||
};
|
||||
typedef struct uwac_output_geometry_event UwacOutputGeometryEvent;
|
||||
|
||||
/** @brief */
|
||||
union uwac_event
|
||||
{
|
||||
int type;
|
||||
UwacOutputNewEvent output_new;
|
||||
UwacOutputGeometryEvent output_geometry;
|
||||
UwacSeatNewEvent seat_new;
|
||||
UwacSeatRemovedEvent seat_removed;
|
||||
UwacPointerEnterLeaveEvent mouse_enter_leave;
|
||||
|
||||
@@ -50,8 +50,11 @@ set_cursor_image(UwacSeat* seat, uint32_t serial)
|
||||
|
||||
switch(seat->pointer_type) {
|
||||
case 2: /* Custom poiner */
|
||||
if (!seat->pointer_buffer)
|
||||
return UWAC_SUCCESS;
|
||||
image = seat->pointer_image;
|
||||
buffer = seat->pointer_buffer;
|
||||
seat->pointer_buffer = NULL;
|
||||
surface = seat->pointer_surface;
|
||||
x = image->hotspot_x;
|
||||
y = image->hotspot_y;
|
||||
@@ -1007,7 +1010,7 @@ UwacReturnCode create_pointer_buffer(UwacSeat* seat, const void* src, size_t siz
|
||||
seat->pointer_image->width,
|
||||
seat->pointer_image->height,
|
||||
seat->pointer_image->width * 4,
|
||||
WL_SHM_FORMAT_XRGB8888);
|
||||
WL_SHM_FORMAT_ARGB8888);
|
||||
wl_shm_pool_destroy(pool);
|
||||
|
||||
error_mmap:
|
||||
|
||||
@@ -52,6 +52,17 @@ static void output_handle_geometry(void *data, struct wl_output *wl_output, int
|
||||
if (!output->model) {
|
||||
assert(uwacErrorHandler(output->display, UWAC_ERROR_NOMEMORY, "%s: unable to strdup model\n", __FUNCTION__));
|
||||
}
|
||||
|
||||
UwacEvent* event = UwacDisplayNewEvent(output->display, UWAC_EVENT_OUTPUT_GEOMETRY);
|
||||
event->output_geometry.output = output;
|
||||
event->output_geometry.x = x;
|
||||
event->output_geometry.y = y;
|
||||
event->output_geometry.physical_width = physical_width;
|
||||
event->output_geometry.physical_height = physical_height;
|
||||
event->output_geometry.subpixel = subpixel;
|
||||
event->output_geometry.make = output->make;
|
||||
event->output_geometry.model = output->model;
|
||||
event->output_geometry.transform = transform;
|
||||
}
|
||||
|
||||
static void output_handle_done(void *data, struct wl_output *wl_output)
|
||||
|
||||
Reference in New Issue
Block a user