Remove unneccessary waylandFlush() calls
This commit is contained in:
parent
b60462feb6
commit
64fa80f8b2
4 changed files with 5 additions and 9 deletions
|
@ -30,7 +30,6 @@ Bar::~Bar()
|
|||
{
|
||||
wl_surface_destroy(_surface);
|
||||
zwlr_layer_surface_v1_destroy(_layerSurface);
|
||||
waylandFlush();
|
||||
}
|
||||
|
||||
void Bar::layerSurfaceConfigure(uint32_t serial, uint32_t width, uint32_t height)
|
||||
|
@ -56,5 +55,4 @@ void Bar::render()
|
|||
wl_surface_attach(_surface, _bufs->buffer(), 0, 0);
|
||||
wl_surface_commit(_surface);
|
||||
_bufs->flip();
|
||||
waylandFlush();
|
||||
}
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#include <wayland-client.h>
|
||||
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
|
||||
|
||||
void waylandFlush();
|
||||
|
||||
extern wl_display *display;
|
||||
extern wl_compositor *compositor;
|
||||
extern wl_shm *shm;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "common.hpp"
|
||||
#include "bar.hpp"
|
||||
|
||||
static void waylandFlush();
|
||||
static void waylandWriteReady();
|
||||
static void requireGlobal(const void *p, const char *name);
|
||||
|
||||
|
@ -27,7 +28,6 @@ static xdg_wm_base *xdgWmBase;
|
|||
static const struct xdg_wm_base_listener xdgWmBaseListener = {
|
||||
[](void*, xdg_wm_base *sender, uint32_t serial) {
|
||||
xdg_wm_base_pong(sender, serial);
|
||||
waylandFlush();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,6 @@ static void onReady()
|
|||
requireGlobal(shm, "wl_shm");
|
||||
requireGlobal(wlrLayerShell, "zwlr_layer_shell_v1");
|
||||
std::ignore = new Bar(nullptr);
|
||||
waylandFlush();
|
||||
}
|
||||
|
||||
struct HandleGlobalHelper {
|
||||
|
@ -98,9 +97,11 @@ int main(int argc, char **argv)
|
|||
displayWriteNotifier = new QSocketNotifier(wl_display_get_fd(display), QSocketNotifier::Write);
|
||||
displayWriteNotifier->setEnabled(false);
|
||||
QObject::connect(displayWriteNotifier, &QSocketNotifier::activated, waylandWriteReady);
|
||||
waylandFlush();
|
||||
|
||||
return app.exec();
|
||||
while (true) {
|
||||
waylandFlush();
|
||||
app.processEvents(QEventLoop::WaitForMoreEvents);
|
||||
}
|
||||
}
|
||||
|
||||
void waylandFlush()
|
||||
|
|
|
@ -34,7 +34,6 @@ ShmBuffer::~ShmBuffer()
|
|||
for (auto i=0; i<n; i++) {
|
||||
wl_buffer_destroy(_buffers[i].buffer);
|
||||
}
|
||||
waylandFlush();
|
||||
}
|
||||
|
||||
uint8_t* ShmBuffer::data() const { return _buffers[_current].data; }
|
||||
|
|
Loading…
Reference in a new issue