src/video/x11/SDL_x11window.c
changeset 6501 2efafb933bd5
parent 6500 c532b3fdce27
child 6539 c76274e7f32a
equal deleted inserted replaced
6500:c532b3fdce27 6501:2efafb933bd5
  1030 #endif
  1030 #endif
  1031 
  1031 
  1032     SetWindowBordered(display, displaydata->screen, data->xwindow, SDL_FALSE);
  1032     SetWindowBordered(display, displaydata->screen, data->xwindow, SDL_FALSE);
  1033 
  1033 
  1034     /* Center actual window within our cover-the-screen window. */
  1034     /* Center actual window within our cover-the-screen window. */
  1035     rect.x += (rect.w - window->w) / 2;
  1035     XReparentWindow(display, data->xwindow, data->fswindow,
  1036     rect.y += (rect.h - window->h) / 2;
  1036                     (rect.w - window->w) / 2, (rect.h - window->h) / 2);
  1037     XReparentWindow(display, data->xwindow, data->fswindow, rect.x, rect.y);
  1037 
  1038 
  1038     /* Center mouse in the fullscreen window. */
  1039     /* Center mouse in the window. */
  1039     rect.x += (rect.w / 2);
  1040     rect.x += (window->w / 2);
  1040     rect.y += (rect.h / 2);
  1041     rect.y += (window->h / 2);
       
  1042     XWarpPointer(display, None, root, 0, 0, 0, 0, rect.x, rect.y);
  1041     XWarpPointer(display, None, root, 0, 0, 0, 0, rect.x, rect.y);
  1043 
  1042 
  1044     /* Wait to be mapped, filter Unmap event out if it arrives. */
  1043     /* Wait to be mapped, filter Unmap event out if it arrives. */
  1045     XIfEvent(display, &ev, &isMapNotify, (XPointer)&data->xwindow);
  1044     XIfEvent(display, &ev, &isMapNotify, (XPointer)&data->xwindow);
  1046     XCheckIfEvent(display, &ev, &isUnmapNotify, (XPointer)&data->xwindow);
  1045     XCheckIfEvent(display, &ev, &isUnmapNotify, (XPointer)&data->xwindow);