From d21eeffbbf9090aec18ca1bf6b61f119dca771a0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 15 Jan 2016 18:39:40 +1100 Subject: Cleanup: used pre-defined atoms in ghost --- intern/ghost/intern/GHOST_WindowX11.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'intern/ghost') diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index 4b01f0dd39f..7e59ec82755 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -355,22 +355,17 @@ GHOST_WindowX11(GHOST_SystemX11 *system, #endif if (state == GHOST_kWindowStateMaximized || state == GHOST_kWindowStateFullScreen) { - Atom _NET_WM_STATE = XInternAtom(m_display, "_NET_WM_STATE", False); - Atom _NET_WM_STATE_MAXIMIZED_VERT = XInternAtom(m_display, "_NET_WM_STATE_MAXIMIZED_VERT", False); - Atom _NET_WM_STATE_MAXIMIZED_HORZ = XInternAtom(m_display, "_NET_WM_STATE_MAXIMIZED_HORZ", False); - Atom _NET_WM_STATE_FULLSCREEN = XInternAtom(m_display, "_NET_WM_STATE_FULLSCREEN", False); Atom atoms[2]; int count = 0; - if (state == GHOST_kWindowStateMaximized) { - atoms[count++] = _NET_WM_STATE_MAXIMIZED_VERT; - atoms[count++] = _NET_WM_STATE_MAXIMIZED_HORZ; + atoms[count++] = m_system->m_atom._NET_WM_STATE_MAXIMIZED_VERT; + atoms[count++] = m_system->m_atom._NET_WM_STATE_MAXIMIZED_HORZ; } else { - atoms[count++] = _NET_WM_STATE_FULLSCREEN; + atoms[count++] = m_system->m_atom._NET_WM_STATE_FULLSCREEN; } - XChangeProperty(m_display, m_window, _NET_WM_STATE, XA_ATOM, 32, + XChangeProperty(m_display, m_window, m_system->m_atom._NET_WM_STATE, XA_ATOM, 32, PropModeReplace, (unsigned char *)atoms, count); m_post_init = False; } -- cgit v1.2.3