From f5d2e1f42cca1c5b078073133fccda63c556a0da Mon Sep 17 00:00:00 2001 From: hurikhan Date: Sun, 15 Feb 2015 18:26:49 +0800 Subject: [PATCH] Renamed EXPERIMENTAL_WM_API to NEW_WM_API --- core/bind/core_bind.cpp | 4 ++-- core/bind/core_bind.h | 2 +- core/os/os.h | 2 +- platform/x11/detect.py | 6 +++--- platform/x11/os_x11.cpp | 12 ++++++------ platform/x11/os_x11.h | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 39c5761d671..858f5cec272 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -176,7 +176,7 @@ bool _OS::is_video_mode_fullscreen(int p_screen) const { } -#ifdef EXPERIMENTAL_WM_API +#ifdef NEW_WM_API int _OS::get_screen_count() const { return OS::get_singleton()->get_screen_count(); } @@ -706,7 +706,7 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("is_video_mode_resizable","screen"),&_OS::is_video_mode_resizable,DEFVAL(0)); ObjectTypeDB::bind_method(_MD("get_fullscreen_mode_list","screen"),&_OS::get_fullscreen_mode_list,DEFVAL(0)); -#ifdef EXPERIMENTAL_WM_API +#ifdef NEW_WM_API ObjectTypeDB::bind_method(_MD("get_screen_count"),&_OS::get_screen_count); ObjectTypeDB::bind_method(_MD("get_screen"),&_OS::get_screen); ObjectTypeDB::bind_method(_MD("set_screen"),&_OS::set_screen); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index e77ed9e40f0..1a80e35221a 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -108,7 +108,7 @@ public: bool is_video_mode_resizable(int p_screen=0) const; Array get_fullscreen_mode_list(int p_screen=0) const; -#ifdef EXPERIMENTAL_WM_API +#ifdef NEW_WM_API virtual int get_screen_count() const; virtual int get_screen() const; virtual void set_screen(int p_screen); diff --git a/core/os/os.h b/core/os/os.h index c04a91e3029..6301bd495fd 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -150,7 +150,7 @@ public: virtual VideoMode get_video_mode(int p_screen=0) const=0; virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const=0; -#ifdef EXPERIMENTAL_WM_API +#ifdef NEW_WM_API virtual int get_screen_count() const=0; virtual int get_screen() const=0; virtual void set_screen(int p_screen)=0; diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 0601c59981b..2519dd6fdff 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -53,7 +53,7 @@ def get_opts(): ('use_llvm','Use llvm compiler','no'), ('use_sanitizer','Use llvm compiler sanitize address','no'), ('pulseaudio','Detect & Use pulseaudio','yes'), - ('experimental_wm_api', 'Use experimental window management API','no'), + ('new_wm_api', 'Use experimental window management API','no'), ] def get_flags(): @@ -153,7 +153,7 @@ def configure(env): env.Append( BUILDERS = { 'GLSL120GLES' : env.Builder(action = methods.build_gles2_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) #env.Append( BUILDERS = { 'HLSL9' : env.Builder(action = methods.build_hlsl_dx9_headers, suffix = 'hlsl.h',src_suffix = '.hlsl') } ) - if(env["experimental_wm_api"]=="yes"): - env.Append(CPPFLAGS=['-DEXPERIMENTAL_WM_API']) + if(env["new_wm_api"]=="yes"): + env.Append(CPPFLAGS=['-DNEW_WM_API']) env.ParseConfig('pkg-config xinerama --cflags --libs') diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 4c86f5a82fa..8def5645622 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -36,7 +36,7 @@ #include "servers/physics/physics_server_sw.h" #include "X11/Xutil.h" -#ifdef EXPERIMENTAL_WM_API +#ifdef NEW_WM_API #include "X11/Xatom.h" #include "X11/extensions/Xinerama.h" // ICCCM @@ -187,7 +187,7 @@ void OS_X11::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi visual_server =memnew(VisualServerWrapMT(visual_server,get_render_thread_mode()==RENDER_SEPARATE_THREAD)); } -#ifndef EXPERIMENTAL_WM_API +#ifndef NEW_WM_API // borderless fullscreen window mode if (current_videomode.fullscreen) { // needed for lxde/openbox, possibly others @@ -552,7 +552,7 @@ void OS_X11::get_fullscreen_mode_list(List *p_list,int p_screen) cons } -#ifdef EXPERIMENTAL_WM_API +#ifdef NEW_WM_API #if 0 // Just now not needed. Can be used for a possible OS.set_border(bool) method void OS_X11::set_wm_border(bool p_enabled) { @@ -1133,7 +1133,7 @@ void OS_X11::process_xevents() { case FocusIn: minimized = false; -#ifdef EXPERIMENTAL_WM_API +#ifdef NEW_WM_API if(current_videomode.fullscreen) { set_wm_fullscreen(true); visual_server->init(); @@ -1149,7 +1149,7 @@ void OS_X11::process_xevents() { break; case FocusOut: -#ifdef EXPERIMENTAL_WM_API +#ifdef NEW_WM_API if(current_videomode.fullscreen) { set_wm_fullscreen(false); set_minimized(true); @@ -1269,7 +1269,7 @@ void OS_X11::process_xevents() { Point2i rel = pos - last_mouse_pos; -#ifdef EXPERIMENTAL_WM_API +#ifdef NEW_WM_API if (mouse_mode==MOUSE_MODE_CAPTURED) { pos.x = current_videomode.width / 2; pos.y = current_videomode.height / 2; diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index 7518c935620..ffa1ce00b32 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -159,7 +159,7 @@ class OS_X11 : public OS_Unix { int joystick_count; Joystick joysticks[JOYSTICKS_MAX]; -#ifdef EXPERIMENTAL_WM_API +#ifdef NEW_WM_API unsigned int capture_idle; bool maximized; //void set_wm_border(bool p_enabled); @@ -220,7 +220,7 @@ public: virtual VideoMode get_video_mode(int p_screen=0) const; virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const; -#ifdef EXPERIMENTAL_WM_API +#ifdef NEW_WM_API virtual int get_screen_count() const; virtual int get_screen() const; virtual void set_screen(int p_screen);