mirror of https://github.com/encounter/SDL.git
Set both _NET_WM_NAME and WM_NAME so SDL windows can be shared in the browser.
Fixes https://github.com/libsdl-org/SDL/issues/4924
This commit is contained in:
parent
301819cd1d
commit
6c56e27511
|
@ -405,6 +405,7 @@ X11_VideoInit(_THIS)
|
||||||
GET_ATOM(WM_PROTOCOLS);
|
GET_ATOM(WM_PROTOCOLS);
|
||||||
GET_ATOM(WM_DELETE_WINDOW);
|
GET_ATOM(WM_DELETE_WINDOW);
|
||||||
GET_ATOM(WM_TAKE_FOCUS);
|
GET_ATOM(WM_TAKE_FOCUS);
|
||||||
|
GET_ATOM(WM_NAME);
|
||||||
GET_ATOM(_NET_WM_STATE);
|
GET_ATOM(_NET_WM_STATE);
|
||||||
GET_ATOM(_NET_WM_STATE_HIDDEN);
|
GET_ATOM(_NET_WM_STATE_HIDDEN);
|
||||||
GET_ATOM(_NET_WM_STATE_FOCUSED);
|
GET_ATOM(_NET_WM_STATE_FOCUSED);
|
||||||
|
|
|
@ -93,6 +93,7 @@ typedef struct SDL_VideoData
|
||||||
Atom WM_PROTOCOLS;
|
Atom WM_PROTOCOLS;
|
||||||
Atom WM_DELETE_WINDOW;
|
Atom WM_DELETE_WINDOW;
|
||||||
Atom WM_TAKE_FOCUS;
|
Atom WM_TAKE_FOCUS;
|
||||||
|
Atom WM_NAME;
|
||||||
Atom _NET_WM_STATE;
|
Atom _NET_WM_STATE;
|
||||||
Atom _NET_WM_STATE_HIDDEN;
|
Atom _NET_WM_STATE_HIDDEN;
|
||||||
Atom _NET_WM_STATE_FOCUSED;
|
Atom _NET_WM_STATE_FOCUSED;
|
||||||
|
|
|
@ -734,6 +734,9 @@ X11_SetWindowTitle(_THIS, SDL_Window * window)
|
||||||
|
|
||||||
Atom UTF8_STRING = data->videodata->UTF8_STRING;
|
Atom UTF8_STRING = data->videodata->UTF8_STRING;
|
||||||
Atom _NET_WM_NAME = data->videodata->_NET_WM_NAME;
|
Atom _NET_WM_NAME = data->videodata->_NET_WM_NAME;
|
||||||
|
Atom WM_NAME = data->videodata->WM_NAME;
|
||||||
|
|
||||||
|
X11_XChangeProperty(display, data->xwindow, WM_NAME, UTF8_STRING, 8, 0, (const unsigned char *) title, strlen(title));
|
||||||
|
|
||||||
status = X11_XChangeProperty(display, data->xwindow, _NET_WM_NAME, UTF8_STRING, 8, 0, (const unsigned char *) title, strlen(title));
|
status = X11_XChangeProperty(display, data->xwindow, _NET_WM_NAME, UTF8_STRING, 8, 0, (const unsigned char *) title, strlen(title));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue