[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58387] trunk/blender/intern/ghost/intern: code cleanup: pass event by pointer to getClipboard_xcout

Campbell Barton ideasman42 at gmail.com
Fri Jul 19 12:40:28 CEST 2013


Revision: 58387
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58387
Author:   campbellbarton
Date:     2013-07-19 10:40:27 +0000 (Fri, 19 Jul 2013)
Log Message:
-----------
code cleanup: pass event by pointer to getClipboard_xcout

Modified Paths:
--------------
    trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp
    trunk/blender/intern/ghost/intern/GHOST_SystemX11.h

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp	2013-07-19 10:40:20 UTC (rev 58386)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp	2013-07-19 10:40:27 UTC (rev 58387)
@@ -1505,7 +1505,7 @@
 #define XCLIB_XCOUT_FALLBACK_TEXT   6
 
 /* Retrieves the contents of a selections. */
-void GHOST_SystemX11::getClipboard_xcout(XEvent evt,
+void GHOST_SystemX11::getClipboard_xcout(const XEvent *evt,
 		Atom sel, Atom target, unsigned char **txt,
 		unsigned long *len, unsigned int *context) const
 {
@@ -1535,18 +1535,18 @@
 			return;
 
 		case XCLIB_XCOUT_SENTCONVSEL:
-			if (evt.type != SelectionNotify)
+			if (evt->type != SelectionNotify)
 				return;
 
-			if (target == m_atom.UTF8_STRING && evt.xselection.property == None) {
+			if (target == m_atom.UTF8_STRING && evt->xselection.property == None) {
 				*context = XCLIB_XCOUT_FALLBACK_UTF8;
 				return;
 			}
-			else if (target == m_atom.COMPOUND_TEXT && evt.xselection.property == None) {
+			else if (target == m_atom.COMPOUND_TEXT && evt->xselection.property == None) {
 				*context = XCLIB_XCOUT_FALLBACK_COMP;
 				return;
 			}
-			else if (target == m_atom.TEXT && evt.xselection.property == None) {
+			else if (target == m_atom.TEXT && evt->xselection.property == None) {
 				*context = XCLIB_XCOUT_FALLBACK_TEXT;
 				return;
 			}
@@ -1604,11 +1604,11 @@
 			 * then read it, delete it, etc. */
 
 			/* make sure that the event is relevant */
-			if (evt.type != PropertyNotify)
+			if (evt->type != PropertyNotify)
 				return;
 
 			/* skip unless the property has a new value */
-			if (evt.xproperty.state != PropertyNewValue)
+			if (evt->xproperty.state != PropertyNewValue)
 				return;
 
 			/* check size and format of the property */
@@ -1713,7 +1713,7 @@
 			XNextEvent(m_display, &evt);
 
 		/* fetch the selection, or part of it */
-		getClipboard_xcout(evt, sseln, target, &sel_buf, &sel_len, &context);
+		getClipboard_xcout(&evt, sseln, target, &sel_buf, &sel_len, &context);
 
 		/* fallback is needed. set XA_STRING to target and restart the loop. */
 		if (context == XCLIB_XCOUT_FALLBACK) {

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemX11.h
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemX11.h	2013-07-19 10:40:20 UTC (rev 58386)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemX11.h	2013-07-19 10:40:27 UTC (rev 58387)
@@ -238,7 +238,7 @@
 #endif
 
 	/* Helped function for get data from the clipboard. */
-	void getClipboard_xcout(XEvent evt, Atom sel, Atom target,
+	void getClipboard_xcout(const XEvent *evt, Atom sel, Atom target,
 	                        unsigned char **txt, unsigned long *len,
 	                        unsigned int *context) const;
 




More information about the Bf-blender-cvs mailing list