Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Don't set the hidden netwm state, that would mean we don't want to be…
Browse files Browse the repository at this point in the history
… shown, which is bad.
  • Loading branch information
slouken committed Sep 28, 2012
1 parent 42dab8c commit 07d3606
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/video/x11/SDL_x11window.c
Expand Up @@ -118,16 +118,21 @@ int
X11_GetWMStateProperty(_THIS, Uint32 flags, Atom atoms[5])
{
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
Atom _NET_WM_STATE_HIDDEN = videodata->_NET_WM_STATE_HIDDEN;
/*Atom _NET_WM_STATE_HIDDEN = videodata->_NET_WM_STATE_HIDDEN;*/
Atom _NET_WM_STATE_FOCUSED = videodata->_NET_WM_STATE_FOCUSED;
Atom _NET_WM_STATE_MAXIMIZED_VERT = videodata->_NET_WM_STATE_MAXIMIZED_VERT;
Atom _NET_WM_STATE_MAXIMIZED_HORZ = videodata->_NET_WM_STATE_MAXIMIZED_HORZ;
Atom _NET_WM_STATE_FULLSCREEN = videodata->_NET_WM_STATE_FULLSCREEN;
int count = 0;

/* The window manager sets this property, we shouldn't set it.
If we did, this would indicate to the window manager that we don't
actually want to be mapped during XMapRaised(), which would be bad.
*
if (flags & SDL_WINDOW_HIDDEN) {
atoms[count++] = _NET_WM_STATE_HIDDEN;
}
*/
if (flags & SDL_WINDOW_INPUT_FOCUS) {
atoms[count++] = _NET_WM_STATE_FOCUSED;
}
Expand Down Expand Up @@ -169,7 +174,7 @@ X11_GetNetWMState(_THIS, SDL_Window * window)

for (i = 0; i < numItems; ++i) {
if (atoms[i] == _NET_WM_STATE_HIDDEN) {
flags |= (SDL_WINDOW_HIDDEN|SDL_WINDOW_MINIMIZED);
flags |= SDL_WINDOW_HIDDEN;
} else if (atoms[i] == _NET_WM_STATE_FOCUSED) {
flags |= SDL_WINDOW_INPUT_FOCUS;
} else if (atoms[i] == _NET_WM_STATE_MAXIMIZED_VERT) {
Expand Down

0 comments on commit 07d3606

Please sign in to comment.