src/video/x11/SDL_x11messagebox.c
changeset 9339 45c49e8c9416
parent 8149 681eb46b8ac4
child 9423 3df83030dab9
     1.1 --- a/src/video/x11/SDL_x11messagebox.c	Tue Feb 10 20:40:03 2015 +0100
     1.2 +++ b/src/video/x11/SDL_x11messagebox.c	Wed Feb 11 01:48:52 2015 -0500
     1.3 @@ -366,6 +366,7 @@
     1.4      int x, y;
     1.5      XSizeHints *sizehints;
     1.6      XSetWindowAttributes wnd_attr;
     1.7 +    Atom _NET_WM_WINDOW_TYPE, _NET_WM_WINDOW_TYPE_DIALOG;
     1.8      Display *display = data->display;
     1.9      SDL_WindowData *windowdata = NULL;
    1.10      const SDL_MessageBoxData *messageboxdata = data->messageboxdata;
    1.11 @@ -401,6 +402,13 @@
    1.12  
    1.13      X11_XStoreName( display, data->window, messageboxdata->title );
    1.14  
    1.15 +    /* Let the window manager know this is a dialog box */
    1.16 +    _NET_WM_WINDOW_TYPE = X11_XInternAtom(display, "_NET_WM_WINDOW_TYPE", False);
    1.17 +    _NET_WM_WINDOW_TYPE_DIALOG = X11_XInternAtom(display, "_NET_WM_WINDOW_TYPE_DIALOG", False);
    1.18 +    X11_XChangeProperty(display, data->window, _NET_WM_WINDOW_TYPE, XA_ATOM, 32,
    1.19 +                    PropModeReplace,
    1.20 +                    (unsigned char *)&_NET_WM_WINDOW_TYPE_DIALOG, 1);
    1.21 +
    1.22      /* Allow the window to be deleted by the window manager */
    1.23      data->wm_protocols = X11_XInternAtom( display, "WM_PROTOCOLS", False );
    1.24      data->wm_delete_message = X11_XInternAtom( display, "WM_DELETE_WINDOW", False );