diff options
Diffstat (limited to 'platform')
| -rw-r--r-- | platform/ios/export/export_plugin.cpp | 6 | ||||
| -rw-r--r-- | platform/linuxbsd/detect.py | 11 | ||||
| -rw-r--r-- | platform/linuxbsd/x11/display_server_x11.cpp | 19 | 
3 files changed, 18 insertions, 18 deletions
diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp index ccd3480d11..87b599bc81 100644 --- a/platform/ios/export/export_plugin.cpp +++ b/platform/ios/export/export_plugin.cpp @@ -1572,7 +1572,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p  	int ret = unzGoToFirstFile(src_pkg_zip);  	Vector<uint8_t> project_file_data;  	while (ret == UNZ_OK) { -#if defined(MACOS_ENABLED) || defined(X11_ENABLED) +#if defined(MACOS_ENABLED) || defined(LINUXBSD_ENABLED)  		bool is_execute = false;  #endif @@ -1605,7 +1605,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p  				continue; //ignore!  			}  			found_library = true; -#if defined(MACOS_ENABLED) || defined(X11_ENABLED) +#if defined(MACOS_ENABLED) || defined(LINUXBSD_ENABLED)  			is_execute = true;  #endif  			file = file.replace(library_to_use, binary_name + ".xcframework"); @@ -1648,7 +1648,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p  				f->store_buffer(data.ptr(), data.size());  			} -#if defined(MACOS_ENABLED) || defined(X11_ENABLED) +#if defined(MACOS_ENABLED) || defined(LINUXBSD_ENABLED)  			if (is_execute) {  				// we need execute rights on this file  				chmod(file.utf8().get_data(), 0755); diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py index 747dcbd76c..f4d36f1a87 100644 --- a/platform/linuxbsd/detect.py +++ b/platform/linuxbsd/detect.py @@ -338,12 +338,17 @@ def configure(env: "Environment"):      env.Prepend(CPPPATH=["#platform/linuxbsd"]) +    env.Append( +        CPPDEFINES=[ +            "LINUXBSD_ENABLED", +            "UNIX_ENABLED", +            ("_FILE_OFFSET_BITS", 64), +        ] +    ) +      if env["x11"]:          env.Append(CPPDEFINES=["X11_ENABLED"]) -    env.Append(CPPDEFINES=["UNIX_ENABLED"]) -    env.Append(CPPDEFINES=[("_FILE_OFFSET_BITS", 64)]) -      if env["vulkan"]:          env.Append(CPPDEFINES=["VULKAN_ENABLED"])          if not env["use_volk"]: diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp index a2c34bb874..2cb00728c8 100644 --- a/platform/linuxbsd/x11/display_server_x11.cpp +++ b/platform/linuxbsd/x11/display_server_x11.cpp @@ -1432,28 +1432,23 @@ void DisplayServerX11::_update_window_mouse_passthrough(WindowID p_window) {  	int event_base, error_base;  	const Bool ext_okay = XShapeQueryExtension(x11_display, &event_base, &error_base);  	if (ext_okay) { -		Region region;  		if (windows[p_window].mpass) { -			region = XCreateRegion(); +			Region region = XCreateRegion(); +			XShapeCombineRegion(x11_display, windows[p_window].x11_window, ShapeInput, 0, 0, region, ShapeSet); +			XDestroyRegion(region);  		} else if (region_path.size() == 0) { -			region = XCreateRegion(); -			XRectangle rect; -			rect.x = 0; -			rect.y = 0; -			rect.width = window_get_size_with_decorations(p_window).x; -			rect.height = window_get_size_with_decorations(p_window).y; -			XUnionRectWithRegion(&rect, region, region); +			XShapeCombineMask(x11_display, windows[p_window].x11_window, ShapeInput, 0, 0, None, ShapeSet);  		} else {  			XPoint *points = (XPoint *)memalloc(sizeof(XPoint) * region_path.size());  			for (int i = 0; i < region_path.size(); i++) {  				points[i].x = region_path[i].x;  				points[i].y = region_path[i].y;  			} -			region = XPolygonRegion(points, region_path.size(), EvenOddRule); +			Region region = XPolygonRegion(points, region_path.size(), EvenOddRule);  			memfree(points); +			XShapeCombineRegion(x11_display, windows[p_window].x11_window, ShapeInput, 0, 0, region, ShapeSet); +			XDestroyRegion(region);  		} -		XShapeCombineRegion(x11_display, windows[p_window].x11_window, ShapeInput, 0, 0, region, ShapeSet); -		XDestroyRegion(region);  	}  }  |