src/video/x11/SDL_x11window.c
changeset 1956 ba0d62354872
parent 1952 420716272158
child 2143 e906da4414a3
     1.1 --- a/src/video/x11/SDL_x11window.c	Sat Jul 29 03:57:55 2006 +0000
     1.2 +++ b/src/video/x11/SDL_x11window.c	Sat Jul 29 21:51:00 2006 +0000
     1.3 @@ -193,8 +193,7 @@
     1.4                              visual, AllocNone);
     1.5      }
     1.6  
     1.7 -    if ((window->flags & SDL_WINDOW_FULLSCREEN) ||
     1.8 -        window->x == SDL_WINDOWPOS_CENTERED) {
     1.9 +    if (window->x == SDL_WINDOWPOS_CENTERED) {
    1.10          x = (DisplayWidth(data->display, displaydata->screen) -
    1.11               window->w) / 2;
    1.12      } else if (window->x == SDL_WINDOWPOS_UNDEFINED) {
    1.13 @@ -202,8 +201,7 @@
    1.14      } else {
    1.15          x = window->x;
    1.16      }
    1.17 -    if ((window->flags & SDL_WINDOW_FULLSCREEN) ||
    1.18 -        window->y == SDL_WINDOWPOS_CENTERED) {
    1.19 +    if (window->y == SDL_WINDOWPOS_CENTERED) {
    1.20          y = (DisplayHeight(data->display, displaydata->screen) -
    1.21               window->h) / 2;
    1.22      } else if (window->y == SDL_WINDOWPOS_UNDEFINED) {
    1.23 @@ -360,14 +358,7 @@
    1.24      wmhints = XAllocWMHints();
    1.25      if (wmhints) {
    1.26          wmhints->input = True;
    1.27 -        if (window->flags & SDL_WINDOW_MINIMIZED) {
    1.28 -            wmhints->initial_state = IconicState;
    1.29 -        } else if (window->flags & SDL_WINDOW_SHOWN) {
    1.30 -            wmhints->initial_state = NormalState;
    1.31 -        } else {
    1.32 -            wmhints->initial_state = WithdrawnState;
    1.33 -        }
    1.34 -        wmhints->flags = InputHint | StateHint;
    1.35 +        wmhints->flags = InputHint;
    1.36          XSetWMHints(data->display, w, wmhints);
    1.37          XFree(wmhints);
    1.38      }
    1.39 @@ -391,16 +382,6 @@
    1.40      /* Allow the window to be deleted by the window manager */
    1.41      XSetWMProtocols(data->display, w, &data->WM_DELETE_WINDOW, 1);
    1.42  
    1.43 -    /* Finally, show the window */
    1.44 -    if (window->flags & SDL_WINDOW_SHOWN) {
    1.45 -        XEvent event;
    1.46 -
    1.47 -        XMapRaised(data->display, w);
    1.48 -        do {
    1.49 -            XCheckWindowEvent(data->display, w, StructureNotifyMask, &event);
    1.50 -        } while (event.type != MapNotify);
    1.51 -    }
    1.52 -
    1.53      if (SetupWindowData(_this, window, w, SDL_TRUE) < 0) {
    1.54  #ifdef SDL_VIDEO_OPENGL_GLX
    1.55          if (window->flags & SDL_WINDOW_OPENGL) {
    1.56 @@ -410,9 +391,6 @@
    1.57          XDestroyWindow(data->display, w);
    1.58          return -1;
    1.59      }
    1.60 -
    1.61 -    X11_SetWindowTitle(_this, window);
    1.62 -
    1.63      return 0;
    1.64  }
    1.65  
    1.66 @@ -510,25 +488,8 @@
    1.67      SDL_DisplayData *displaydata =
    1.68          (SDL_DisplayData *) SDL_GetDisplayFromWindow(window)->driverdata;
    1.69      Display *display = data->videodata->display;
    1.70 -    int x, y;
    1.71  
    1.72 -    if ((window->flags & SDL_WINDOW_FULLSCREEN) ||
    1.73 -        window->x == SDL_WINDOWPOS_CENTERED) {
    1.74 -        x = (DisplayWidth(display, displaydata->screen) - window->w) / 2;
    1.75 -    } else if (window->x == SDL_WINDOWPOS_UNDEFINED) {
    1.76 -        x = 0;
    1.77 -    } else {
    1.78 -        x = window->x;
    1.79 -    }
    1.80 -    if ((window->flags & SDL_WINDOW_FULLSCREEN) ||
    1.81 -        window->y == SDL_WINDOWPOS_CENTERED) {
    1.82 -        y = (DisplayHeight(display, displaydata->screen) - window->h) / 2;
    1.83 -    } else if (window->y == SDL_WINDOWPOS_UNDEFINED) {
    1.84 -        y = 0;
    1.85 -    } else {
    1.86 -        y = window->y;
    1.87 -    }
    1.88 -    XMoveWindow(display, data->window, x, y);
    1.89 +    XMoveWindow(display, data->window, window->x, window->y);
    1.90  }
    1.91  
    1.92  void