Explorar o código

Fix issue 2239. Pillarbox when restored after alt-tab in fullscreen

This isn't best solution and all SDL-related code need refactoring, but it's works.
ArseniyShestakov %!s(int64=10) %!d(string=hai) anos
pai
achega
f940e3ed42
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      client/CMT.cpp

+ 9 - 0
client/CMT.cpp

@@ -1073,6 +1073,15 @@ static void handleEvent(SDL_Event & ev)
 
 		return;
 	}
+	else if(ev.type == SDL_WINDOWEVENT)
+	{
+		switch (ev.window.event) {
+		case SDL_WINDOWEVENT_RESTORED:
+			fullScreenChanged();
+			break;
+		}
+		return;
+	}
 	{
 		boost::unique_lock<boost::mutex> lock(eventsM);
 		events.push(ev);