From 8baa00a6e4b60eaef78fcfd34fe72725fd8ca060 Mon Sep 17 00:00:00 2001 From: sambler Date: Tue, 27 Jan 2015 20:40:17 +1030 Subject: Adjust x11/detect.py Test if clang is defined in CC/CXX/LD - this allows a specific version of clang to be defined move appending -DTYPED_METHOD_BIND to keep clang options together move sanitize option out of use_llvm test, gcc48+ also supports sanitize=address --- platform/x11/detect.py | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'platform/x11') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 5171bc972d..fb5cdb5089 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -70,24 +70,23 @@ def configure(env): else: env["bits"]="32" - env.Append(CPPPATH=['#platform/x11']) if (env["use_llvm"]=="yes"): - env["CC"]="clang" - env["CXX"]="clang++" - env["LD"]="clang++" - if (env["use_sanitizer"]=="yes"): - env.Append(CXXFLAGS=['-fsanitize=address','-fno-omit-frame-pointer']) - env.Append(LINKFLAGS=['-fsanitize=address']) - env.extra_suffix=".llvms" - else: - env.extra_suffix=".llvm" + if 'clang++' not in env['CXX']: + env["CC"]="clang" + env["CXX"]="clang++" + env["LD"]="clang++" + env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND']) + env.extra_suffix=".llvm" + if (env["colored"]=="yes"): if sys.stdout.isatty(): env.Append(CXXFLAGS=["-fcolor-diagnostics"]) - - + if (env["use_sanitizer"]=="yes"): + env.Append(CXXFLAGS=['-fsanitize=address','-fno-omit-frame-pointer']) + env.Append(LINKFLAGS=['-fsanitize=address']) + env.extra_suffix+="s" #if (env["tools"]=="no"): # #no tools suffix @@ -141,11 +140,6 @@ def configure(env): env.Append(LINKFLAGS=['-m64','-L/usr/lib/i686-linux-gnu']) - if (env["CXX"]=="clang++"): - env.Append(CPPFLAGS=['-DTYPED_METHOD_BIND']) - env["CC"]="clang" - env["LD"]="clang++" - import methods env.Append( BUILDERS = { 'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) -- cgit v1.2.3 From d2f86cc09bf4136ebc1c2bbb8ec7b48a439c0371 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 14 Feb 2015 19:22:06 -0300 Subject: fixes to mouse warp -can warp now from viewport and control, in their respective coordinate systems -warp is now local to the window on Windows and OSX. IF YOU RUN OSX, PLEASE TEST THIS! And make sure it works!, new code is in OS_OSX::warp_mouse_pos. I don't have OSX so i can't test! --- platform/x11/os_x11.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'platform/x11') diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index a40af8d2a9..ac1818d200 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -479,8 +479,12 @@ void OS_X11::warp_mouse_pos(const Point2& p_to) { last_mouse_pos=p_to; } else { + /*XWindowAttributes xwa; + XGetWindowAttributes(x11_display, x11_window, &xwa); + printf("%d %d\n", xwa.x, xwa.y); needed? */ + XWarpPointer(x11_display, None, x11_window, - 0,0,0,0, (int)p_to.x, (int)p_to.y); + 0,0,0,0, (int)p_to.x , (int)p_to.y); } } -- cgit v1.2.3