diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-07-20 02:10:11 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-07-20 02:10:11 +0400 |
commit | 103ef7cacb5dd10aa2dfd5bb973c0dfd772885eb (patch) | |
tree | 8fd9a6b770998717f4555e7121fb16116b441865 /intern/ghost/intern | |
parent | eb21bdd249427465a093a078cda7864309a8f735 (diff) | |
parent | 869d654cccba8b9b0bc295e7ce89e8e322912023 (diff) |
Merged changes from trunk r58324-58419.ge_dev
Diffstat (limited to 'intern/ghost/intern')
-rw-r--r-- | intern/ghost/intern/GHOST_DropTargetX11.cpp | 2 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCarbon.cpp | 3 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemX11.cpp | 19 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemX11.h | 2 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 3 |
5 files changed, 16 insertions, 13 deletions
diff --git a/intern/ghost/intern/GHOST_DropTargetX11.cpp b/intern/ghost/intern/GHOST_DropTargetX11.cpp index df500122449..639fd503759 100644 --- a/intern/ghost/intern/GHOST_DropTargetX11.cpp +++ b/intern/ghost/intern/GHOST_DropTargetX11.cpp @@ -191,7 +191,7 @@ void GHOST_DropTargetX11::UrlDecode(char *decodedOut, int bufferSize, const char char *GHOST_DropTargetX11::FileUrlDecode(char *fileUrl) { - if (!strncpy(fileUrl, "file://", 7) == 0) { + if (strncpy(fileUrl, "file://", 7) != 0) { /* assume one character of encoded URL can be expanded to 4 chars max */ int decodedSize = 4 * strlen(fileUrl) + 1; char *decodedPath = (char *)malloc(decodedSize); diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp index f7e035e890d..6e72e26beb4 100644 --- a/intern/ghost/intern/GHOST_SystemCarbon.cpp +++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp @@ -858,7 +858,8 @@ OSStatus GHOST_SystemCarbon::handleMouseEvent(EventRef event) break; case kEventMouseMoved: - case kEventMouseDragged: { + case kEventMouseDragged: + { Point mousePos; if (window) { diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index d00265fbd9b..2e39ee812ca 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -1139,7 +1139,8 @@ GHOST_SystemX11::processEvent(XEvent *xe) break; } - default: { + default: + { #ifdef WITH_X11_XINPUT if (xe->type == m_xtablet.MotionEvent) { XDeviceMotionEvent *data = (XDeviceMotionEvent *)xe; @@ -1505,7 +1506,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 +1536,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 +1605,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 +1714,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; diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 472136b8130..de2ae79d0b6 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -1032,7 +1032,8 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state) [m_window zoom:nil]; break; - case GHOST_kWindowStateFullScreen: { + case GHOST_kWindowStateFullScreen: + { #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 NSUInteger masks = [m_window styleMask]; |