Skip to content

Commit

Permalink
Fixed bug 4013 - Wayland: fix videoquit on multimonitor system
Browse files Browse the repository at this point in the history
Vladimir

On multimonitor system Wayland_VideoQuit invalid deiniting.

Tested in Centos7 + Weston
  • Loading branch information
slouken committed Jan 3, 2018
1 parent 1fa4bcc commit 8111a63
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/video/wayland/SDL_waylandvideo.c
Expand Up @@ -233,6 +233,7 @@ display_handle_mode(void *data,
mode.w = width;
mode.h = height;
mode.refresh_rate = refresh / 1000; // mHz to Hz
mode.driverdata = display->driverdata;
SDL_AddDisplayMode(display, &mode);

if (flags & WL_OUTPUT_MODE_CURRENT) {
Expand Down Expand Up @@ -408,14 +409,19 @@ void
Wayland_VideoQuit(_THIS)
{
SDL_VideoData *data = _this->driverdata;
int i;
int i, j;

Wayland_FiniMouse ();

for (i = 0; i < _this->num_displays; ++i) {
SDL_VideoDisplay *display = &_this->displays[i];
wl_output_destroy(display->driverdata);
display->driverdata = NULL;

for (j = display->num_display_modes; j--;) {
display->display_modes[j].driverdata = NULL;
}
display->desktop_mode.driverdata = NULL;
}

Wayland_display_destroy_input(data);
Expand Down

0 comments on commit 8111a63

Please sign in to comment.