wayland: Expose wl_output objects on video displays
Some protocols take a wl_output object to function, so expose them via a property on the video displays.
This commit is contained in:
@@ -855,6 +855,7 @@ SDL_DisplayID SDL_AddVideoDisplay(const SDL_VideoDisplay *display, bool send_eve
|
||||
SDL_copyp(new_display, display);
|
||||
new_display->id = id;
|
||||
new_display->device = _this;
|
||||
new_display->props = display->props;
|
||||
if (display->name) {
|
||||
new_display->name = SDL_strdup(display->name);
|
||||
} else {
|
||||
|
||||
@@ -1071,6 +1071,9 @@ static void display_handle_done(void *data,
|
||||
internal->placeholder.current_orientation = internal->orientation;
|
||||
internal->placeholder.internal = internal;
|
||||
|
||||
internal->placeholder.props = SDL_CreateProperties();
|
||||
SDL_SetPointerProperty(internal->placeholder.props, SDL_PROP_DISPLAY_WAYLAND_WL_OUTPUT_POINTER, internal->output);
|
||||
|
||||
// During initialization, the displays will be added after enumeration is complete.
|
||||
if (!video->initializing) {
|
||||
internal->display = SDL_AddVideoDisplay(&internal->placeholder, true);
|
||||
|
||||
Reference in New Issue
Block a user