diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-19 14:40:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-19 14:40:27 +0400 |
commit | cbe43fd385b4023c98579bcc8608fe115512f065 (patch) | |
tree | ae63965f5a9324f7c6db518952a670278f9b3cf6 /intern | |
parent | f4609acedc79ed57af8a6a30917214a1176fc175 (diff) |
code cleanup: pass event by pointer to getClipboard_xcout
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemX11.cpp | 16 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemX11.h | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index d00265fbd9b..6a3b74cb977 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -1505,7 +1505,7 @@ convertXKey(KeySym key) #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 @@ void GHOST_SystemX11::getClipboard_xcout(XEvent evt, 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 @@ void GHOST_SystemX11::getClipboard_xcout(XEvent evt, * 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 @@ GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool selection) const 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) { diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h index 6a492f64b41..1f95e4b1ce2 100644 --- a/intern/ghost/intern/GHOST_SystemX11.h +++ b/intern/ghost/intern/GHOST_SystemX11.h @@ -238,7 +238,7 @@ public: #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; |