client: use wl_shm.release if available
Change-Id: Ica8a210e988604346cba36b69658bc83fbf21179 Reviewed-by: David Redondo <qt@david-redondo.de>
This commit is contained in:
parent
1dfa712eb5
commit
e00905d943
@ -10,13 +10,17 @@ QT_BEGIN_NAMESPACE
|
||||
namespace QtWaylandClient {
|
||||
|
||||
QWaylandShm::QWaylandShm(QWaylandDisplay *display, int version, uint32_t id)
|
||||
: QtWayland::wl_shm(display->wl_registry(), id, qMin(version, 1))
|
||||
: QtWayland::wl_shm(display->wl_registry(), id, qMin(version, 2))
|
||||
{
|
||||
}
|
||||
|
||||
QWaylandShm::~QWaylandShm()
|
||||
{
|
||||
wl_shm_destroy(object());
|
||||
if (version() < WL_SHM_RELEASE_SINCE_VERSION) {
|
||||
wl_shm_destroy(object());
|
||||
} else {
|
||||
wl_shm_release(object());
|
||||
}
|
||||
}
|
||||
|
||||
void QWaylandShm::shm_format(uint32_t format)
|
||||
|
Loading…
x
Reference in New Issue
Block a user