Remove ifdefs for unsupported libwayland versions

The ifdefs were for version 1.2.0.

Change-Id: Ie58745c7cf4c0fba45bc5203d24e9913d3a8b8ce
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Johan Klokkhammer Helsing 2018-09-14 15:20:03 +02:00 committed by Johan Helsing
parent d95ba68c14
commit 014ea9cdc4
2 changed files with 0 additions and 10 deletions

View File

@ -772,9 +772,6 @@ bool Scanner::process()
printf(" that->m_resource_map.remove(resource->client(), resource);\n");
printf(" that->%s_destroy_resource(resource);\n", interfaceNameStripped);
printf(" delete resource;\n");
printf("#if !WAYLAND_VERSION_CHECK(1, 2, 0)\n");
printf(" free(client_resource);\n");
printf("#endif\n");
printf(" }\n");
printf("\n");

View File

@ -161,14 +161,7 @@ void Surface::surface_commit(Resource *resource)
Q_UNUSED(resource);
if (m_buffer) {
#if WAYLAND_VERSION_CHECK(1, 2, 0)
struct ::wl_shm_buffer *shm_buffer = wl_shm_buffer_get(m_buffer);
#else
struct ::wl_buffer *shm_buffer = 0;
if (wl_buffer_is_shm(static_cast<struct ::wl_buffer*>(m_buffer->data)))
shm_buffer = static_cast<struct ::wl_buffer*>(m_buffer->data);
#endif
if (shm_buffer) {
int stride = wl_shm_buffer_get_stride(shm_buffer);
uint format = wl_shm_buffer_get_format(shm_buffer);