Commit b3f4e117 authored by w4t's avatar w4t

clipboard fixes

parent 52fa14d3
...@@ -71,7 +71,9 @@ namespace ofxImGui ...@@ -71,7 +71,9 @@ namespace ofxImGui
//-------------------------------------------------------------- //--------------------------------------------------------------
const char* BaseEngine::getClipboardString(void * userData) const char* BaseEngine::getClipboardString(void * userData)
{ {
return &ofGetWindowPtr()->getClipboardString()[0]; static std::string clip;
clip = ofGetWindowPtr()->getClipboardString();
return clip.c_str();
} }
//-------------------------------------------------------------- //--------------------------------------------------------------
......
...@@ -166,6 +166,10 @@ namespace ofxImGui ...@@ -166,6 +166,10 @@ namespace ofxImGui
if (button >= 0 && button < 5) if (button >= 0 && button < 5)
{ {
remapToGLFWConvention(button); remapToGLFWConvention(button);
//prevent ctrl + left click from becoming a right click on osx!
if(button == 1 && ( ofGetKeyPressed(OF_KEY_CONTROL) || ofGetKeyPressed(OF_KEY_RIGHT_CONTROL))){
button = 0;
}
mousePressed[button] = true; mousePressed[button] = true;
} }
} }
...@@ -177,6 +181,10 @@ namespace ofxImGui ...@@ -177,6 +181,10 @@ namespace ofxImGui
if (button >= 0 && button < 5) if (button >= 0 && button < 5)
{ {
remapToGLFWConvention(button); remapToGLFWConvention(button);
//prevent ctrl + left click from becoming a right click on osx!
if(button == 1 && ( ofGetKeyPressed(OF_KEY_CONTROL) || ofGetKeyPressed(OF_KEY_RIGHT_CONTROL))){
button = 0;
}
mousePressed[button] = false; mousePressed[button] = false;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment