Fix crash when starting clients
Don't send wl_surface::set_input_region requests before the wl_surface has been initialized. The shapedclock example used to crash in wl_proxy_marshal prior to this fix. Task-number: QTBUG-57757 Change-Id: I0a459d374bfb88fb22d048eda3722a41112d67a4 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
parent
7a116ac3f0
commit
18d0f87b87
@ -350,8 +350,11 @@ void QWaylandWindow::setMask(const QRegion &mask)
|
||||
|
||||
mMask = mask;
|
||||
|
||||
if (!isInitialized())
|
||||
return;
|
||||
|
||||
if (mMask.isEmpty()) {
|
||||
set_input_region(0);
|
||||
set_input_region(nullptr);
|
||||
} else {
|
||||
struct ::wl_region *region = mDisplay->createRegion(mMask);
|
||||
set_input_region(region);
|
||||
|
Loading…
x
Reference in New Issue
Block a user