File vstgui.patch of Package vst3-Uhhyou-Plugins

Submodule lib/vst3sdk contains modified content
Submodule vstgui4 contains modified content
diff --git a/lib/vst3sdk/vstgui4/vstgui/lib/platform/linux/cairographicscontext.cpp b/lib/vst3sdk/vstgui4/vstgui/lib/platform/linux/cairographicscontext.cpp
index d7d7a7c4..4cdcc638 100644
--- a/lib/vst3sdk/vstgui4/vstgui/lib/platform/linux/cairographicscontext.cpp
+++ b/lib/vst3sdk/vstgui4/vstgui/lib/platform/linux/cairographicscontext.cpp
@@ -46,16 +46,14 @@ struct CairoGraphicsDeviceFactory::Impl
 };
 
 //-----------------------------------------------------------------------------
-CairoGraphicsDeviceFactory::CairoGraphicsDeviceFactory ()
-{
-	impl = std::make_unique<Impl> ();
-}
+CairoGraphicsDeviceFactory::CairoGraphicsDeviceFactory () { impl = std::make_unique<Impl> (); }
 
 //-----------------------------------------------------------------------------
 CairoGraphicsDeviceFactory::~CairoGraphicsDeviceFactory () noexcept = default;
 
 //-----------------------------------------------------------------------------
-PlatformGraphicsDevicePtr CairoGraphicsDeviceFactory::getDeviceForScreen (ScreenInfo::Identifier screen) const
+PlatformGraphicsDevicePtr
+	CairoGraphicsDeviceFactory::getDeviceForScreen (ScreenInfo::Identifier screen) const
 {
 	if (impl->devices.empty ())
 	{
@@ -421,15 +419,11 @@ bool CairoGraphicsDeviceContext::drawPolygon (const PointList& polygonPointList,
 	vstgui_assert (polygonPointList.empty () == false);
 	impl->doInContext ([&] () {
 		bool doPixelAlign = impl->state.drawMode.integralMode ();
-		auto last = polygonPointList.back ();
-		if (doPixelAlign)
-			last = pixelAlign (impl->state.tm, last);
-		cairo_move_to (impl->context, last.x, last.y);
-		for (auto p : polygonPointList)
+		auto first = polygonPointList.front ();
+		cairo_move_to (impl->context, first.x, first.y);
+		for (auto p = polygonPointList.begin () + 1; p != polygonPointList.end (); ++p)
 		{
-			if (doPixelAlign)
-				p = pixelAlign (impl->state.tm, p);
-			cairo_line_to (impl->context, p.x, p.y);
+			cairo_line_to (impl->context, (*p).x, (*p).y);
 		}
 		impl->draw (drawStyle);
 	});
@@ -468,10 +462,12 @@ bool CairoGraphicsDeviceContext::drawArc (CRect rect, double startAngle1, double
 										  PlatformGraphicsDrawStyle drawStyle) const
 {
 	impl->doInContext ([&] () {
+		cairo_save (impl->context);
 		CPoint center = rect.getCenter ();
 		cairo_translate (impl->context, center.x, center.y);
-		cairo_scale (impl->context, 2.0 / rect.getWidth (), 2.0 / rect.getHeight ());
-		cairo_arc (impl->context, 0, 0, 1, startAngle1, endAngle2);
+		cairo_scale (impl->context, rect.getWidth () / 2.0, rect.getHeight () / 2.0);
+		cairo_arc (impl->context, 0, 0, 1, startAngle1 / 180.0 * M_PI, endAngle2 / 180.0 * M_PI);
+		cairo_restore (impl->context);
 		impl->draw (drawStyle);
 	});
 	return true;
@@ -483,7 +479,7 @@ bool CairoGraphicsDeviceContext::drawEllipse (CRect rect, PlatformGraphicsDrawSt
 	impl->doInContext ([&] () {
 		CPoint center = rect.getCenter ();
 		cairo_translate (impl->context, center.x, center.y);
-		cairo_scale (impl->context, 2.0 / rect.getWidth (), 2.0 / rect.getHeight ());
+		cairo_scale (impl->context, rect.getWidth () / 2.0, rect.getHeight () / 2.0);
 		cairo_arc (impl->context, 0, 0, 1, 0, 2 * M_PI);
 		impl->draw (drawStyle);
 	});
diff --git a/lib/vst3sdk/vstgui4/vstgui/lib/platform/linux/x11utils.h b/lib/vst3sdk/vstgui4/vstgui/lib/platform/linux/x11utils.h
index 6fd8e3c3..3c7940e4 100644
--- a/lib/vst3sdk/vstgui4/vstgui/lib/platform/linux/x11utils.h
+++ b/lib/vst3sdk/vstgui4/vstgui/lib/platform/linux/x11utils.h
@@ -58,7 +58,7 @@ private:
 struct XEmbedInfo
 {
 	uint32_t version{1};
-	uint32_t flags{0};
+	uint32_t flags{1};
 };
 
 //------------------------------------------------------------------------
openSUSE Build Service is sponsored by