Make window check in Wayland integration assert
This function was always requiring a window handle but after latest refactor it would fail silently
This commit is contained in:
parent
83cab52cd6
commit
1e89c19a03
1 changed files with 3 additions and 9 deletions
|
|
@ -92,9 +92,7 @@ void WaylandIntegration::setWindowExtents(
|
||||||
not_null<QWidget*> widget,
|
not_null<QWidget*> widget,
|
||||||
const QMargins &extents) {
|
const QMargins &extents) {
|
||||||
const auto window = widget->windowHandle();
|
const auto window = widget->windowHandle();
|
||||||
if (!window) {
|
Expects(window != nullptr);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto native = window->nativeInterface<QWaylandWindow>();
|
const auto native = window->nativeInterface<QWaylandWindow>();
|
||||||
if (!native) {
|
if (!native) {
|
||||||
|
|
@ -106,9 +104,7 @@ void WaylandIntegration::setWindowExtents(
|
||||||
|
|
||||||
void WaylandIntegration::unsetWindowExtents(not_null<QWidget*> widget) {
|
void WaylandIntegration::unsetWindowExtents(not_null<QWidget*> widget) {
|
||||||
const auto window = widget->windowHandle();
|
const auto window = widget->windowHandle();
|
||||||
if (!window) {
|
Expects(window != nullptr);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto native = window->nativeInterface<QWaylandWindow>();
|
const auto native = window->nativeInterface<QWaylandWindow>();
|
||||||
if (!native) {
|
if (!native) {
|
||||||
|
|
@ -122,9 +118,7 @@ void WaylandIntegration::showWindowMenu(
|
||||||
not_null<QWidget*> widget,
|
not_null<QWidget*> widget,
|
||||||
const QPoint &point) {
|
const QPoint &point) {
|
||||||
const auto window = widget->windowHandle();
|
const auto window = widget->windowHandle();
|
||||||
if (!window) {
|
Expects(window != nullptr);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto native = qApp->nativeInterface<QWaylandApplication>();
|
const auto native = qApp->nativeInterface<QWaylandApplication>();
|
||||||
const auto nativeWindow = window->nativeInterface<QWaylandWindow>();
|
const auto nativeWindow = window->nativeInterface<QWaylandWindow>();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue