diff --git a/common/gal/opengl/antialiasing.cpp b/common/gal/opengl/antialiasing.cpp
index 7b55cee70c..049ac70b86 100644
--- a/common/gal/opengl/antialiasing.cpp
+++ b/common/gal/opengl/antialiasing.cpp
@@ -59,7 +59,7 @@ bool ANTIALIASING_NONE::Init()
 }
 
 
-VECTOR2U ANTIALIASING_NONE::GetInternalBufferSize()
+VECTOR2I ANTIALIASING_NONE::GetInternalBufferSize()
 {
     return compositor->GetScreenSize();
 }
@@ -158,7 +158,7 @@ bool ANTIALIASING_SUPERSAMPLING::Init()
 }
 
 
-VECTOR2U ANTIALIASING_SUPERSAMPLING::GetInternalBufferSize()
+VECTOR2I ANTIALIASING_SUPERSAMPLING::GetInternalBufferSize()
 {
     return compositor->GetScreenSize() * 2;
 }
@@ -221,7 +221,7 @@ ANTIALIASING_SMAA::ANTIALIASING_SMAA( OPENGL_COMPOSITOR* aCompositor ) :
 }
 
 
-VECTOR2U ANTIALIASING_SMAA::GetInternalBufferSize()
+VECTOR2I ANTIALIASING_SMAA::GetInternalBufferSize()
 {
     return compositor->GetScreenSize();
 }
diff --git a/common/gal/opengl/antialiasing.h b/common/gal/opengl/antialiasing.h
index 97821c5ceb..43fcafbaad 100644
--- a/common/gal/opengl/antialiasing.h
+++ b/common/gal/opengl/antialiasing.h
@@ -42,7 +42,7 @@ namespace KIGFX {
         virtual bool Init() = 0;
         virtual unsigned int CreateBuffer() = 0;
 
-        virtual VECTOR2U GetInternalBufferSize() = 0;
+        virtual VECTOR2I GetInternalBufferSize() = 0;
         virtual void OnLostBuffers() = 0;
 
         virtual void Begin() = 0;
@@ -59,7 +59,7 @@ namespace KIGFX {
         bool Init() override;
         unsigned int CreateBuffer() override;
 
-        VECTOR2U GetInternalBufferSize() override;
+        VECTOR2I GetInternalBufferSize() override;
         void OnLostBuffers() override;
 
         void Begin() override;
@@ -79,7 +79,7 @@ namespace KIGFX {
         bool Init() override;
         unsigned int CreateBuffer() override;
 
-        VECTOR2U GetInternalBufferSize() override;
+        VECTOR2I GetInternalBufferSize() override;
         void OnLostBuffers() override;
 
         void Begin() override;
@@ -103,7 +103,7 @@ namespace KIGFX {
         bool Init() override;
         unsigned int CreateBuffer () override;
 
-        VECTOR2U GetInternalBufferSize() override;
+        VECTOR2I GetInternalBufferSize() override;
         void OnLostBuffers() override;
 
         void Begin() override;
diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp
index 8610ca4a4a..ef6663e532 100644
--- a/common/gal/opengl/opengl_compositor.cpp
+++ b/common/gal/opengl/opengl_compositor.cpp
@@ -105,14 +105,13 @@ void OPENGL_COMPOSITOR::Initialize()
         break;
     }
 
-    VECTOR2U dims = m_antialiasing->GetInternalBufferSize();
+    VECTOR2I dims = m_antialiasing->GetInternalBufferSize();
     assert( dims.x != 0 && dims.y != 0 );
 
     GLint maxBufSize;
     glGetIntegerv( GL_MAX_RENDERBUFFER_SIZE_EXT, &maxBufSize );
 
-    // VECTOR2U is unsigned, so no need to check if < 0
-    if( dims.x > (unsigned) maxBufSize || dims.y >= (unsigned) maxBufSize )
+    if( dims.x < 0 || dims.y < 0 || dims.x > maxBufSize || dims.y >= maxBufSize )
         throw std::runtime_error( "Requested render buffer size is not supported" );
 
     // We need framebuffer objects for drawing the screen contents
@@ -161,7 +160,7 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer()
 }
 
 
-unsigned int OPENGL_COMPOSITOR::CreateBuffer( VECTOR2U aDimensions )
+unsigned int OPENGL_COMPOSITOR::CreateBuffer( VECTOR2I aDimensions )
 {
     assert( m_initialized );
 
@@ -303,9 +302,13 @@ void OPENGL_COMPOSITOR::ClearBuffer( const COLOR4D& aColor )
 }
 
 
-VECTOR2U OPENGL_COMPOSITOR::GetScreenSize() const
+VECTOR2I OPENGL_COMPOSITOR::GetScreenSize() const
 {
-    return { m_width, m_height };
+    typedef VECTOR2I::coord_type coord_t;
+    wxASSERT( m_width <= static_cast<unsigned int>( std::numeric_limits<coord_t>::max() ) );
+    wxASSERT( m_height <= static_cast<unsigned int>( std::numeric_limits<coord_t>::max() ) );
+
+    return { static_cast<coord_t>( m_width ), static_cast<coord_t>( m_height ) };
 }
 
 
diff --git a/include/gal/opengl/opengl_compositor.h b/include/gal/opengl/opengl_compositor.h
index 0d6ac7c342..459c740ed4 100644
--- a/include/gal/opengl/opengl_compositor.h
+++ b/include/gal/opengl/opengl_compositor.h
@@ -85,10 +85,10 @@ public:
     // Constant used by glBindFramebuffer to turn off rendering to framebuffers
     static const unsigned int DIRECT_RENDERING = 0;
 
-    VECTOR2U GetScreenSize() const;
+    VECTOR2I GetScreenSize() const;
     GLenum   GetBufferTexture( unsigned int aBufferHandle );
     void     DrawBuffer( unsigned int aSourceHandle, unsigned int aDestHandle );
-    unsigned int CreateBuffer( VECTOR2U aDimensions );
+    unsigned int CreateBuffer( VECTOR2I aDimensions );
 
     void SetAntialiasingMode( OPENGL_ANTIALIASING_MODE aMode ); // clears all buffers
     OPENGL_ANTIALIASING_MODE GetAntialiasingMode() const;
@@ -114,7 +114,7 @@ protected:
     // Buffers are simply textures storing a result of certain target rendering.
     struct OPENGL_BUFFER
     {
-        VECTOR2U dimensions;
+        VECTOR2I dimensions;
         GLuint textureTarget;                ///< Main texture handle
         GLuint attachmentPoint;              ///< Point to which an image from texture is attached
     };
diff --git a/libs/kimath/include/math/vector2d.h b/libs/kimath/include/math/vector2d.h
index 7ad7fc3d65..53ceb8261c 100644
--- a/libs/kimath/include/math/vector2d.h
+++ b/libs/kimath/include/math/vector2d.h
@@ -586,7 +586,6 @@ std::ostream& operator<<( std::ostream& aStream, const VECTOR2<T>& aVector )
 /* Default specializations */
 typedef VECTOR2<double>       VECTOR2D;
 typedef VECTOR2<int>          VECTOR2I;
-typedef VECTOR2<unsigned int> VECTOR2U;
 
 /* STL specializations */
 namespace std