Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/test_helpers.cpp
| Show First 20 Lines • Show All 474 Lines • ▼ Show 20 Line(s) | 471 | { | |||
|---|---|---|---|---|---|
| 475 | auto s = s_waylandConnection.xdgShellStable->createSurface(surface, parent); | 475 | auto s = s_waylandConnection.xdgShellStable->createSurface(surface, parent); | ||
| 476 | if (!s->isValid()) { | 476 | if (!s->isValid()) { | ||
| 477 | delete s; | 477 | delete s; | ||
| 478 | return nullptr; | 478 | return nullptr; | ||
| 479 | } | 479 | } | ||
| 480 | return s; | 480 | return s; | ||
| 481 | } | 481 | } | ||
| 482 | 482 | | |||
| 483 | XdgShellPopup *createXdgShellStablePopup(Surface *surface, XdgShellSurface *parentSurface, const XdgPositioner &positioner, QObject *parent) | ||||
| 484 | { | ||||
| 485 | if (!s_waylandConnection.xdgShellStable) { | ||||
| 486 | return nullptr; | ||||
| 487 | } | ||||
| 488 | auto s = s_waylandConnection.xdgShellStable->createPopup(surface, parentSurface, positioner, parent); | ||||
| 489 | if (!s->isValid()) { | ||||
| 490 | delete s; | ||||
| 491 | return nullptr; | ||||
| 492 | } | ||||
| 493 | return s; | ||||
| 494 | } | ||||
| 495 | | ||||
| 483 | QObject *createShellSurface(ShellSurfaceType type, KWayland::Client::Surface *surface, QObject *parent) | 496 | QObject *createShellSurface(ShellSurfaceType type, KWayland::Client::Surface *surface, QObject *parent) | ||
| 484 | { | 497 | { | ||
| 485 | switch (type) { | 498 | switch (type) { | ||
| 486 | case ShellSurfaceType::WlShell: | 499 | case ShellSurfaceType::WlShell: | ||
| 487 | return createShellSurface(surface, parent); | 500 | return createShellSurface(surface, parent); | ||
| 488 | case ShellSurfaceType::XdgShellV5: | 501 | case ShellSurfaceType::XdgShellV5: | ||
| 489 | return createXdgShellV5Surface(surface, parent); | 502 | return createXdgShellV5Surface(surface, parent); | ||
| 490 | case ShellSurfaceType::XdgShellV6: | 503 | case ShellSurfaceType::XdgShellV6: | ||
| ▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines | |||||