diff options
| author | Darksome <dev@darkso.me> | 2022-07-15 19:42:03 +0300 |
|---|---|---|
| committer | Darksome <dev@darkso.me> | 2022-07-15 19:42:03 +0300 |
| commit | 5388b54442614cb0d3d445f101e7cd86bf64c125 (patch) | |
| tree | 26057ff185e423e944e8b250ed7fe26654b69623 /src/hyprerror/HyprError.cpp | |
| parent | cb8a6f881b11e9a269fd5f7aa64eafe2beda0b0d (diff) | |
| parent | 6306d4dae3fa221a6099e109c7faef60bac4fac5 (diff) | |
Merge upstream
Diffstat (limited to 'src/hyprerror/HyprError.cpp')
| -rw-r--r-- | src/hyprerror/HyprError.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/hyprerror/HyprError.cpp b/src/hyprerror/HyprError.cpp index 7255aae9..ea8d65d0 100644 --- a/src/hyprerror/HyprError.cpp +++ b/src/hyprerror/HyprError.cpp @@ -14,7 +14,7 @@ void CHyprError::createQueued() { const auto PMONITOR = g_pCompositor->m_vMonitors.front().get(); - const auto CAIROSURFACE = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, PMONITOR->vecSize.x, PMONITOR->vecSize.y); + const auto CAIROSURFACE = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y); const auto CAIRO = cairo_create(CAIROSURFACE); @@ -27,12 +27,12 @@ void CHyprError::createQueued() { const auto LINECOUNT = 1 + std::count(m_szQueued.begin(), m_szQueued.end(), '\n'); cairo_set_source_rgba(CAIRO, m_cQueued.r / 255.f, m_cQueued.g / 255.f, m_cQueued.b / 255.f, m_cQueued.a / 255.f); - cairo_rectangle(CAIRO, 0, 0, PMONITOR->vecSize.x, 10 * LINECOUNT); + cairo_rectangle(CAIRO, 0, 0, PMONITOR->vecPixelSize.x, 10 * LINECOUNT); // outline - cairo_rectangle(CAIRO, 0, 0, 1, PMONITOR->vecSize.y); // left - cairo_rectangle(CAIRO, PMONITOR->vecSize.x - 1, 0, PMONITOR->vecSize.x, PMONITOR->vecSize.y); // right - cairo_rectangle(CAIRO, 0, PMONITOR->vecSize.y - 1, PMONITOR->vecSize.x, PMONITOR->vecSize.y); // bottom + cairo_rectangle(CAIRO, 0, 0, 1, PMONITOR->vecPixelSize.y); // left + cairo_rectangle(CAIRO, PMONITOR->vecPixelSize.x - 1, 0, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y); // right + cairo_rectangle(CAIRO, 0, PMONITOR->vecPixelSize.y - 1, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y); // bottom cairo_fill(CAIRO); @@ -70,7 +70,7 @@ void CHyprError::createQueued() { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_RED); #endif - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, PMONITOR->vecSize.x, PMONITOR->vecSize.y, 0, GL_RGBA, GL_UNSIGNED_BYTE, DATA); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y, 0, GL_RGBA, GL_UNSIGNED_BYTE, DATA); // delete cairo cairo_destroy(CAIRO); @@ -104,7 +104,7 @@ void CHyprError::draw() { if (g_pHyprOpenGL->m_RenderData.pMonitor != PMONITOR) return; // wrong mon - wlr_box windowBox = {0, 0, PMONITOR->vecSize.x, PMONITOR->vecSize.y}; + wlr_box windowBox = {0, 0, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y}; g_pHyprOpenGL->renderTexture(m_tTexture, &windowBox, 255.f, 0); } |
