X11Utils: Simplify the Fullscreen interface

Since we only use the toggle action, only keep that.
This commit is contained in:
Jasper St. Pierre
2014-08-06 22:16:28 -04:00
parent 09eb30ea3b
commit 2eacf229ed
3 changed files with 5 additions and 9 deletions

View File

@ -24,12 +24,8 @@ extern char **environ;
namespace X11Utils
{
void EWMH_Fullscreen(Display *dpy, int action)
void ToggleFullscreen(Display *dpy)
{
_assert_(action == _NET_WM_STATE_REMOVE ||
action == _NET_WM_STATE_ADD ||
action == _NET_WM_STATE_TOGGLE);
Window win = (Window)Core::GetWindowHandle();
// Init X event structure for _NET_WM_STATE_FULLSCREEN client message
@ -38,7 +34,7 @@ void EWMH_Fullscreen(Display *dpy, int action)
event.xclient.message_type = XInternAtom(dpy, "_NET_WM_STATE", False);
event.xclient.window = win;
event.xclient.format = 32;
event.xclient.data.l[0] = action;
event.xclient.data.l[0] = _NET_WM_STATE_TOGGLE;
event.xclient.data.l[1] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False);
// Send the event