mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 15:31:17 +01:00
X11Utils: Simplify the Fullscreen interface
Since we only use the toggle action, only keep that.
This commit is contained in:
parent
09eb30ea3b
commit
2eacf229ed
@ -168,7 +168,7 @@ class PlatformX11 : public Platform
|
||||
|
||||
if (fullscreen)
|
||||
{
|
||||
X11Utils::EWMH_Fullscreen(dpy, _NET_WM_STATE_TOGGLE);
|
||||
X11Utils::ToggleFullscreen(dpy);
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
XRRConfig->ToggleDisplayMode(True);
|
||||
#endif
|
||||
@ -204,7 +204,7 @@ class PlatformX11 : public Platform
|
||||
else if ((key == XK_Return) && (event.xkey.state & Mod1Mask))
|
||||
{
|
||||
fullscreen = !fullscreen;
|
||||
X11Utils::EWMH_Fullscreen(dpy, _NET_WM_STATE_TOGGLE);
|
||||
X11Utils::ToggleFullscreen(dpy);
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
XRRConfig->ToggleDisplayMode(fullscreen);
|
||||
#endif
|
||||
|
@ -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
|
||||
|
@ -34,7 +34,7 @@
|
||||
namespace X11Utils
|
||||
{
|
||||
|
||||
void EWMH_Fullscreen(Display *dpy, int action);
|
||||
void ToggleFullscreen(Display *dpy);
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
Window XWindowFromHandle(void *Handle);
|
||||
Display *XDisplayFromHandle(void *Handle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user