Akane(8)

akane WINDOWEVENT の整理。

 SDL2 でウィンドウの変化に対してどのようなイベントが発生しているかを調べてみました。

ウインドウ作成
  SDL_WINDOWEVENT_SHOWN
  SDL_WINDOWEVENT_EXPOSED
アイコン化
  なし
アイコンから復帰
  SDL_WINDOWEVENT_SHOWN
  SDL_WINDOWEVENT_EXPOSED
全画面(DeskTop)
  SDL_WINDOWEVENT_SIZE_CHANGED
  SDL_WINDOWEVENT_RESIZED
  SDL_WINDOWEVENT_EXPOSED
ウィンドウ表示(desktop)
  SDL_WINDOWEVENT_SIZE_CHANGED
  SDL_WINDOWEVENT_EXPOSED
全画面(DeskTop) -> 別ウィンドウ切り替え
  SDL_WINDOWEVENT_SIZE_CHANGED
  SDL_WINDOWEVENT_SIZE_CHANGED
  SDL_WINDOWEVENT_RESIZED
  SDL_WINDOWEVENT_EXPOSED
全画面(解像度変更)
  SDL_WINDOWEVENT_SIZE_CHANGED
  SDL_WINDOWEVENT_EXPOSED
  SDL_WINDOWEVENT_EXPOSED
ウィンドウ表示
  SDL_WINDOWEVENT_SIZE_CHANGED
  SDL_WINDOWEVENT_RESIZED
  SDL_WINDOWEVENT_SIZE_CHANGED
  SDL_WINDOWEVENT_RESIZED
  SDL_WINDOWEVENT_EXPOSED

 SDL_UpdateWindowSurface() を呼び出すのは SDL_WINDOWEVENT_EXPOSED だけでいいようです。

Akane

Posted by sirius