src/video/x11/SDL_x11messagebox.c
changeset 12935 7e37d3b5e7a3
parent 12503 806492103856
child 12982 2b00c2a7cec4
equal deleted inserted replaced
12934:d03900e991a2 12935:7e37d3b5e7a3
   426     if ( data->window == None ) {
   426     if ( data->window == None ) {
   427         return SDL_SetError("Couldn't create X window");
   427         return SDL_SetError("Couldn't create X window");
   428     }
   428     }
   429 
   429 
   430     if ( windowdata ) {
   430     if ( windowdata ) {
       
   431         Atom _NET_WM_STATE = X11_XInternAtom(display, "_NET_WM_STATE", False);
       
   432         Atom stateatoms[16];
       
   433         size_t statecount = 0;
       
   434         /* Set some message-boxy window states when attached to a parent window... */
       
   435         /* we skip the taskbar since this will pop to the front when the parent window is clicked in the taskbar, etc */
       
   436         stateatoms[statecount++] = X11_XInternAtom(display, "_NET_WM_STATE_SKIP_TASKBAR", False);
       
   437         stateatoms[statecount++] = X11_XInternAtom(display, "_NET_WM_STATE_SKIP_PAGER", False);
       
   438         stateatoms[statecount++] = X11_XInternAtom(display, "_NET_WM_STATE_FOCUSED", False);
       
   439         stateatoms[statecount++] = X11_XInternAtom(display, "_NET_WM_STATE_MODAL", False);
       
   440         SDL_assert(statecount <= SDL_arraysize(stateatoms));
       
   441         X11_XChangeProperty(display, data->window, _NET_WM_STATE, XA_ATOM, 32,
       
   442                             PropModeReplace, (unsigned char *)stateatoms, statecount);
       
   443 
   431         /* http://tronche.com/gui/x/icccm/sec-4.html#WM_TRANSIENT_FOR */
   444         /* http://tronche.com/gui/x/icccm/sec-4.html#WM_TRANSIENT_FOR */
   432         X11_XSetTransientForHint( display, data->window, windowdata->xwindow );
   445         X11_XSetTransientForHint( display, data->window, windowdata->xwindow );
   433     }
   446     }
   434 
   447 
   435     X11_XStoreName( display, data->window, messageboxdata->title );
   448     X11_XStoreName( display, data->window, messageboxdata->title );