test/testwm2.c
changeset 6788 036f53f2f5aa
parent 6787 95a4c5a5464c
child 7034 3a5a53435ebd
equal deleted inserted replaced
6787:95a4c5a5464c 6788:036f53f2f5aa
    78         /* Check for events */
    78         /* Check for events */
    79         while (SDL_PollEvent(&event)) {
    79         while (SDL_PollEvent(&event)) {
    80             SDLTest_CommonEvent(state, &event, &done);
    80             SDLTest_CommonEvent(state, &event, &done);
    81 
    81 
    82             if (event.type == SDL_WINDOWEVENT) {
    82             if (event.type == SDL_WINDOWEVENT) {
       
    83                 if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
       
    84                     SDL_Window *window = SDL_GetWindowFromID(event.window.windowID);
       
    85                     if (window) {
       
    86                         printf("Window %d resized to %dx%d\n",
       
    87                             event.window.windowID,
       
    88                             event.window.data1,
       
    89                             event.window.data2);
       
    90                     }
       
    91                 }
    83                 if (event.window.event == SDL_WINDOWEVENT_MOVED) {
    92                 if (event.window.event == SDL_WINDOWEVENT_MOVED) {
    84                     SDL_Window *window = SDL_GetWindowFromID(event.window.windowID);
    93                     SDL_Window *window = SDL_GetWindowFromID(event.window.windowID);
    85                     if (window) {
    94                     if (window) {
    86                         printf("Window %d moved to %d,%d (display %s)\n",
    95                         printf("Window %d moved to %d,%d (display %s)\n",
    87                             event.window.windowID,
    96                             event.window.windowID,