{"action":"created","issue":{"url":"https://api.github.com/repos/scummvm/scummvm/issues/937","repository_url":"https://api.github.com/repos/scummvm/scummvm","labels_url":"https://api.github.com/repos/scummvm/scummvm/issues/937/labels{/name}","comments_url":"https://api.github.com/repos/scummvm/scummvm/issues/937/comments","events_url":"https://api.github.com/repos/scummvm/scummvm/issues/937/events","html_url":"https://github.com/scummvm/scummvm/pull/937","id":221715307,"number":937,"title":"SDL: Only recreate SDL2 window when necessary","user":{"login":"csnover","id":229244,"avatar_url":"https://avatars3.githubusercontent.com/u/229244?v=3","gravatar_id":"","url":"https://api.github.com/users/csnover","html_url":"https://github.com/csnover","followers_url":"https://api.github.com/users/csnover/followers","following_url":"https://api.github.com/users/csnover/following{/other_user}","gists_url":"https://api.github.com/users/csnover/gists{/gist_id}","starred_url":"https://api.github.com/users/csnover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csnover/subscriptions","organizations_url":"https://api.github.com/users/csnover/orgs","repos_url":"https://api.github.com/users/csnover/repos","events_url":"https://api.github.com/users/csnover/events{/privacy}","received_events_url":"https://api.github.com/users/csnover/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-04-14T00:31:04Z","updated_at":"2017-04-22T07:46:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scummvm/scummvm/pulls/937","html_url":"https://github.com/scummvm/scummvm/pull/937","diff_url":"https://github.com/scummvm/scummvm/pull/937.diff","patch_url":"https://github.com/scummvm/scummvm/pull/937.patch"},"body":"Destroying and recreating the SDL window whenever the video mode changes in SDL2 is not necessary and causes several problems:\r\n\r\n1. In windowed mode, the game window shifts position;\r\n2. In fullscreen mode in macOS, every time the window is recreated, it causes the OS to play its switch-to-fullscreen animation again and emit system alert noises;\r\n3. The window content flickers; and\r\n4. The engine loses events from the old destroyed window.\r\n\r\nThis patch changes the SDL backend code to avoid destroying and recreating the SDL window when using SDL2, except when switching between OpenGL modes, which cannot be done without recreating the window."},"comment":{"url":"https://api.github.com/repos/scummvm/scummvm/issues/comments/296355589","html_url":"https://github.com/scummvm/scummvm/pull/937#issuecomment-296355589","issue_url":"https://api.github.com/repos/scummvm/scummvm/issues/937","id":296355589,"user":{"login":"bgK","id":52294,"avatar_url":"https://avatars2.githubusercontent.com/u/52294?v=3","gravatar_id":"","url":"https://api.github.com/users/bgK","html_url":"https://github.com/bgK","followers_url":"https://api.github.com/users/bgK/followers","following_url":"https://api.github.com/users/bgK/following{/other_user}","gists_url":"https://api.github.com/users/bgK/gists{/gist_id}","starred_url":"https://api.github.com/users/bgK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgK/subscriptions","organizations_url":"https://api.github.com/users/bgK/orgs","repos_url":"https://api.github.com/users/bgK/repos","events_url":"https://api.github.com/users/bgK/events{/privacy}","received_events_url":"https://api.github.com/users/bgK/received_events","type":"User","site_admin":false},"created_at":"2017-04-22T07:46:02Z","updated_at":"2017-04-22T07:46:02Z","body":"Using `SDL_SetWindowDisplayMode` to set the fullscreen window size instead of `SDL_SetWindowSize` fixes the fullscreen related issues for me on Linux, and removes the need to restore the window position: https://github.com/bgK/scummvm/commit/276732b5d1e5d958ced773fd2c2f9920b0d084ec."}}
{"actor":{"display_login":"bgK"}}