diff --git a/lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.cpp b/lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.cpp index c2240c4c6..c5a05370f 100644 --- a/lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.cpp +++ b/lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.cpp @@ -639,9 +639,7 @@ bool CIrrDeviceWayland::isWaylandDeviceWorking() CIrrDeviceWayland::CIrrDeviceWayland(const SIrrlichtCreationParameters& param) : CIrrDeviceStub(param), Width(param.WindowSize.Width), Height(param.WindowSize.Height), - WindowHasFocus(false), WindowMinimized(false), - UseXVidMode(false), UseXRandR(false), UseGLXWindow(false), - ExternalWindow(false), AutorepeatSupport(0) + WindowHasFocus(false), WindowMinimized(false) { #ifdef _DEBUG setDebugName("CIrrDeviceLinux"); @@ -769,6 +767,17 @@ void CIrrDeviceWayland::initEGL() EglContext->init(egl_params); video::useCoreContext = !EglContext->isLegacyDevice(); + + int w = 0; + int h = 0; + + if (EglContext->getSurfaceDimensions(&w, &h)) + { + Width = w; + Height = h; + CreationParams.WindowSize.Width = Width; + CreationParams.WindowSize.Height = Height; + } } bool CIrrDeviceWayland::createWindow() @@ -789,14 +798,18 @@ bool CIrrDeviceWayland::createWindow() { wl_shell_surface_set_toplevel(shell_surface); } - + wl_display_flush(display); - + initEGL(); - - CreationParams.WindowSize.Width = Width; - CreationParams.WindowSize.Height = Height; - + + wl_region* region = wl_compositor_create_region(compositor); + wl_region_add(region, 0, 0, Width, Height); + wl_surface_set_opaque_region(surface, region); + wl_region_destroy(region); + + wl_display_flush(display); + return true; } diff --git a/lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.h b/lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.h index 77a4ea6f1..3806e3975 100644 --- a/lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.h +++ b/lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.h @@ -301,17 +301,10 @@ namespace irr void updateCursor(); private: -// XVisualInfo* visual; mutable core::stringc Clipboard; - u32 Width, Height; bool WindowHasFocus; bool WindowMinimized; - bool UseXVidMode; - bool UseXRandR; - bool UseGLXWindow; - bool ExternalWindow; - int AutorepeatSupport; public: struct SKeyMap {