mirror of
https://github.com/hyprwm/hyprpicker.git
synced 2024-12-22 22:29:49 +01:00
don't flush display after disconnect
This commit is contained in:
parent
fe4535a273
commit
7ae1d1dabd
2 changed files with 9 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
#include "LayerSurface.hpp"
|
#include "LayerSurface.hpp"
|
||||||
|
|
||||||
#include "../hyprpicker.hpp"
|
|
||||||
#include "../events/Events.hpp"
|
#include "../events/Events.hpp"
|
||||||
|
#include "../hyprpicker.hpp"
|
||||||
|
|
||||||
CLayerSurface::CLayerSurface(SMonitor* pMonitor) {
|
CLayerSurface::CLayerSurface(SMonitor* pMonitor) {
|
||||||
m_pMonitor = pMonitor;
|
m_pMonitor = pMonitor;
|
||||||
|
@ -36,5 +36,6 @@ CLayerSurface::~CLayerSurface() {
|
||||||
wl_surface_destroy(pSurface);
|
wl_surface_destroy(pSurface);
|
||||||
zwlr_layer_surface_v1_destroy(pLayerSurface);
|
zwlr_layer_surface_v1_destroy(pLayerSurface);
|
||||||
|
|
||||||
wl_display_flush(g_pHyprpicker->m_pWLDisplay);
|
if (g_pHyprpicker->m_pWLDisplay)
|
||||||
|
wl_display_flush(g_pHyprpicker->m_pWLDisplay);
|
||||||
}
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
#include "hyprpicker.hpp"
|
#include "hyprpicker.hpp"
|
||||||
|
|
||||||
#include "events/Events.hpp"
|
#include "events/Events.hpp"
|
||||||
|
|
||||||
void CHyprpicker::init() {
|
void CHyprpicker::init() {
|
||||||
|
@ -33,6 +34,9 @@ void CHyprpicker::init() {
|
||||||
while (m_bRunning && wl_display_dispatch(m_pWLDisplay) != -1) {
|
while (m_bRunning && wl_display_dispatch(m_pWLDisplay) != -1) {
|
||||||
//renderSurface(m_pLastSurface);
|
//renderSurface(m_pLastSurface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wl_display_disconnect(m_pWLDisplay);
|
||||||
|
m_pWLDisplay = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHyprpicker::finish(int code) {
|
void CHyprpicker::finish(int code) {
|
||||||
|
@ -210,12 +214,11 @@ void CHyprpicker::convertBuffer(SPoolBuffer* pBuffer) {
|
||||||
std::swap(px->red, px->blue);
|
std::swap(px->red, px->blue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} break;
|
||||||
break;
|
|
||||||
default: {
|
default: {
|
||||||
Debug::log(CRIT, "Unsupported format %i", pBuffer->format);
|
Debug::log(CRIT, "Unsupported format %i", pBuffer->format);
|
||||||
}
|
}
|
||||||
g_pHyprpicker->finish(1);
|
g_pHyprpicker->finish(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,7 +274,6 @@ void CHyprpicker::renderSurface(CLayerSurface* pSurface, bool forceInactive) {
|
||||||
// | --------- |
|
// | --------- |
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
cairo_restore(PCAIRO);
|
cairo_restore(PCAIRO);
|
||||||
cairo_save(PCAIRO);
|
cairo_save(PCAIRO);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue