[Bf-blender-cvs] [d21eeff] master: Cleanup: used pre-defined atoms in ghost

Campbell Barton noreply at git.blender.org
Fri Jan 15 08:47:41 CET 2016


Commit: d21eeffbbf9090aec18ca1bf6b61f119dca771a0
Author: Campbell Barton
Date:   Fri Jan 15 18:39:40 2016 +1100
Branches: master
https://developer.blender.org/rBd21eeffbbf9090aec18ca1bf6b61f119dca771a0

Cleanup: used pre-defined atoms in ghost

===================================================================

M	intern/ghost/intern/GHOST_WindowX11.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 4b01f0d..7e59ec8 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;
 	}




More information about the Bf-blender-cvs mailing list