Commit 0c996daa authored by David Redondo's avatar David Redondo 🏎
Browse files

Don't return early out of the constructor

parent 8822c250
......@@ -95,13 +95,12 @@ QuickEditor::QuickEditor(const QPixmap &thePixmap, KWayland::Client::PlasmaShell
using namespace KWayland::Client;
winId();
auto surface = Surface::fromWindow(windowHandle());
if (!surface) {
return;
if (surface) {
PlasmaShellSurface *plasmashellSurface = plasmashell->createSurface(surface, this);
plasmashellSurface->setRole(PlasmaShellSurface::Role::Panel);
plasmashellSurface->setPanelTakesFocus(true);
plasmashellSurface->setPosition(geometry().topLeft());
}
PlasmaShellSurface *plasmashellSurface = plasmashell->createSurface(surface, this);
plasmashellSurface->setRole(PlasmaShellSurface::Role::Panel);
plasmashellSurface->setPanelTakesFocus(true);
plasmashellSurface->setPosition(geometry().topLeft());
}
if (Settings::rememberLastRectangularRegion() || Settings::alwaysRememberRegion()) {
auto savedRect = Settings::cropRegion();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment